OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Node.removeChild</title> | 2 <title>Node.removeChild</title> |
3 <script src="../../../../resources/testharness.js"></script> | 3 <script src="../../../../resources/testharness.js"></script> |
4 <script src="../../../../resources/testharnessreport.js"></script> | 4 <script src="../../../../resources/testharnessreport.js"></script> |
5 <script src="creators.js"></script> | 5 <script src="creators.js"></script> |
6 <div id="log"></div> | 6 <div id="log"></div> |
7 <iframe src=about:blank></iframe> | 7 <iframe src=about:blank></iframe> |
8 <script> | 8 <script> |
9 var documents = [ | 9 var documents = [ |
10 [function() { return document }, "the main document"], | 10 [function() { return document }, "the main document"], |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 }, "Calling removeChild on a " + p + " from " + description + | 45 }, "Calling removeChild on a " + p + " from " + description + |
46 " with no children should throw NOT_FOUND_ERR.") | 46 " with no children should throw NOT_FOUND_ERR.") |
47 } | 47 } |
48 }); | 48 }); |
49 | 49 |
50 test(function() { | 50 test(function() { |
51 assert_throws(new TypeError(), function() { document.body.removeChild(null) }) | 51 assert_throws(new TypeError(), function() { document.body.removeChild(null) }) |
52 assert_throws(new TypeError(), function() { document.body.removeChild({'a':'b'
}) }) | 52 assert_throws(new TypeError(), function() { document.body.removeChild({'a':'b'
}) }) |
53 }, "Passing a value that is not a Node reference to removeChild should throw Typ
eError.") | 53 }, "Passing a value that is not a Node reference to removeChild should throw Typ
eError.") |
54 </script> | 54 </script> |
OLD | NEW |