Update web-platform-tests to revision 41a7d8732d8e5c65728c153d29a34fe9d5192b29

This commit is contained in:
James Graham 2015-05-13 16:20:27 +01:00
parent b05c3fc0c0
commit 5e8b92f3de
77 changed files with 1871 additions and 1412 deletions

View file

@ -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")