| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/testharness.js"></script> | 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> | 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <script> | 4 <script> |
| 5 | 5 |
| 6 test(function () { | 6 test(function () { |
| 7 var child = document.createElement('p'); | 7 var child = document.createElement('p'); |
| 8 assert_true('after' in child); | 8 assert_true('after' in child); |
| 9 var after = 'mine'; | 9 var after = 'mine'; |
| 10 var getAttribute = 'mine'; | 10 var getAttribute = 'mine'; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 var expected = innerHTML + '<x></x>21<y></y>'; | 132 var expected = innerHTML + '<x></x>21<y></y>'; |
| 133 assert_equals(parent.innerHTML, expected); | 133 assert_equals(parent.innerHTML, expected); |
| 134 }, nodeName + '.after() with one sibling of child and text as arguments.'); | 134 }, nodeName + '.after() with one sibling of child and text as arguments.'); |
| 135 | 135 |
| 136 test(function() { | 136 test(function() { |
| 137 var x = document.createElement('x'); | 137 var x = document.createElement('x'); |
| 138 var y = document.createElement('y'); | 138 var y = document.createElement('y'); |
| 139 x.after(y); | 139 x.after(y); |
| 140 assert_equals(x.nextSibling, null); | 140 assert_equals(x.nextSibling, null); |
| 141 }, nodeName + '.after() on a child without any parent.'); | 141 }, nodeName + '.after() on a child without any parent.'); |
| 142 |
| 143 test(function() { |
| 144 var parent = document.createElement('div'); |
| 145 parent.appendChild(child); |
| 146 var doc2 = document.implementation.createDocument("http://www.w3.org/199
9/xhtml", "html"); |
| 147 assert_throws('HierarchyRequestError', () => { child.after(doc2, "foo")
}); |
| 148 assert_equals(parent.firstChild, child); |
| 149 }, nodeName + '.after() with a Document as an argument should throw.'); |
| 142 } | 150 } |
| 143 | 151 |
| 144 test_after('Comment'); | 152 test_after('Comment'); |
| 145 test_after('Element'); | 153 test_after('Element'); |
| 146 test_after('Text'); | 154 test_after('Text'); |
| 147 | 155 |
| 148 </script> | 156 </script> |
| 149 </html> | 157 </html> |
| OLD | NEW |