| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
| 3 <title>CharacterData.insertData</title> | 3 <title>CharacterData.insertData</title> |
| 4 <link rel=help href="https://dom.spec.whatwg.org/#dom-characterdata-insertdata"> | 4 <link rel=help href="https://dom.spec.whatwg.org/#dom-characterdata-insertdata"> |
| 5 <link rel=help href="https://dom.spec.whatwg.org/#dom-characterdata-data"> | 5 <link rel=help href="https://dom.spec.whatwg.org/#dom-characterdata-data"> |
| 6 <script src="../../../../resources/testharness.js"></script> | 6 <script src="/resources/testharness.js"></script> |
| 7 <script src="../../../../resources/testharnessreport.js"></script> | 7 <script src="/resources/testharnessreport.js"></script> |
| 8 <div id="log"></div> | 8 <div id="log"></div> |
| 9 <script> | 9 <script> |
| 10 function testNode(create, type) { | 10 function testNode(create, type) { |
| 11 test(function() { | 11 test(function() { |
| 12 var node = create() | 12 var node = create() |
| 13 assert_equals(node.data, "test") | 13 assert_equals(node.data, "test") |
| 14 | 14 |
| 15 assert_throws("INDEX_SIZE_ERR", function() { node.insertData(5, "x") }) | 15 assert_throws("INDEX_SIZE_ERR", function() { node.insertData(5, "x") }) |
| 16 assert_throws("INDEX_SIZE_ERR", function() { node.insertData(5, "") }) | 16 assert_throws("INDEX_SIZE_ERR", function() { node.insertData(5, "") }) |
| 17 }, type + ".insertData() out of bounds") | 17 }, type + ".insertData() out of bounds") |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 node.data = "🌠test 🌠TEST" | 81 node.data = "🌠test 🌠TEST" |
| 82 | 82 |
| 83 node.insertData(5, "--"); // Counting UTF-16 code units | 83 node.insertData(5, "--"); // Counting UTF-16 code units |
| 84 assert_equals(node.data, "🌠te--st 🌠TEST"); | 84 assert_equals(node.data, "🌠te--st 🌠TEST"); |
| 85 }, type + ".insertData() with non-BMP data") | 85 }, type + ".insertData() with non-BMP data") |
| 86 } | 86 } |
| 87 | 87 |
| 88 testNode(function() { return document.createTextNode("test") }, "Text") | 88 testNode(function() { return document.createTextNode("test") }, "Text") |
| 89 testNode(function() { return document.createComment("test") }, "Comment") | 89 testNode(function() { return document.createComment("test") }, "Comment") |
| 90 </script> | 90 </script> |
| OLD | NEW |