Update web-platform-tests to revision 81962ac8802223d038b188b6f9cb88a0a9c5beee

This commit is contained in:
WPT Sync Bot 2018-05-18 22:02:29 -04:00
parent fe1a057bd1
commit 24183668c4
1960 changed files with 29853 additions and 10555 deletions

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing box-sizing with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#box-sizing">
<meta name="assert" content="box-sizing supports only the grammar 'content-box | border-box'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("box-sizing", "auto");
test_invalid_value("box-sizing", "content-box border-box");
test_invalid_value("box-sizing", "fill-box");
test_invalid_value("box-sizing", "margin-box");
test_invalid_value("box-sizing", "padding-box");
test_invalid_value("box-sizing", "view-box");
</script>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing box-sizing with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#box-sizing">
<meta name="assert" content="box-sizing supports the full grammar 'content-box | border-box'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("box-sizing", "content-box");
test_valid_value("box-sizing", "border-box");
</script>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing caret-color with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#caret-color">
<meta name="assert" content="caret-color supports only the grammar 'auto | <color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("caret-color", "none");
test_invalid_value("caret-color", "invert");
test_invalid_value("caret-color", "50%");
test_invalid_value("caret-color", "red green");
</script>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing caret-color with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#caret-color">
<meta name="assert" content="caret-color supports the full grammar 'auto | <color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("caret-color", "auto");
test_valid_value("caret-color", "rgba(10, 20, 30, 0.4)");
</script>
</body>
</html>

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing cursor with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#cursor">
<meta name="assert" content="cursor supports only the grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("cursor", "en-resize");
test_invalid_value("cursor", 'url("https://example.com/") alias');
test_invalid_value("cursor", '1 2 url("https://example.com/"), copy');
test_invalid_value("cursor", 'url("https://example.com/"), url("https://example.com/") 3, move');
test_invalid_value("cursor", 'url("https://example.com/") 1px 2px, copy');
test_invalid_value("cursor", 'url("https://example.com/"), url("https://example.com/") 3% 4%, move');
</script>
</body>
</html>

View file

@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing cursor with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#cursor">
<meta name="assert" content="cursor supports the full grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("cursor", "auto");
test_valid_value("cursor", "default");
test_valid_value("cursor", "none");
test_valid_value("cursor", "context-menu");
test_valid_value("cursor", "help");
test_valid_value("cursor", "pointer");
test_valid_value("cursor", "progress");
test_valid_value("cursor", "wait");
test_valid_value("cursor", "cell");
test_valid_value("cursor", "crosshair");
test_valid_value("cursor", "text");
test_valid_value("cursor", "vertical-text");
test_valid_value("cursor", "alias");
test_valid_value("cursor", "copy");
test_valid_value("cursor", "move");
test_valid_value("cursor", "no-drop");
test_valid_value("cursor", "not-allowed");
test_valid_value("cursor", "grab");
test_valid_value("cursor", "grabbing");
test_valid_value("cursor", "e-resize");
test_valid_value("cursor", "n-resize");
test_valid_value("cursor", "ne-resize");
test_valid_value("cursor", "nw-resize");
test_valid_value("cursor", "s-resize");
test_valid_value("cursor", "se-resize");
test_valid_value("cursor", "sw-resize");
test_valid_value("cursor", "w-resize");
test_valid_value("cursor", "ew-resize");
test_valid_value("cursor", "ns-resize");
test_valid_value("cursor", "nesw-resize");
test_valid_value("cursor", "nwse-resize");
test_valid_value("cursor", "col-resize");
test_valid_value("cursor", "row-resize");
test_valid_value("cursor", "all-scroll");
test_valid_value("cursor", "zoom-in");
test_valid_value("cursor", "zoom-out");
test_valid_value("cursor", 'url("https://example.com/"), alias', ['url("https://example.com/"), alias', 'url(https://example.com/), alias']);
test_valid_value("cursor", 'url("https://example.com/") 1 calc(2 + 0), copy', ['url("https://example.com/") 1 calc(2), copy', 'url("https://example.com/") 1 2, copy', 'url(https://example.com/) 1 2, copy']);
test_valid_value("cursor", 'url("https://example.com/"), url("https://example.com/") 3 -4, move', ['url("https://example.com/"), url("https://example.com/") 3 -4, move', 'url(https://example.com/), url(https://example.com/) 3 -4, move']);
test_valid_value("cursor", 'url("https://example.com/") 5 6, grab', ['url("https://example.com/") 5 6, grab', 'url(https://example.com/) 5 6, grab']);
</script>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing outline-color with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-color">
<meta name="assert" content="outline-color supports only the grammar '<color> | invert'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("outline-color", "auto");
test_invalid_value("outline-color", "none");
test_invalid_value("outline-color", "50%");
</script>
</body>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing outline-color with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-color">
<meta name="assert" content="outline-color supports '<color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("outline-color", "rgba(10, 20, 30, 0.4)");
</script>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing outline-color with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-color">
<meta name="assert" content="outline-color supports 'invert'.">
<meta name="flags" content="may">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
// Conformant UAs may ignore the invert value on platforms that do not support color inversion of the pixels on the screen.
test_valid_value("outline-color", "invert");
</script>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing outline with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline">
<meta name="assert" content="outline supports only the grammar '<outline-color> || <outline> || <outline>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("outline", "invert solid rgba(10, 20, 30, 0.4)");
test_invalid_value("outline", "double invert groove");
test_invalid_value("outline", "thin outset thick");
</script>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing outline-offset with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-offset">
<meta name="assert" content="outline-offset supports only the grammar '<length>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("outline-offset", "auto");
test_invalid_value("outline-offset", "1%");
test_invalid_value("outline-offset", "2px 3px");
</script>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing outline-offset with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-offset">
<meta name="assert" content="outline-offset supports the full grammar '<length>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("outline-offset", "0", "0px");
test_valid_value("outline-offset", "1px");
test_valid_value("outline-offset", "2em");
test_valid_value("outline-offset", "calc(3rem + 4vw)");
</script>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 4: parsing outline-style with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui/#outline-style">
<meta name="assert" content="outline-style supports only the grammar 'auto | <outline-line-style>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("outline-style", "hidden");
test_invalid_value("outline-style", "dotted dashed");
test_invalid_value("outline-style", "solid double groove ridge");
</script>
</body>
</html>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 4: parsing outline-style with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui/#outline-style">
<meta name="assert" content="outline-style supports the full grammar 'auto | <outline-line-style>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("outline-style", "auto");
test_valid_value("outline-style", "none");
test_valid_value("outline-style", "dotted");
test_valid_value("outline-style", "dashed");
test_valid_value("outline-style", "solid");
test_valid_value("outline-style", "double");
test_valid_value("outline-style", "groove");
test_valid_value("outline-style", "ridge");
test_valid_value("outline-style", "inset");
test_valid_value("outline-style", "outset");
</script>
</body>
</html>

View file

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing outline with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline">
<link rel="help" href="https://drafts.csswg.org/cssom/#serializing-css-values">
<meta name="assert" content="outline supports the full grammar '<outline-color> || <outline> || <outline>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("outline", "rgba(10, 20, 30, 0.4)");
test_valid_value("outline", "auto");
test_valid_value("outline", "none"); // Edge serializes as "invert"
test_valid_value("outline", "dotted");
test_valid_value("outline", "dashed");
test_valid_value("outline", "solid");
test_valid_value("outline", "double");
test_valid_value("outline", "groove");
test_valid_value("outline", "ridge");
test_valid_value("outline", "inset");
test_valid_value("outline", "outset");
test_valid_value("outline", "0", "0px");
test_valid_value("outline", "1px");
test_valid_value("outline", "calc(2em + 3ex)");
test_valid_value("outline", "thin");
test_valid_value("outline", "medium"); // Edge serializes as "invert"
test_valid_value("outline", "thick");
test_valid_value("outline", "dashed thin");
test_valid_value("outline", "medium rgba(10, 20, 30, 0.4)", ["rgba(10, 20, 30, 0.4) medium", "rgba(10, 20, 30, 0.4)"]);
test_valid_value("outline", "3px ridge rgba(10, 20, 30, 0.4)", "rgba(10, 20, 30, 0.4) ridge 3px");
</script>
</body>
</html>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing outline with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline">
<link rel="help" href="https://drafts.csswg.org/cssom/#serializing-css-values">
<meta name="assert" content="outline supports the full grammar '<outline-color> || <outline> || <outline>'.">
<meta name="assert" content="outline serializes in canonical order, with shortest possible serialization.">
<meta name="flags" content="may">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
// Conformant UAs may ignore the invert value on platforms that do not support color inversion of the pixels on the screen.
test_valid_value("outline", "invert");
test_valid_value("outline", "invert dotted 1px");
</script>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 4: parsing outline-width with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui/#outline-width">
<meta name="assert" content="outline-width supports only the grammar '<border-width>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("outline-width", "auto");
test_invalid_value("outline-width", "1%");
test_invalid_value("outline-width", "thin medium thick medium thin");
</script>
</body>
</html>

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 4: parsing outline-width with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui/#outline-width">
<meta name="assert" content="outline-width supports the full grammar '<border-width>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("outline-width", "0", "0px");
test_valid_value("outline-width", "1px");
test_valid_value("outline-width", "2em");
test_valid_value("outline-width", "calc(2em + 3ex)");
test_valid_value("outline-width", "thin");
test_valid_value("outline-width", "medium");
test_valid_value("outline-width", "thick");
</script>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing resize with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#resize">
<meta name="assert" content="resize supports only the grammar 'none | both | horizontal | vertical'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("resize", "auto");
test_invalid_value("resize", "horizontal vertical");
test_invalid_value("resize", "both 0");
</script>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing resize with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#resize">
<meta name="assert" content="resize supports the full grammar 'none | both | horizontal | vertical'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("resize", "none");
test_valid_value("resize", "both");
test_valid_value("resize", "horizontal");
test_valid_value("resize", "vertical");
</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");
}

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing text-overflow with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#text-overflow">
<meta name="assert" content="text-overflow supports only the grammar 'clip | ellipsis'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("text-overflow", "auto");
test_invalid_value("text-overflow", "clip ellipsis clip");
</script>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: parsing text-overflow with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#text-overflow">
<meta name="assert" content="text-overflow supports the full grammar 'clip | ellipsis'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("text-overflow", "clip");
test_valid_value("text-overflow", "ellipsis");
</script>
</body>
</html>