mirror of
https://github.com/servo/servo
synced 2026-04-30 19:37:43 +02:00
Update web-platform-tests to revision 41a7d8732d8e5c65728c153d29a34fe9d5192b29
This commit is contained in:
@@ -16,6 +16,38 @@ function testNode(create, type) {
|
||||
assert_throws("INDEX_SIZE_ERR", function() { node.insertData(5, "") })
|
||||
}, type + ".insertData() out of bounds")
|
||||
|
||||
test(function() {
|
||||
var node = create()
|
||||
assert_equals(node.data, "test")
|
||||
|
||||
assert_throws("INDEX_SIZE_ERR", function() { node.insertData(-1, "x") })
|
||||
assert_throws("INDEX_SIZE_ERR", function() { node.insertData(-0x100000000 + 5, "x") })
|
||||
}, type + ".insertData() negative out of bounds")
|
||||
|
||||
test(function() {
|
||||
var node = create()
|
||||
assert_equals(node.data, "test")
|
||||
|
||||
node.insertData(-0x100000000 + 2, "X")
|
||||
assert_equals(node.data, "teXst")
|
||||
}, type + ".insertData() negative in bounds")
|
||||
|
||||
test(function() {
|
||||
var node = create()
|
||||
assert_equals(node.data, "test")
|
||||
|
||||
node.insertData(0, "")
|
||||
assert_equals(node.data, "test")
|
||||
}, type + ".insertData('')")
|
||||
|
||||
test(function() {
|
||||
var node = create()
|
||||
assert_equals(node.data, "test")
|
||||
|
||||
node.insertData(0, "X")
|
||||
assert_equals(node.data, "Xtest")
|
||||
}, type + ".insertData() at the start")
|
||||
|
||||
test(function() {
|
||||
var node = create()
|
||||
assert_equals(node.data, "test")
|
||||
|
||||
Reference in New Issue
Block a user