mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update web-platform-tests to revision 74bae78af4b95a2f0ca3a81df9c7fe3143f24bbc
This commit is contained in:
parent
fb95f9df9c
commit
02c1eed999
150 changed files with 2395 additions and 829 deletions
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Dom Farolino" href="mailto:dom@chromium.org">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/links.html#link-type-stylesheet">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var saw_link_onerror = false;
|
||||
var t = async_test("Check if the stylesheet's error event is fired before the " +
|
||||
"pending parsing-blocking script is unblocked");
|
||||
</script>
|
||||
<link href="nonexistent.css" rel="stylesheet" id="style_test"
|
||||
onload="t.unreached_func('Sheet should fail to load')"
|
||||
onerror="t.step(function() { saw_link_onerror = true; })">
|
||||
<script>
|
||||
t.step(function() {
|
||||
assert_true(saw_link_onerror, "The pending parsing-blocking script should " +
|
||||
"only run after the last element that " +
|
||||
"contributes a script-blocking style " +
|
||||
"sheet's error event is fired if the sheet " +
|
||||
"fails to load.");
|
||||
});
|
||||
t.done();
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
|
@ -11,7 +11,7 @@ window.addEventListener('load', t.step_func_done(function() {
|
|||
}));
|
||||
</script>
|
||||
<link href="style.css?pipe=trickle(d3)" rel="stylesheet" id="style_test"
|
||||
onload="t.step(function() { saw_link_onload = true; });"
|
||||
onerror="t.step(function() { assert_unreached('Sheet should load OK'); });"></link>
|
||||
onload="t.step(function() { saw_link_onload = true; })"
|
||||
onerror="t.unreached_func('Sheet should load OK')">
|
||||
</head>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Dom Farolino" href="mailto:dom@chromium.org">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/links.html#link-type-stylesheet">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var saw_link_onload = false;
|
||||
var t = async_test("Check if the stylesheet's load event is fired before the " +
|
||||
"pending parsing-blocking script is unblocked");
|
||||
</script>
|
||||
<link href="style.css?pipe=trickle(d3)" rel="stylesheet" id="style_test"
|
||||
onload="t.step(function() { saw_link_onload = true; })"
|
||||
onerror="t.unreached_func('Sheet should load OK')">
|
||||
<script>
|
||||
t.step(function() {
|
||||
assert_true(saw_link_onload, "The pending parsing-blocking script should " +
|
||||
"only run after the last element that " +
|
||||
"contributes a script-blocking style " +
|
||||
"sheet's load event is fired.");
|
||||
});
|
||||
t.done();
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
|
@ -0,0 +1,3 @@
|
|||
body {
|
||||
background-color: gray;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Dom Farolino" href="mailto:dom@chromium.org">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/links.html#link-type-stylesheet">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link href="style.css?pipe=trickle(d3)" rel="stylesheet" id="style_test">
|
||||
<script>
|
||||
test(function() {
|
||||
assert_true(document.styleSheets.length === 1 &&
|
||||
document.styleSheets[0].href.includes("style.css"),
|
||||
"The style sheet 'style.css' must be available to scripts");
|
||||
|
||||
style_test.href = "resources/neutral.css?pipe=trickle(d3)";
|
||||
|
||||
assert_true(document.styleSheets.length === 1 &&
|
||||
document.styleSheets[0].href.includes("style.css"),
|
||||
"The style sheet 'style.css' must remain accessible to " +
|
||||
"scripts until its replacement has finished loading");
|
||||
}, "Check that a style sheet loaded by a <link> is available until its successor is loaded");
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue