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

Side by Side Diff: LayoutTests/fast/dom/script-remove-child-id-map.html

Issue 418133003: Call insertedInto or removedFrom before childrenChanged (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <p>Passes if it doesn't crash and the child is not in the id map</p>
2 <p id="result"></p>
3
4 <script>
5 function gc()
adamk 2014/07/24 21:35:59 Please include ../../resources/gc.js instead of ro
esprehn 2014/07/24 22:50:18 done.
6 {
7 var a = [];
8 for (var i = 0; i < 300000; ++i)
9 a.push("AAAA");
10 }
11
12 if (window.testRunner)
13 testRunner.dumpAsText();
14
15 var script = document.createElement("script");
16 script.type = "dont-execute";
17 script.textContent = "script.remove()";
18 child = document.createElement("div");
19 child.id = "child";
20 script.appendChild(child);
21
22 // The script won't execute here because the type is invalid, but it also won't
23 // get marked as being already run, so changing the children later will run it.
24 document.documentElement.appendChild(script);
25
26 // Per the spec setting the type has no effect
27 script.type = "";
28
29 // but changing the children *will* execute the script now that the type is
30 // is valid.
31 child.remove();
32
33 child = null;
34 gc();
35
36 var child = document.getElementById("child");
37 document.getElementById("result").textContent = child ? "FAIL" : "PASS";
38 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/script-remove-child-id-map-expected.txt » ('j') | Source/core/dom/ContainerNode.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698