mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +01:00
Add tests for CharacterDataMethods with non-BMP code points
This commit is contained in:
parent
006dd1002f
commit
dcc8f63d52
8 changed files with 143 additions and 2 deletions
|
@ -78,6 +78,16 @@ function testNode(create, type) {
|
|||
node.deleteData(45, 2);
|
||||
assert_equals(node.data, "This is the character data test, append 資料,更多資料");
|
||||
}, type + ".deleteData() with non-ascii data")
|
||||
|
||||
test(function() {
|
||||
var node = create()
|
||||
assert_equals(node.data, "test")
|
||||
|
||||
node.data = "🌠 test 🌠 TEST"
|
||||
|
||||
node.deleteData(5, 8); // Counting UTF-16 code units
|
||||
assert_equals(node.data, "🌠 teST");
|
||||
}, type + ".deleteData() with non-BMP data")
|
||||
}
|
||||
|
||||
testNode(function() { return document.createTextNode("test") }, "Text")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue