зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1470255 [wpt PR 11612] - [compositing] Parsing of compositing properties, a=testonly
Automatic update from web-platform-testsMerge pull request #11612 from ewilligers/compositing-parsing [compositing] Parsing of compositing properties -- wpt-commits: 9cc6eb1151382b030f79f15057ce3d7052e98e8c wpt-pr: 11612
This commit is contained in:
Родитель
7407d57594
Коммит
cc82d50ff2
|
@ -239523,6 +239523,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/compositing/parsing/resources/parsing-testcommon.js": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/compositing/svg/reference/mix-blend-mode-svg-rectangle-ref.html": [
|
||||
[
|
||||
{}
|
||||
|
@ -316115,6 +316120,42 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/compositing/parsing/background-blend-mode-invalid.html": [
|
||||
[
|
||||
"/css/compositing/parsing/background-blend-mode-invalid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/compositing/parsing/background-blend-mode-valid.html": [
|
||||
[
|
||||
"/css/compositing/parsing/background-blend-mode-valid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/compositing/parsing/isolation-invalid.html": [
|
||||
[
|
||||
"/css/compositing/parsing/isolation-invalid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/compositing/parsing/isolation-valid.html": [
|
||||
[
|
||||
"/css/compositing/parsing/isolation-valid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/compositing/parsing/mix-blend-mode-invalid.html": [
|
||||
[
|
||||
"/css/compositing/parsing/mix-blend-mode-invalid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/compositing/parsing/mix-blend-mode-valid.html": [
|
||||
[
|
||||
"/css/compositing/parsing/mix-blend-mode-valid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-align/content-distribution/parse-align-content-001.html": [
|
||||
[
|
||||
"/css/css-align/content-distribution/parse-align-content-001.html",
|
||||
|
@ -500222,6 +500263,34 @@
|
|||
"2467ddfd1f4960c0c26096114b7b7302c3c02377",
|
||||
"support"
|
||||
],
|
||||
"css/compositing/parsing/background-blend-mode-invalid.html": [
|
||||
"718dafaca2e1aedaf4857e3af730f2c52a6ea9bf",
|
||||
"testharness"
|
||||
],
|
||||
"css/compositing/parsing/background-blend-mode-valid.html": [
|
||||
"3f7ae3abfd651a9a0f7f931cacec1b3f7635c81b",
|
||||
"testharness"
|
||||
],
|
||||
"css/compositing/parsing/isolation-invalid.html": [
|
||||
"5b16bc373fd6318f4f0d9ee24b7ac9719d7fd2da",
|
||||
"testharness"
|
||||
],
|
||||
"css/compositing/parsing/isolation-valid.html": [
|
||||
"760c18881d30fb5e41c948eaf5b46d3da69f8fe7",
|
||||
"testharness"
|
||||
],
|
||||
"css/compositing/parsing/mix-blend-mode-invalid.html": [
|
||||
"a20ce9b9858263fdf73b43ef4f8b0b02535a9df0",
|
||||
"testharness"
|
||||
],
|
||||
"css/compositing/parsing/mix-blend-mode-valid.html": [
|
||||
"092d740ae5549c4aaa4bf31fa0d7ed4df2ca2dee",
|
||||
"testharness"
|
||||
],
|
||||
"css/compositing/parsing/resources/parsing-testcommon.js": [
|
||||
"14f32b772f27a9bc75fe90e2ea1d8e4fb3649e95",
|
||||
"support"
|
||||
],
|
||||
"css/compositing/svg/mix-blend-mode-in-svg-image.html": [
|
||||
"fc6b8df4e7e8bbca443279335b969146313db604",
|
||||
"reftest"
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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");
|
||||
}
|
Загрузка…
Ссылка в новой задаче