mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Test a non-ASCII argument to CharacterData#appendData.
This commit is contained in:
parent
173c9721c5
commit
51b06bcbaf
2 changed files with 9 additions and 7 deletions
|
@ -9,13 +9,7 @@
|
|||
<script>
|
||||
test(function() {
|
||||
var a = document.getElementsByTagName('p')[0].childNodes[0];
|
||||
assert_equals(a.data, "This is the character data");
|
||||
// append test utf8
|
||||
a.appendData(", append more 資料,測試資料");
|
||||
assert_equals(a.data, "This is the character data, append more 資料,測試資料");
|
||||
|
||||
// length test utf8
|
||||
assert_equals(a.length, 47);
|
||||
a.data = "This is the character data, append more 資料,測試資料";
|
||||
|
||||
// insert test non-utf8
|
||||
a.insertData(26, " test");
|
||||
|
|
|
@ -24,6 +24,14 @@ function testNode(create, type) {
|
|||
assert_equals(node.data, "test")
|
||||
}, type + ".appendData('')")
|
||||
|
||||
test(function() {
|
||||
var node = create()
|
||||
assert_equals(node.data, "test")
|
||||
node.appendData(", append more 資料,測試資料");
|
||||
assert_equals(node.data, "test, append more 資料,測試資料");
|
||||
assert_equals(node.length, 25);
|
||||
}, type + ".appendData(non-ASCII)")
|
||||
|
||||
test(function() {
|
||||
var node = create()
|
||||
assert_equals(node.data, "test")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue