Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1359)

Side by Side Diff: LayoutTests/fast/parser/scriptexec-during-parserInsertBefore.html

Issue 1283263002: parserInsertBefore: Bail out if the parent no longer contains the child. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/parser/scriptexec-during-parserInsertBefore-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/parser/scriptexec-during-parserInsertBefore-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698