Update web-platform-tests to revision 6aef6676d2f95c29de17666cc70d61b517939fbf

This commit is contained in:
WPT Sync Bot 2018-08-18 21:26:51 -04:00
parent cd0e7e7ebb
commit 3ebfea9f10
250 changed files with 2846 additions and 702 deletions

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-attachment supports only the grammar '<attachment>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-attachment supports the full grammar '<attachment>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-clip supports only the grammar '<box>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-clip supports the full grammar '<box>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-color supports only the grammar '<color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-color supports the full grammar '<color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-image supports only the grammar '<bg-image>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-image supports the full grammar '<bg-image>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background supports only the grammar '<bg-layer># , <final-bg-layer>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-origin supports only the grammar '<box>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-origin supports the full grammar '<box>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-position supports only the grammar '<bg-position>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-position supports the full grammar '<bg-position>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-repeat supports only the grammar '<repeat-style>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-repeat supports the full grammar '<repeat-style>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-size supports only the grammar '<bg-size>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background-size supports the full grammar '<bg-size>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="background supports the full grammar '<bg-layer># , <final-bg-layer>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-color supports only the grammar '<color>{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-color supports the full grammar '<color>{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-image supports only the grammar ' <border-image-source> || <border-image-slice> [ / <border-image-width> | / <border-image-width>? / <border-image-outset> ]? || <border-image-repeat>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-image-outset supports only the grammar '[ <length> | <number> ]{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-image-outset supports the full grammar '[ <length> | <number> ]{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-image-repeat supports only the grammar '[ stretch | repeat | round | space ]{1,2}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-image-repeat supports the full grammar '[ stretch | repeat | round | space ]{1,2}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-image-slice supports only the grammar '[<number> | <percentage>]{1,4} && fill?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-image-slice supports the full grammar '[<number> | <percentage>]{1,4} && fill?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-image-source supports only the grammar 'none | <image>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-image-source supports the full grammar 'none | <image>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-image supports the full grammar ' <border-image-source> || <border-image-slice> [ / <border-image-width> | / <border-image-width>? / <border-image-outset> ]? || <border-image-repeat>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-image-width supports only the grammar '[ <length-percentage> | <number> | auto ]{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-image-width supports the full grammar '[ <length-percentage> | <number> | auto ]{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-width supports only the grammar '<line-width> || <line-style> || <color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-radius supports only the grammar '<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-radius supports the full grammar '<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-style supports only the grammar '<line-style>{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-style supports the full grammar '<line-style>{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-width supports the full grammar '<line-width> || <line-style> || <color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-width supports only the grammar '<line-width>{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="border-width supports the full grammar '<line-width>{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -3,12 +3,14 @@
<head>
<meta charset="utf-8">
<title>CSS Backgrounds and Borders Module Level 3: parsing box-shadow with invalid values</title>
<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds/#box-shadow">
<meta name="assert" content="box-shadow supports only the grammar 'none | <shadow>#'.">
<meta name="assert" content="Lengths must stay adjacent." />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>
@ -17,12 +19,44 @@ test_invalid_value("box-shadow", "1 2");
test_invalid_value("box-shadow", "1% 2%");
test_invalid_value("box-shadow", "1px calc(2px + 2%)");
test_invalid_value("box-shadow", "red inset");
test_invalid_value("box-shadow", "1px");
test_invalid_value("box-shadow", "1px 2px 3px 4px 5px");
test_invalid_value("box-shadow", "red 1px 2px blue");
test_invalid_value("box-shadow", "red");
test_invalid_value("box-shadow", "4px red");
test_invalid_value("box-shadow", "red 4px");
test_invalid_value("box-shadow", "-4px red 4px");
test_invalid_value("box-shadow", "red -4px 4px red");
test_invalid_value("box-shadow", "-4px 4px red 0");
test_invalid_value("box-shadow", "-4px 4px 0 red 0");
test_invalid_value("box-shadow", "inset");
test_invalid_value("box-shadow", "inset 4px");
test_invalid_value("box-shadow", "4px inset");
test_invalid_value("box-shadow", "4px inset -4px");
test_invalid_value("box-shadow", "inset 4px -4px inset");
test_invalid_value("box-shadow", "4px -4px inset 0");
test_invalid_value("box-shadow", "4px -4px 0 inset 0");
test_invalid_value("box-shadow", "red inset");
test_invalid_value("box-shadow", "inset red");
test_invalid_value("box-shadow", "4px red inset");
test_invalid_value("box-shadow", "red inset 4px");
test_invalid_value("box-shadow", "4px inset red");
test_invalid_value("box-shadow", "inset red 4px");
test_invalid_value("box-shadow", "4px red inset -4px");
test_invalid_value("box-shadow", "4px inset red -4px");
test_invalid_value("box-shadow", "inset 4px red -4px");
test_invalid_value("box-shadow", "4px red 4px inset");
test_invalid_value("box-shadow", "red 4px inset -4px");
test_invalid_value("box-shadow", "4px inset -4px red");
test_invalid_value("box-shadow", "4px -4px red inset 0");
test_invalid_value("box-shadow", "4px -4px inset red 0");
test_invalid_value("box-shadow", "inset 4px -4px red 0");
test_invalid_value("box-shadow", "4px -4px red 0 inset");
test_invalid_value("box-shadow", "red 4px -4px inset 0");
test_invalid_value("box-shadow", "4px -4px inset 0 red");
</script>
</body>
</html>

View file

@ -3,12 +3,14 @@
<head>
<meta charset="utf-8">
<title>CSS Backgrounds and Borders Module Level 3: parsing box-shadow with valid values</title>
<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds/#box-shadow">
<meta name="assert" content="box-shadow supports the full grammar 'none | <shadow>#'.">
<meta name="assert" content="Box shadow color, inset, and length parameters can be mixed in any order." />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>
@ -18,6 +20,43 @@ test_valid_value("box-shadow", "red 1px 2px 3px -4px inset"); // Edge serializes
test_valid_value("box-shadow", "inset 1px 2px red", "red 1px 2px inset");
test_valid_value("box-shadow", "1px -2px inset, red -3px 4px"); // Edge serializes as "inset 1px -2px, -3px 4px red"
test_valid_value("box-shadow", "inset 1px -2px, -3px 4px red", "1px -2px inset, red -3px 4px");
// color only
test_valid_value("box-shadow", "4px 4px green", "green 4px 4px");
test_valid_value("box-shadow", "green -4px 4px", "green -4px 4px");
test_valid_value("box-shadow", "-4px 4px 0 green", "green -4px 4px 0px");
test_valid_value("box-shadow", "green -4px 4px 0", "green -4px 4px 0px");
test_valid_value("box-shadow", "-4px 4px 0 0 green", "green -4px 4px 0px 0px");
test_valid_value("box-shadow", "green -4px 4px 0 0", "green -4px 4px 0px 0px");
// inset only
test_valid_value("box-shadow", "4px -4px inset", "4px -4px inset");
test_valid_value("box-shadow", "inset 4px -4px", "4px -4px inset");
test_valid_value("box-shadow", "4px -4px 0 inset", "4px -4px 0px inset");
test_valid_value("box-shadow", "inset 4px -4px 0", "4px -4px 0px inset");
test_valid_value("box-shadow", "4px -4px 0 0 inset", "4px -4px 0px 0px inset");
test_valid_value("box-shadow", "inset 4px -4px 0 0", "4px -4px 0px 0px inset");
// color and inset
test_valid_value("box-shadow", "4px -4px green inset", "green 4px -4px inset");
test_valid_value("box-shadow", "4px -4px inset green", "green 4px -4px inset");
test_valid_value("box-shadow", "inset green 4px -4px", "green 4px -4px inset");
test_valid_value("box-shadow", "green inset 4px -4px", "green 4px -4px inset");
test_valid_value("box-shadow", "green 4px -4px inset", "green 4px -4px inset");
test_valid_value("box-shadow", "inset 4px -4px green", "green 4px -4px inset");
test_valid_value("box-shadow", "inset green 4px -4px 0", "green 4px -4px 0px inset");
test_valid_value("box-shadow", "green inset 4px -4px 0", "green 4px -4px 0px inset");
test_valid_value("box-shadow", "4px -4px 0 green inset", "green 4px -4px 0px inset");
test_valid_value("box-shadow", "4px -4px 0 inset green", "green 4px -4px 0px inset");
test_valid_value("box-shadow", "green 4px -4px 0 inset", "green 4px -4px 0px inset");
test_valid_value("box-shadow", "inset 4px -4px 0 green", "green 4px -4px 0px inset");
test_valid_value("box-shadow", "inset green 4px -4px 0 0", "green 4px -4px 0px 0px inset");
test_valid_value("box-shadow", "green inset 4px -4px 0 0", "green 4px -4px 0px 0px inset");
test_valid_value("box-shadow", "4px -4px 0 0 green inset", "green 4px -4px 0px 0px inset");
test_valid_value("box-shadow", "4px -4px 0 0 inset green", "green 4px -4px 0px 0px inset");
test_valid_value("box-shadow", "green 4px -4px 0 0 inset", "green 4px -4px 0px 0px inset");
test_valid_value("box-shadow", "inset 4px -4px 0 0 green", "green 4px -4px 0px 0px inset");
</script>
</body>
</html>

View file

@ -0,0 +1,39 @@
'use strict';
// serializedValue can be the expected serialization of value,
// or an array of permitted serializations,
// or omitted if value should serialize as value.
function test_valid_value(property, value, serializedValue) {
if (arguments.length < 3)
serializedValue = value;
var stringifiedValue = JSON.stringify(value);
test(function(){
var div = document.createElement('div');
div.style[property] = value;
assert_not_equals(div.style.getPropertyValue(property), "", "property should be set");
var div = document.createElement('div');
div.style[property] = value;
var readValue = div.style.getPropertyValue(property);
if (serializedValue instanceof Array)
assert_in_array(readValue, serializedValue, "serialization should be sound");
else
assert_equals(readValue, serializedValue, "serialization should be canonical");
div.style[property] = readValue;
assert_equals(div.style.getPropertyValue(property), readValue, "serialization should round-trip");
}, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
}
function test_invalid_value(property, value) {
var stringifiedValue = JSON.stringify(value);
test(function(){
var div = document.createElement('div');
div.style[property] = value;
assert_equals(div.style.getPropertyValue(property), "");
}, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
}