Update web-platform-tests to revision 4333a1d2f109795547fc5e22ebfc8481fa649de7

This commit is contained in:
WPT Sync Bot 2018-06-22 21:05:34 -04:00
parent 728ebcc932
commit 8c46b67f8e
456 changed files with 10561 additions and 5108 deletions

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Compositing and Blending Level 1: parsing background-blend-mode with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/compositing-1/#propdef-background-blend-mode">
<meta name="assert" content="background-blend-mode supports only the grammar '<blend-mode>#'.">
<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("background-blend-mode", "auto");
test_invalid_value("background-blend-mode", "normal luminosity");
</script>
</body>
</html>

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Compositing and Blending Level 1: parsing background-blend-mode with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/compositing-1/#propdef-background-blend-mode">
<meta name="assert" content="background-blend-mode supports the full grammar '<blend-mode>#'.">
<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("background-blend-mode", "normal");
test_valid_value("background-blend-mode", "multiply");
test_valid_value("background-blend-mode", "screen");
test_valid_value("background-blend-mode", "overlay");
test_valid_value("background-blend-mode", "darken");
test_valid_value("background-blend-mode", "lighten");
test_valid_value("background-blend-mode", "color-dodge");
test_valid_value("background-blend-mode", "color-burn");
test_valid_value("background-blend-mode", "hard-light");
test_valid_value("background-blend-mode", "soft-light");
test_valid_value("background-blend-mode", "difference");
test_valid_value("background-blend-mode", "exclusion");
test_valid_value("background-blend-mode", "hue");
test_valid_value("background-blend-mode", "saturation");
test_valid_value("background-blend-mode", "color");
test_valid_value("background-blend-mode", "luminosity");
test_valid_value("background-blend-mode", "normal, luminosity");
</script>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Compositing and Blending Level 1: parsing isolation with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/compositing-1/#propdef-isolation">
<meta name="assert" content="isolation supports only the grammar '<isolation-mode>'.">
<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("isolation", "none");
test_invalid_value("isolation", "auto isolate");
</script>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Compositing and Blending Level 1: parsing isolation with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/compositing-1/#propdef-isolation">
<meta name="assert" content="isolation supports the full grammar '<isolation-mode>'.">
<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("isolation", "auto");
test_valid_value("isolation", "isolate");
</script>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Compositing and Blending Level 1: parsing mix-blend-mode with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/compositing-1/#propdef-mix-blend-mode">
<meta name="assert" content="mix-blend-mode supports only the grammar '<blend-mode>'.">
<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("mix-blend-mode", "auto");
test_invalid_value("mix-blend-mode", "normal luminosity");
test_invalid_value("mix-blend-mode", "normal, luminosity");
</script>
</body>
</html>

View file

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Compositing and Blending Level 1: parsing mix-blend-mode with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/compositing-1/#propdef-mix-blend-mode">
<meta name="assert" content="mix-blend-mode supports the full grammar '<blend-mode>'.">
<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("mix-blend-mode", "normal");
test_valid_value("mix-blend-mode", "multiply");
test_valid_value("mix-blend-mode", "screen");
test_valid_value("mix-blend-mode", "overlay");
test_valid_value("mix-blend-mode", "darken");
test_valid_value("mix-blend-mode", "lighten");
test_valid_value("mix-blend-mode", "color-dodge");
test_valid_value("mix-blend-mode", "color-burn");
test_valid_value("mix-blend-mode", "hard-light");
test_valid_value("mix-blend-mode", "soft-light");
test_valid_value("mix-blend-mode", "difference");
test_valid_value("mix-blend-mode", "exclusion");
test_valid_value("mix-blend-mode", "hue");
test_valid_value("mix-blend-mode", "saturation");
test_valid_value("mix-blend-mode", "color");
test_valid_value("mix-blend-mode", "luminosity");
</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");
}