Update web-platform-tests to revision 7c50c216081d6ea3c9afe553ee7b64534020a1b2

This commit is contained in:
WPT Sync Bot 2018-09-04 21:37:22 -04:00
parent 5063ac465b
commit f9ee2396ab
254 changed files with 2043 additions and 1285 deletions

View file

@ -102,3 +102,23 @@ backgroundFetchTest(async (test, backgroundFetch) => {
'This fetch should have thrown a quota exceeded error');
}, 'Background Fetch that exceeds the quota throws a QuotaExceededError');
backgroundFetchTest(async (test, backgroundFetch) => {
const registration = await backgroundFetch.fetch(
'my-id', ['resources/feature-name.txt', 'resources/feature-name.txt']);
const {type, eventRegistration, results} = await getMessageFromServiceWorker();
assert_equals('backgroundfetchsuccess', type);
assert_equals(results.length, 2);
assert_equals(eventRegistration.id, registration.id);
assert_equals(eventRegistration.state, "success");
assert_equals(eventRegistration.failureReason, "");
for (const result of results) {
assert_true(result.url.includes('resources/feature-name.txt'));
assert_equals(result.status, 200);
assert_equals(result.text, 'Background Fetch');
}
}, 'Fetches can have requests with duplicate URLs');

View file

@ -6,7 +6,8 @@
function create_test(prefix, params, shouldExistInDOM, shouldExistViaHTTP, title) {
promise_test(t => {
var name = prefix + "prefixtestcookie";
erase_cookie_from_js(name);
erase_cookie_from_js(name, params);
t.add_cleanup(() => erase_cookie_from_js(name, params));
var value = "" + Math.random();
document.cookie = name + "=" + value + ";" + params;

View file

@ -72,7 +72,8 @@ function create_cookie(origin, name, value, extras) {
function set_prefixed_cookie_via_dom_test(options) {
promise_test(t => {
var name = options.prefix + "prefixtestcookie";
erase_cookie_from_js(name);
erase_cookie_from_js(name, options.paras);
t.add_cleanup(() => erase_cookie_from_js(name, options.params));
var value = "" + Math.random();
document.cookie = name + "=" + value + ";" + options.params;
@ -97,7 +98,7 @@ function set_prefixed_cookie_via_http_test(options) {
var name = options.prefix + "prefixtestcookie";
if (!options.origin) {
options.origin = self.origin;
erase_cookie_from_js(name);
erase_cookie_from_js(name, options.params);
return postDelete;
} else {
return credFetch(options.origin + "/cookies/resources/drop.py?name=" + name)
@ -184,9 +185,8 @@ return credFetch(origin + "/cookies/resources/dropSecure.py")
//
// erase cookie value and set for expiration
function erase_cookie_from_js(name) {
let secure = self.location.protocol == "https:" ? "Secure" : "";
document.cookie = `${name}=0; path=/; expires=${new Date(0).toUTCString()}; ${secure}`;
function erase_cookie_from_js(name, params) {
document.cookie = `${name}=0; expires=${new Date(0).toUTCString()}; ${params};`;
var re = new RegExp("(?:^|; )" + name);
assert_equals(re.test(document.cookie), false, "Sanity check: " + name + " has been deleted.");
}

View file

@ -8,7 +8,7 @@
<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="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<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="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<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="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<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="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<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="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<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="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/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="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -10,7 +10,7 @@
<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="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -10,7 +10,7 @@
<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="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -1,39 +0,0 @@
'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

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

View file

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

View file

@ -8,7 +8,7 @@
<meta name="assert" content="float supports only the grammar 'left | right | top | bottom | start | end | none | <page-floats>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="float supports the full grammar 'left | right | top | bottom | start | end | none | <page-floats>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="height supports only the grammar '[<length> | <percentage>] | available | min-content | max-content | fit-content | complex | auto'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="height supports the full grammar '[<length> | <percentage>] | available | min-content | max-content | fit-content | complex | auto'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

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

View file

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

View file

@ -8,7 +8,7 @@
<meta name="assert" content="max-height supports only the grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content | none'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="max-height supports the full grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content | none'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="max-width supports only the grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content | none'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="max-width supports the full grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content | none'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="min-height supports only the grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="min-height supports the full grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="min-width supports only the grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="min-width supports the full grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="overflow supports only the grammar '[ visible | hidden | scroll | auto | no-display | no-content ]{1,2}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="overflow supports the full grammar '[ visible | hidden | scroll | auto | no-display | no-content ]{1,2}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

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

View file

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

View file

@ -1,39 +0,0 @@
'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

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

View file

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

View file

@ -8,7 +8,7 @@
<meta name="assert" content="width supports only the grammar '[<length> | <percentage>] | available | min-content | max-content | fit-content | auto'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="width supports the full grammar '[<length> | <percentage>] | available | min-content | max-content | fit-content | auto'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<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>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<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>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -1,39 +0,0 @@
'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

@ -8,7 +8,7 @@
<meta name="assert" content="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="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="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="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

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

View file

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

View file

@ -1,39 +0,0 @@
'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

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

View file

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

View file

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

View file

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

View file

@ -8,7 +8,7 @@
<meta name="assert" content="image-rendering supports only the grammar 'auto | smooth | high-quality | crisp-edges | pixelated'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="image-rendering supports the full grammar 'auto | smooth | high-quality | crisp-edges | pixelated'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="image-resolution supports only the grammar '[ from-image || <resolution> ] && snap?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="image-resolution supports the full grammar '[ from-image || <resolution> ] && snap?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="object-fit supports only the grammar 'fill | none | [contain | cover] || scale-down'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

@ -8,7 +8,7 @@
<meta name="assert" content="object-fit supports the full grammar 'fill | none | [contain | cover] || scale-down'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/parsing-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

View file

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

View file

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

View file

@ -1,39 +0,0 @@
'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,28 @@
<!DOCTYPE html>
<title>CSS Test: mask-image: url(image.svg#hash)</title>
<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#mask-layer-image">
<link rel="match" href="reference/mask-image-ref.html">
<meta name="assert" content="mask-image can use an SVG file as an image with element reference">
<style>
#back {
position: absolute;
box-sizing: border-box;
width: 200px;
height: 200px;
border: 60px solid green;
background: red;
}
#front {
position: absolute;
box-sizing: border-box;
width: 200px;
height: 200px;
border: 40px solid red;
background: green;
mask-image: url(support/image-with-ref.svg#ref);
}
</style>
<p>The test passes if there is a green square and no red below.</p>
<div id="back"></div><div id="front"></div>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<title>CSS Test: mask-image: url(image.svg)</title>
<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#mask-layer-image">
<link rel="match" href="reference/mask-image-ref.html">
<meta name="assert" content="mask-image can use an SVG file as an image">
<style>
#back {
position: absolute;
box-sizing: border-box;
width: 200px;
height: 200px;
border: 60px solid green;
background: red;
}
#front {
position: absolute;
box-sizing: border-box;
width: 200px;
height: 200px;
border: 40px solid red;
background: green;
mask-image: url(support/image.svg);
}
</style>
<p>The test passes if there is a green square and no red below.</p>
<div id="back"></div><div id="front"></div>

Some files were not shown because too many files have changed in this diff Show more