Update web-platform-tests to revision 60220357131c65146444da1f54624d5b54d0975d

This commit is contained in:
WPT Sync Bot 2018-07-18 15:43:58 +00:00 committed by Tom Servo
parent c45192614c
commit 775b784f79
2144 changed files with 58115 additions and 29658 deletions

View file

@ -1,3 +1,4 @@
spec: https://drafts.csswg.org/css-cascade/
suggested_reviewers:
- fantasai
- tabatkins

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Cascading and Inheritance Level 3: parsing all with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-cascade-3/#propdef-all">
<meta name="assert" content="all supports only the grammar 'initial | inherit | unset'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("all", "auto");
test_invalid_value("all", "none");
test_invalid_value("all", "filter");
test_invalid_value("all", "unset inherit");
test_invalid_value("all", "inherit initial");
test_invalid_value("all", "initial unset");
test_invalid_value("all", "opacity transform");
</script>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Cascading and Inheritance Level 3: parsing all with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-cascade-3/#propdef-all">
<meta name="assert" content="all supports the full grammar 'initial | inherit | unset'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("all", "initial");
test_valid_value("all", "inherit");
test_valid_value("all", "unset");
</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");
}