mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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
|
@ -121,6 +121,15 @@ function testNode(create, type) {
|
|||
assert_equals(node.substringData(12, 4), "char")
|
||||
assert_equals(node.substringData(39, 2), "資料")
|
||||
}, type + ".substringData() with non-ASCII data")
|
||||
|
||||
test(function() {
|
||||
var node = create()
|
||||
assert_equals(node.data, "test")
|
||||
|
||||
node.data = "🌠 test 🌠 TEST"
|
||||
|
||||
assert_equals(node.substringData(5, 8), "st 🌠 TE") // Counting UTF-16 code units
|
||||
}, type + ".substringData() with non-BMP data")
|
||||
}
|
||||
|
||||
testNode(function() { return document.createTextNode("test") }, "Text")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue