mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
add tests for stylesheet responses coming out-of-order for the same element
This commit is contained in:
parent
bb2826e41f
commit
068f9608dc
7 changed files with 56 additions and 0 deletions
|
@ -8750,6 +8750,18 @@
|
|||
"url": "/_mozilla/mozilla/node_replaceChild.html"
|
||||
}
|
||||
],
|
||||
"mozilla/out-of-order-stylesheet-loads-and-imports.html": [
|
||||
{
|
||||
"path": "mozilla/out-of-order-stylesheet-loads-and-imports.html",
|
||||
"url": "/_mozilla/mozilla/out-of-order-stylesheet-loads-and-imports.html"
|
||||
}
|
||||
],
|
||||
"mozilla/out-of-order-stylesheet-loads.html": [
|
||||
{
|
||||
"path": "mozilla/out-of-order-stylesheet-loads.html",
|
||||
"url": "/_mozilla/mozilla/out-of-order-stylesheet-loads.html"
|
||||
}
|
||||
],
|
||||
"mozilla/parentNode_querySelector.html": [
|
||||
{
|
||||
"path": "mozilla/parentNode_querySelector.html",
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Out-of-order stylesheet loads for the same element happen correctly, even with imports (issue #15101)</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var link = document.createElement("link");
|
||||
link.rel = "stylesheet";
|
||||
link.href = "resources/imports-background-red.css?pipe=trickle(d3)";
|
||||
document.head.appendChild(link);
|
||||
link.href = "resources/imports-background-green.css";
|
||||
t.step_timeout(function() {
|
||||
assert_equals(getComputedStyle(document.body).getPropertyValue("background-color"), "rgb(0, 128, 0)");
|
||||
t.done();
|
||||
}, 4000);
|
||||
}, "out-of-order stylesheet loads for the same element happen correctly, even with imports");
|
||||
</script>
|
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Out-of-order stylesheet loads for the same element happen correctly (issue #15101)</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var link = document.createElement("link");
|
||||
link.rel = "stylesheet";
|
||||
link.href = "resources/background-red.css?pipe=trickle(d3)";
|
||||
document.head.appendChild(link);
|
||||
link.href = "resources/background-green.css";
|
||||
t.step_timeout(function() {
|
||||
assert_equals(getComputedStyle(document.body).getPropertyValue("background-color"), "rgb(0, 128, 0)");
|
||||
t.done();
|
||||
}, 4000);
|
||||
}, "out-of-order stylesheet loads for the same element happen correctly");
|
||||
</script>
|
|
@ -0,0 +1,3 @@
|
|||
body {
|
||||
background-color: green;
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
body {
|
||||
background-color: red;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
@import url("background-green.css");
|
|
@ -0,0 +1 @@
|
|||
@import url("background-red.css");
|
Loading…
Add table
Add a link
Reference in a new issue