| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
| 3 <title>Node.replaceChild</title> | 3 <title>Node.replaceChild</title> |
| 4 <script src="../../../../resources/testharness.js"></script> | 4 <script src="/resources/testharness.js"></script> |
| 5 <script src="../../../../resources/testharnessreport.js"></script> | 5 <script src="/resources/testharnessreport.js"></script> |
| 6 <body><a><b></b><c></c></a> | 6 <body><a><b></b><c></c></a> |
| 7 <div id="log"></div> | 7 <div id="log"></div> |
| 8 <script> | 8 <script> |
| 9 // IDL. | 9 // IDL. |
| 10 test(function() { | 10 test(function() { |
| 11 var a = document.createElement("div"); | 11 var a = document.createElement("div"); |
| 12 assert_throws(new TypeError(), function() { | 12 assert_throws(new TypeError(), function() { |
| 13 a.replaceChild(null, null); | 13 a.replaceChild(null, null); |
| 14 }); | 14 }); |
| 15 | 15 |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 gBody.appendChild(parent); | 336 gBody.appendChild(parent); |
| 337 var child = document.createElement("div"); | 337 var child = document.createElement("div"); |
| 338 parent.appendChild(child); | 338 parent.appendChild(child); |
| 339 var df = document.createDocumentFragment(); | 339 var df = document.createDocumentFragment(); |
| 340 var fragChild = df.appendChild(document.createElement("div")); | 340 var fragChild = df.appendChild(document.createElement("div")); |
| 341 fragChild.setAttribute("id", TEST_ID); | 341 fragChild.setAttribute("id", TEST_ID); |
| 342 parent.replaceChild(df, child); | 342 parent.replaceChild(df, child); |
| 343 assert_equals(document.getElementById(TEST_ID), fragChild, "should not be null
"); | 343 assert_equals(document.getElementById(TEST_ID), fragChild, "should not be null
"); |
| 344 }, "Replacing an element with a DocumentFragment should allow a child of the Doc
umentFragment to be found by Id.") | 344 }, "Replacing an element with a DocumentFragment should allow a child of the Doc
umentFragment to be found by Id.") |
| 345 </script> | 345 </script> |
| OLD | NEW |