mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision 332b7c4e711d75ead4c0dfbf7f6f0b683206756d
This commit is contained in:
parent
46611b012e
commit
b60afa18f5
389 changed files with 7767 additions and 2421 deletions
|
@ -0,0 +1,99 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout Test: grid-area sets longhands</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-area">
|
||||
<meta name="assert" content="grid-area supports the full grammar '<grid-line> [ / <grid-line> ]{0,3}'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/shorthand-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_shorthand_value('grid-area', 'auto', {
|
||||
'grid-row-start': 'auto',
|
||||
'grid-column-start': 'auto',
|
||||
'grid-row-end': 'auto',
|
||||
'grid-column-end': 'auto'
|
||||
});
|
||||
|
||||
// <custom-ident>
|
||||
test_shorthand_value('grid-area', '--a', {
|
||||
'grid-row-start': '--a',
|
||||
'grid-column-start': '--a',
|
||||
'grid-row-end': '--a',
|
||||
'grid-column-end': '--a'
|
||||
});
|
||||
|
||||
test_shorthand_value('grid-area', 'a / b', {
|
||||
'grid-row-start': 'a',
|
||||
'grid-column-start': 'b',
|
||||
'grid-row-end': 'a',
|
||||
'grid-column-end': 'b'
|
||||
});
|
||||
|
||||
test_shorthand_value('grid-area', 'a / b / c', {
|
||||
'grid-row-start': 'a',
|
||||
'grid-column-start': 'b',
|
||||
'grid-row-end': 'c',
|
||||
'grid-column-end': 'b'
|
||||
});
|
||||
|
||||
test_shorthand_value('grid-area', 'a / b / c / d', {
|
||||
'grid-row-start': 'a',
|
||||
'grid-column-start': 'b',
|
||||
'grid-row-end': 'c',
|
||||
'grid-column-end': 'd'
|
||||
});
|
||||
|
||||
// <integer> && <custom-ident>?
|
||||
// span && [ <integer> || <custom-ident> ]
|
||||
test_shorthand_value('grid-area', '+90 -a- / 2 i span', {
|
||||
'grid-row-start': '90 -a-',
|
||||
'grid-column-start': 'span 2 i',
|
||||
'grid-row-end': 'auto',
|
||||
'grid-column-end': 'auto'
|
||||
});
|
||||
|
||||
test_shorthand_value('grid-area', '1 / 2 / 3 / 4', {
|
||||
'grid-row-start': '1',
|
||||
'grid-column-start': '2',
|
||||
'grid-row-end': '3',
|
||||
'grid-column-end': '4'
|
||||
});
|
||||
|
||||
|
||||
test_shorthand_value('grid-row', 'auto', {
|
||||
'grid-row-start': 'auto',
|
||||
'grid-row-end': 'auto'
|
||||
});
|
||||
|
||||
test_shorthand_value('grid-row', 'one / 2', {
|
||||
'grid-row-start': 'one',
|
||||
'grid-row-end': '2'
|
||||
});
|
||||
|
||||
test_shorthand_value('grid-row', '1 two / four 3', {
|
||||
'grid-row-start': '1 two',
|
||||
'grid-row-end': '3 four'
|
||||
});
|
||||
|
||||
|
||||
test_shorthand_value('grid-column', '5 span', {
|
||||
'grid-column-start': 'span 5',
|
||||
'grid-column-end': 'auto'
|
||||
});
|
||||
|
||||
test_shorthand_value('grid-column', '1 / two', {
|
||||
'grid-column-start': '1',
|
||||
'grid-column-end': 'two'
|
||||
});
|
||||
|
||||
test_shorthand_value('grid-column', 'span 1 two / four 3 span', {
|
||||
'grid-column-start': 'span 1 two',
|
||||
'grid-column-end': 'span 3 four'
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -32,7 +32,8 @@ test_invalid_value("grid-auto-columns", "fit-content(1px auto)");
|
|||
// <track-size>+
|
||||
test_invalid_value("grid-auto-columns", "2em / 3em");
|
||||
test_invalid_value("grid-auto-columns", "auto, 10%");
|
||||
test_invalid_value("grid-auto-rows", "1px [a] 1px");
|
||||
test_invalid_value("grid-auto-columns", "1px [a] 1px");
|
||||
test_invalid_value("grid-auto-columns", "[] 1px []");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -32,6 +32,7 @@ test_invalid_value("grid-auto-rows", "fit-content(1px auto)");
|
|||
test_invalid_value("grid-auto-rows", "2em / 3em");
|
||||
test_invalid_value("grid-auto-rows", "auto, 10%");
|
||||
test_invalid_value("grid-auto-rows", "1px [a] 1px");
|
||||
test_invalid_value("grid-auto-rows", "[] 1px []");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -47,7 +47,7 @@ test_valid_value("grid-template-columns", 'fit-content(calc(30% + 40vw))');
|
|||
// 'repeat(1, 10px)' in Firefox
|
||||
// '[] 10px' in Safari
|
||||
// '10px' in Edge 18
|
||||
test_valid_value("grid-template-columns", 'repeat(1, [] 10px)', ['repeat(1, 10px)', 'repeat(1, [] 10px)']);
|
||||
test_valid_value("grid-template-columns", 'repeat(1, [] 10px [])', 'repeat(1, 10px)');
|
||||
|
||||
// 'repeat(1, [one two] 20%)' in Blink, Firefox
|
||||
// '[one two] 20%' in Safari, Edge 18
|
||||
|
@ -61,6 +61,7 @@ test_valid_value("grid-template-columns", 'repeat(2, fit-content(20%) [three fou
|
|||
|
||||
// <track-list> = [ <line-names>? [ <track-size> | <track-repeat> ] ]+ <line-names>?
|
||||
test_valid_value("grid-template-columns", 'min-content repeat(5, minmax(10px, auto))');
|
||||
test_valid_value("grid-template-columns", '[] 150px [] 1fr []', '150px 1fr');
|
||||
|
||||
// <auto-repeat> = repeat( [ auto-fill | auto-fit ] , [ <line-names>? <fixed-size> ]+ <line-names>? )
|
||||
test_valid_value("grid-template-columns", 'repeat(auto-fill, 10px)');
|
||||
|
|
|
@ -43,11 +43,7 @@ test_valid_value("grid-template-rows", 'fit-content(calc(30% + 40vw))');
|
|||
|
||||
// <track-repeat> = repeat( [ <positive-integer> ] , [ <line-names>? <track-size> ]+ <line-names>? )
|
||||
|
||||
// 'repeat(1, [] 10px)' in Blink
|
||||
// 'repeat(1, 10px)' in Firefox
|
||||
// '[] 10px' in Safari
|
||||
// '10px' in Edge 18
|
||||
test_valid_value("grid-template-rows", 'repeat(1, [] 10px)', ['repeat(1, 10px)', 'repeat(1, [] 10px)']);
|
||||
test_valid_value("grid-template-rows", 'repeat(1, [] 10px [])', 'repeat(1, 10px)');
|
||||
|
||||
// 'repeat(1, [one two] 20%)' in Blink, Firefox
|
||||
// '[one two] 20%' in Safari, Edge 18
|
||||
|
@ -61,6 +57,7 @@ test_valid_value("grid-template-rows", 'repeat(2, fit-content(20%) [three four]
|
|||
|
||||
// <track-list> = [ <line-names>? [ <track-size> | <track-repeat> ] ]+ <line-names>?
|
||||
test_valid_value("grid-template-rows", 'min-content repeat(5, minmax(10px, auto))');
|
||||
test_valid_value("grid-template-rows", '[] 150px [] 1fr []', '150px 1fr');
|
||||
|
||||
// <auto-repeat> = repeat( [ auto-fill | auto-fit ] , [ <line-names>? <fixed-size> ]+ <line-names>? )
|
||||
test_valid_value("grid-template-rows", 'repeat(auto-fill, 10px)');
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout Test: grid-template sets longhands</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template">
|
||||
<meta name="assert" content="grid-template supports the full grammar 'none | [ <grid-template-rows> / <grid-template-columns> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/shorthand-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_shorthand_value('grid-template', 'none', {
|
||||
'grid-template-rows': 'none',
|
||||
'grid-template-columns': 'none',
|
||||
'grid-template-areas': 'none'
|
||||
});
|
||||
|
||||
// <grid-template-rows> / <grid-template-columns>
|
||||
test_shorthand_value('grid-template', '10px / 20%', {
|
||||
'grid-template-rows': '10px',
|
||||
'grid-template-columns': '20%',
|
||||
'grid-template-areas': 'none'
|
||||
});
|
||||
|
||||
test_shorthand_value('grid-template', 'fit-content(calc(-0.5em + 10px)) / fit-content(calc(0.5em + 10px))', {
|
||||
'grid-template-rows': 'fit-content(calc(-0.5em + 10px))',
|
||||
'grid-template-columns': 'fit-content(calc(0.5em + 10px))',
|
||||
'grid-template-areas': 'none'
|
||||
});
|
||||
|
||||
// [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?
|
||||
test_shorthand_value('grid-template',
|
||||
'[header-top] "a a a" [header-bottom]' +
|
||||
' [main-top] "b b b" 1fr [main-bottom]' +
|
||||
' / auto 1fr auto', {
|
||||
'grid-template-rows': '[header-top] auto [header-bottom main-top] 1fr [main-bottom]',
|
||||
'grid-template-columns': 'auto 1fr auto',
|
||||
'grid-template-areas': '"a a a" "b b b"'
|
||||
});
|
||||
|
||||
test_shorthand_value('grid-template',
|
||||
' "a a a"' +
|
||||
' "b b b" 1fr' +
|
||||
'/ auto 1fr auto', {
|
||||
'grid-template-rows': 'auto 1fr',
|
||||
'grid-template-columns': 'auto 1fr auto',
|
||||
'grid-template-areas': '"a a a" "b b b"'
|
||||
});
|
||||
|
||||
test_shorthand_value('grid-template',
|
||||
' [] "a a a" []' +
|
||||
' [] "b b b" 1fr []' +
|
||||
' / [] auto 1fr [] auto []', {
|
||||
'grid-template-rows': 'auto 1fr',
|
||||
'grid-template-columns': 'auto 1fr auto',
|
||||
'grid-template-areas': '"a a a" "b b b"'
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue