aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorCYBAI <cyb.ai.815@gmail.com>2017-11-27 02:41:07 +0800
committerCYBAI <cyb.ai.815@gmail.com>2017-11-28 11:35:01 +0800
commit96ba56c2c8600ddc14ea338dc7ead7d2fe2c695a (patch)
tree8fc3460b7e5553acf409889bb73c8bd8f95a1408 /tests
parent3a740142d93d2cb2fa66ea7a27f98eafe8e9e688 (diff)
downloadservo-96ba56c2c8600ddc14ea338dc7ead7d2fe2c695a.tar.gz
servo-96ba56c2c8600ddc14ea338dc7ead7d2fe2c695a.zip
Add tests for using replaceData to change CSS
Diffstat (limited to 'tests')
-rw-r--r--tests/wpt/metadata/MANIFEST.json25
-rw-r--r--tests/wpt/web-platform-tests/css/cssom/stylesheet-replacedata-dynamic-ref.html7
-rw-r--r--tests/wpt/web-platform-tests/css/cssom/stylesheet-replacedata-dynamic.html12
3 files changed, 44 insertions, 0 deletions
diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json
index 32fd7e9e58e..89e0a1b5f3a 100644
--- a/tests/wpt/metadata/MANIFEST.json
+++ b/tests/wpt/metadata/MANIFEST.json
@@ -154981,6 +154981,18 @@
{}
]
],
+ "css/cssom/stylesheet-replacedata-dynamic.html": [
+ [
+ "/css/cssom/stylesheet-replacedata-dynamic.html",
+ [
+ [
+ "/css/cssom/stylesheet-replacedata-dynamic-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/filter-effects/css-filters-animation-blur.html": [
[
"/css/filter-effects/css-filters-animation-blur.html",
@@ -253079,6 +253091,11 @@
{}
]
],
+ "css/cssom/stylesheet-replacedata-dynamic-ref.html": [
+ [
+ {}
+ ]
+ ],
"css/cssom/stylesheet-same-origin.css": [
[
{}
@@ -511223,6 +511240,14 @@
"875598ca4271d4adaa11fbb01981b290e6235019",
"testharness"
],
+ "css/cssom/stylesheet-replacedata-dynamic-ref.html": [
+ "e733dc40a41b899ab6c184211d75def5e52af3d4",
+ "support"
+ ],
+ "css/cssom/stylesheet-replacedata-dynamic.html": [
+ "defc259c76eb8ab8b7e3c6ad90951bf4c6f18ab3",
+ "reftest"
+ ],
"css/cssom/stylesheet-same-origin.css": [
"268fb9a72d33b3d18bbb82aaaac48bb15c89a88e",
"support"
diff --git a/tests/wpt/web-platform-tests/css/cssom/stylesheet-replacedata-dynamic-ref.html b/tests/wpt/web-platform-tests/css/cssom/stylesheet-replacedata-dynamic-ref.html
new file mode 100644
index 00000000000..bc9cadebf15
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/cssom/stylesheet-replacedata-dynamic-ref.html
@@ -0,0 +1,7 @@
+<!doctype html>
+<title>(Ref #1) CSS Test Reference</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@mozilla.com">
+<link rel="author" title="Cheng You Bai" href="mailto:cyb.ai.815@gmail.com">
+<link rel="help" href="https://dom.spec.whatwg.org/#dom-characterdata-replacedata">
+<style>.pass { color: green }</style>
+<div class="pass">Should be green</div> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/cssom/stylesheet-replacedata-dynamic.html b/tests/wpt/web-platform-tests/css/cssom/stylesheet-replacedata-dynamic.html
new file mode 100644
index 00000000000..3ee5937c959
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/cssom/stylesheet-replacedata-dynamic.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<title>(Test #1) CSS Test: Dynamic changes to the stylesheet contents using replaceData are reflected</title>
+<link rel="match" href="stylesheet-replacedata-dynamic-ref.html">
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@mozilla.com">
+<link rel="author" title="Cheng You Bai" href="mailto:cyb.ai.815@gmail.com">
+<link rel="help" href="https://dom.spec.whatwg.org/#dom-characterdata-replacedata">
+<style>.fail { color: green }</style>
+<div class="pass">Should be green</div>
+<script>
+ document.body.offsetTop;
+ document.querySelector('style').firstChild.replaceData(1, 4, "pass");
+</script> \ No newline at end of file