Update web-platform-tests to revision ac16628eb7eb601957382053011363d2bcf8ce44

This commit is contained in:
WPT Sync Bot 2020-02-17 08:20:12 +00:00
parent ea7e753cea
commit 7e7c8873e4
4408 changed files with 664787 additions and 857286 deletions

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Stylesheet in XHTML HEAD with @import blocking scripts</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="testlib/testlib.js"></script>
<!-- this stylesheet blocks scripts -->
<link rel="stylesheet" href="css/import.css?pipe=trickle(d2)" />
</head>
<body>
<div id="test">Test</div>
<script>
test(function() {
assert_equals(getComputedStyle(document.getElementById("test")).position,
"fixed");
});
</script>
</body>
</html>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Stylesheet in XHTML HEAD blocking scripts</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="testlib/testlib.js"></script>
<!-- this stylesheet blocks scripts -->
<link rel="stylesheet" href="css/background.css?pipe=trickle(d2)" />
</head>
<body>
<div id="test">Test</div>
<script>
test(function() {
assert_equals(getComputedStyle(document.getElementById("test")).position,
"fixed");
});
</script>
</body>
</html>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Stylesheet in XHTML BODY with @import blocking scripts</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="testlib/testlib.js"></script>
</head>
<body>
<div id="log">FAILED (This TC requires JavaScript enabled)</div>
<div id="test">Test</div>
<!-- this stylesheet blocks scripts -->
<link rel="stylesheet" href="css/import.css?pipe=trickle(d2)" />
<script>
test(function() {
assert_equals(getComputedStyle(document.getElementById("test")).position,
"fixed");
});
</script>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title>Stylesheet in BODY with @import blocking scripts</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="testlib/testlib.js"></script>
</head>
<body>
<div id="test">Test</div>
<!-- this stylesheet blocks scripts -->
<link rel="stylesheet" href="css/import.css?pipe=trickle(d2)">
<script>
test(function() {
assert_equals(getComputedStyle(document.getElementById("test")).position,
"fixed");
});
</script>
</body>
</html>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Stylesheet in XHTML BODY blocking scripts</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="testlib/testlib.js"></script>
</head>
<body>
<div id="test">Test</div>
<!-- this stylesheet blocks scripts -->
<link rel="stylesheet" href="css/background.css?pipe=trickle(d2)" />
<script>
test(function() {
assert_equals(getComputedStyle(document.getElementById("test")).position,
"fixed");
});
</script>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title>Stylesheet in BODY blocking scripts</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="testlib/testlib.js"></script>
</head>
<body>
<div id="test">Test</div>
<!-- this stylesheet blocks scripts -->
<link rel="stylesheet" href="css/background.css?pipe=trickle(d2)">
<script>
test(function() {
assert_equals(getComputedStyle(document.getElementById("test")).position,
"fixed");
});
</script>
</body>
</html>

View file

@ -18,7 +18,7 @@ const cases = [
for (const [label, specifier] of cases) {
promise_test(t => {
return promise_rejects(t, new TypeError, import(specifier));
return promise_rejects_js(t, TypeError, import(specifier));
}, "import() must reject when there is a " + label);
promise_test(async t => {
@ -28,8 +28,8 @@ for (const [label, specifier] of cases) {
const promise1 = import(specifier + suffix);
const promise2 = import(specifier + suffix);
await promise_rejects(t, new TypeError, promise1, "It must reject the first time");
await promise_rejects(t, new TypeError, promise2, "It must reject the second time");
await promise_rejects_js(t, TypeError, promise1, "It must reject the first time");
await promise_rejects_js(t, TypeError, promise2, "It must reject the second time");
const error1 = await promise1.catch(e => e);
const error2 = await promise2.catch(e => e);

View file

@ -6,16 +6,16 @@
<script type="module">
const cases = [
["parse error", "../syntaxerror.js", new SyntaxError],
["bad module specifier", "does-not-start-with-dot.js", new TypeError, { differentErrorObjects: true }],
["bad module specifier in a dependency", "../bad-module-specifier.js", new TypeError],
["instantiation error", "../instantiation-error-1.js", new SyntaxError, { differentErrorObjects: true }],
["evaluation error", "../throw-error.js", new Error]
["parse error", "../syntaxerror.js", SyntaxError],
["bad module specifier", "does-not-start-with-dot.js", TypeError, { differentErrorObjects: true }],
["bad module specifier in a dependency", "../bad-module-specifier.js", TypeError],
["instantiation error", "../instantiation-error-1.js", SyntaxError, { differentErrorObjects: true }],
["evaluation error", "../throw-error.js", Error]
];
for (const [label, specifier, error, { differentErrorObjects } = {}] of cases) {
promise_test(t => {
return promise_rejects(t, error, import(specifier));
return promise_rejects_js(t, error, import(specifier));
}, "import() must reject when there is a " + label);
const errorObjectsLabel = differentErrorObjects ? "different error objects" : "the same error object";
@ -25,8 +25,8 @@ for (const [label, specifier, error, { differentErrorObjects } = {}] of cases) {
const promise1 = import(specifier + "?x");
const promise2 = import(specifier + "?x");
await promise_rejects(t, error, promise1, "It must reject the first time");
await promise_rejects(t, error, promise2, "It must reject the second time");
await promise_rejects_js(t, error, promise1, "It must reject the first time");
await promise_rejects_js(t, error, promise2, "It must reject the second time");
const error1 = await promise1.catch(e => e);
const error2 = await promise2.catch(e => e);
@ -43,7 +43,7 @@ promise_test(t => {
delete window.before_throwing_error;
delete window.after_throwing_error;
return promise_rejects(t, new Error, import("../throw-error.js?y")).then(() => {
return promise_rejects_js(t, Error, import("../throw-error.js?y")).then(() => {
assert_true(window.before_throwing_error,
"the module script should run to a point where it throws exception");
assert_equals(window.after_throwing_error, undefined,

View file

@ -81,7 +81,7 @@ promise_test(t => {
);
dummyDiv.onclick();
return promise_rejects(t, new TypeError(), promise);
return promise_rejects_js(t, TypeError, promise);
}, "reflected inline event handlers must not inherit the nonce from the triggering script, thus fail");
promise_test(t => {
@ -99,6 +99,6 @@ promise_test(t => {
assert_equals(typeof dummyDiv.onclick, "function", "the browser must be able to parse a string containing the import() syntax into a function");
dummyDiv.click(); // different from **on**click()
return promise_rejects(t, new TypeError(), promise);
return promise_rejects_js(t, TypeError, promise);
}, "inline event handlers triggered via UA code must not inherit the nonce from the triggering script, thus fail");
</script>

View file

@ -80,7 +80,7 @@ promise_test(t => {
);
dummyDiv.onclick();
return promise_rejects(t, new TypeError(), promise);
return promise_rejects_js(t, TypeError, promise);
}, "reflected inline event handlers must not inherit the nonce from the triggering script, thus fail");
promise_test(t => {
@ -98,6 +98,6 @@ promise_test(t => {
assert_equals(typeof dummyDiv.onclick, 'function', "the browser must be able to parse a string containing the import() syntax into a function");
dummyDiv.click(); // different from **on**click()
return promise_rejects(t, new TypeError(), promise);
return promise_rejects_js(t, TypeError, promise);
}, "inline event handlers triggered via UA code must not inherit the nonce from the triggering script, thus fail");
</script>