aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-05-30 06:20:57 -0500
committerbors-servo <metajack+bors@gmail.com>2015-05-30 06:20:57 -0500
commit99b79fc248fbe94231775ddea452a465efb537bd (patch)
tree6fe3caf14e48c7c62350c883098deb720c6ab402
parentbf4fc6f388676cdc31cebc742a52e9d8896575f5 (diff)
parent18ebdf059cc8172157968fb9754703369361b120 (diff)
downloadservo-99b79fc248fbe94231775ddea452a465efb537bd.tar.gz
servo-99b79fc248fbe94231775ddea452a465efb537bd.zip
Auto merge of #6222 - Ms2ger:characterdata, r=nox
<!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6222) <!-- Reviewable:end -->
-rw-r--r--tests/wpt/mozilla/meta/MANIFEST.json6
-rw-r--r--tests/wpt/mozilla/tests/mozilla/characterdata.html27
-rw-r--r--tests/wpt/web-platform-tests/dom/nodes/CharacterData-substringData.html11
3 files changed, 10 insertions, 34 deletions
diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json
index 841aa8f1c5b..86b5ac0f31e 100644
--- a/tests/wpt/mozilla/meta/MANIFEST.json
+++ b/tests/wpt/mozilla/meta/MANIFEST.json
@@ -113,12 +113,6 @@
"url": "/_mozilla/mozilla/caption.html"
}
],
- "mozilla/characterdata.html": [
- {
- "path": "mozilla/characterdata.html",
- "url": "/_mozilla/mozilla/characterdata.html"
- }
- ],
"mozilla/child_reparenting.html": [
{
"path": "mozilla/child_reparenting.html",
diff --git a/tests/wpt/mozilla/tests/mozilla/characterdata.html b/tests/wpt/mozilla/tests/mozilla/characterdata.html
deleted file mode 100644
index 9e8bb9fd10e..00000000000
--- a/tests/wpt/mozilla/tests/mozilla/characterdata.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<html>
- <head>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <p>This is the character data</p>
- </body>
- <script>
- test(function() {
- var a = document.getElementsByTagName('p')[0].childNodes[0];
- a.data = "This is the character data test, append 資料,更多資料";
-
- // replace test non-utf8
- a.replaceData(33, 6, "other");
- assert_equals(a.data, "This is the character data test, other 資料,更多資料");
- // replace test non-utf8
- a.replaceData(44, 2, "文字");
- assert_equals(a.data, "This is the character data test, other 資料,更多文字");
-
- // substring test non-utf8
- assert_equals(a.substringData(12, 4), "char");
- // substring test utf8
- assert_equals(a.substringData(39, 2), "資料");
- });
- </script>
-</html>
diff --git a/tests/wpt/web-platform-tests/dom/nodes/CharacterData-substringData.html b/tests/wpt/web-platform-tests/dom/nodes/CharacterData-substringData.html
index 1d7288ab3f1..adcce727022 100644
--- a/tests/wpt/web-platform-tests/dom/nodes/CharacterData-substringData.html
+++ b/tests/wpt/web-platform-tests/dom/nodes/CharacterData-substringData.html
@@ -7,7 +7,6 @@
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
-// TODO: non-ASCII strings
function testNode(create, type) {
test(function() {
var node = create()
@@ -101,6 +100,16 @@ function testNode(create, type) {
assert_equals(node.substringData(0, -1), "test")
assert_equals(node.substringData(0, -0x100000000 + 2), "te")
}, type + ".substringData() with negative count")
+
+ test(function() {
+ var node = create()
+ assert_equals(node.data, "test")
+
+ node.data = "This is the character data test, other 資料,更多文字"
+
+ assert_equals(node.substringData(12, 4), "char")
+ assert_equals(node.substringData(39, 2), "資料")
+ }, type + ".substringData() with non-ASCII data")
}
testNode(function() { return document.createTextNode("test") }, "Text")