| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> |
| 3 <body> |
| 4 <b><p><iframe src="javascript:onunload = function() { |
| 5 if(!top.container) { |
| 6 top.container = document.createElement('div'); |
| 7 top.container.appendChild(frameElement.parentNode); |
| 8 } |
| 9 }"></iframe></b></p><!-- This order is intentional to force reparenting of ifram
e --> |
| 10 <script> |
| 11 description("Ensure that iframe onunload event handler triggered during reparent
ing that modifies the reparented DOM doesn't corrupt DOM.") |
| 12 var iframe = document.querySelector("iframe"); |
| 13 shouldBe("iframe", "iframe.parentNode.firstChild"); |
| 14 var parentNode = iframe.parentNode; |
| 15 shouldBe("parentNode", "parentNode.parentNode.firstChild"); |
| 16 </script> |
| 17 </body> |
| OLD | NEW |