Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <script src="../../resources/js-test.js"></script> | |
| 3 <body> | |
| 4 <div><i></i><table><b><p><iframe></iframe><script> | |
| 5 /** | |
|
esprehn
2015/08/12 19:42:19
single star
| |
| 6 The adoption agency algorithm, step 10, will end up calling | |
| 7 ContainerNode::parserInsertBefore with the following arguments: | |
| 8 | |
| 9 |this| == <div> | |
| 10 |newChild| == <p> | |
| 11 |nextChild| == <table> | |
| 12 | |
| 13 parserInsertBefore calls parserRemoveChild(newChild), which | |
| 14 triggers the unload event in the contained iframe. | |
| 15 **/ | |
|
esprehn
2015/08/12 19:42:19
ditto
| |
| 16 | |
| 17 var containerNode = document.querySelector('div'); | |
| 18 var firstChild = document.querySelector('i'); | |
|
esprehn
2015/08/12 19:42:18
double quotes for all these
| |
| 19 var nextChild = document.querySelector('table'); | |
| 20 | |
| 21 frames[0].onunload = function() { | |
| 22 containerNode.removeChild(nextChild); | |
| 23 } | |
| 24 </script></b></p><!--This order is intentional to force reparenting--></table></ div> | |
| 25 <script> | |
| 26 description("Ensure that DOM is consistent after a specific child has been remov ed during reparenting.") | |
| 27 shouldBe("containerNode.childNodes[0]", "firstChild"); | |
|
esprehn
2015/08/12 19:42:18
.firstChild
| |
| 28 shouldBe("nextChild.previousSibling", "null"); | |
| 29 </script> | |
| 30 </body> | |
| OLD | NEW |