aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/wpt/mozilla/meta/MANIFEST.json12
-rw-r--r--tests/wpt/mozilla/tests/mozilla/out-of-order-stylesheet-loads-and-imports.html18
-rw-r--r--tests/wpt/mozilla/tests/mozilla/out-of-order-stylesheet-loads.html18
-rw-r--r--tests/wpt/mozilla/tests/mozilla/resources/background-green.css3
-rw-r--r--tests/wpt/mozilla/tests/mozilla/resources/background-red.css3
-rw-r--r--tests/wpt/mozilla/tests/mozilla/resources/imports-background-green.css1
-rw-r--r--tests/wpt/mozilla/tests/mozilla/resources/imports-background-red.css1
7 files changed, 56 insertions, 0 deletions
diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json
index 98dbd60fcbb..7da1322edce 100644
--- a/tests/wpt/mozilla/meta/MANIFEST.json
+++ b/tests/wpt/mozilla/meta/MANIFEST.json
@@ -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",
diff --git a/tests/wpt/mozilla/tests/mozilla/out-of-order-stylesheet-loads-and-imports.html b/tests/wpt/mozilla/tests/mozilla/out-of-order-stylesheet-loads-and-imports.html
new file mode 100644
index 00000000000..d22ae59c689
--- /dev/null
+++ b/tests/wpt/mozilla/tests/mozilla/out-of-order-stylesheet-loads-and-imports.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>
diff --git a/tests/wpt/mozilla/tests/mozilla/out-of-order-stylesheet-loads.html b/tests/wpt/mozilla/tests/mozilla/out-of-order-stylesheet-loads.html
new file mode 100644
index 00000000000..0ed15447bc1
--- /dev/null
+++ b/tests/wpt/mozilla/tests/mozilla/out-of-order-stylesheet-loads.html
@@ -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>
diff --git a/tests/wpt/mozilla/tests/mozilla/resources/background-green.css b/tests/wpt/mozilla/tests/mozilla/resources/background-green.css
new file mode 100644
index 00000000000..9d9d772fb46
--- /dev/null
+++ b/tests/wpt/mozilla/tests/mozilla/resources/background-green.css
@@ -0,0 +1,3 @@
+body {
+ background-color: green;
+}
diff --git a/tests/wpt/mozilla/tests/mozilla/resources/background-red.css b/tests/wpt/mozilla/tests/mozilla/resources/background-red.css
new file mode 100644
index 00000000000..aa1634c2550
--- /dev/null
+++ b/tests/wpt/mozilla/tests/mozilla/resources/background-red.css
@@ -0,0 +1,3 @@
+body {
+ background-color: red;
+}
diff --git a/tests/wpt/mozilla/tests/mozilla/resources/imports-background-green.css b/tests/wpt/mozilla/tests/mozilla/resources/imports-background-green.css
new file mode 100644
index 00000000000..5d5cb67763d
--- /dev/null
+++ b/tests/wpt/mozilla/tests/mozilla/resources/imports-background-green.css
@@ -0,0 +1 @@
+@import url("background-green.css");
diff --git a/tests/wpt/mozilla/tests/mozilla/resources/imports-background-red.css b/tests/wpt/mozilla/tests/mozilla/resources/imports-background-red.css
new file mode 100644
index 00000000000..c7f68081044
--- /dev/null
+++ b/tests/wpt/mozilla/tests/mozilla/resources/imports-background-red.css
@@ -0,0 +1 @@
+@import url("background-red.css");