Update web-platform-tests to revision 0d318188757a9c996e20b82db201fd04de5aa255

This commit is contained in:
James Graham 2015-03-27 09:15:38 +00:00
parent b2a5225831
commit 1a81b18b9f
12321 changed files with 544385 additions and 6 deletions

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>CharacterData.replaceData</title>
<link rel=help href="https://dom.spec.whatwg.org/#dom-characterdata-replacedata">
<link rel=help href="https://dom.spec.whatwg.org/#dom-characterdata-data">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
function testNode(node) {
test(function() {
assert_throws("INDEX_SIZE_ERR", function() { node.replaceData(5, 1, "x") })
assert_throws("INDEX_SIZE_ERR", function() { node.replaceData(5, 0, "") })
node.replaceData(2, 10, "yo")
assert_equals(node.data, "teyo")
})
test(function() {
node.data = "test"
assert_equals(node.data, "test")
node.replaceData(1, 1, "waddup")
assert_equals(node.data, "twaddupst")
node.replaceData(1, 1, "yup")
assert_equals(node.data, "tyupaddupst")
})
}
test(function() {
testNode(document.createTextNode("test"))
testNode(document.createComment("test"))
})
</script>