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

Side by Side Diff: LayoutTests/fast/dom/insertedIntoDocument-sibling.html

Issue 1158433004: Remove Attr child nodes (making Attr a Node, not a ContainerNode) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address feedback Created 5 years, 6 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 if (window.testRunner) { 4 if (window.testRunner) {
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 testRunner.waitUntilDone(); 6 testRunner.waitUntilDone();
7 } 7 }
8 8
9 gc = window.gc || function() 9 gc = window.gc || function()
10 { 10 {
11 if (window.GCController) 11 if (window.GCController)
12 return GCController.collect(); 12 return GCController.collect();
13 13
14 for (var i = 0; i < 10000; ++i) 14 for (var i = 0; i < 10000; ++i)
15 var s = new String("AAAA"); 15 var s = new String("AAAA");
16 } 16 }
17 17
18 handler = function()
19 {
20 this.removeEventListener("DOMNodeRemoved", handler, false);
21 document.body.removeChild(object);
22 }
23
24 window.onload = function() 18 window.onload = function()
25 { 19 {
26 object = document.createElement("object"); 20 object = document.createElement("object");
27 21
28 object.innerHTML = "<embed width=\"2\"/><element id=\"foo\"/>"; 22 object.innerHTML = "<embed width=\"2\"/><element id=\"foo\"/>";
29 embed = object.firstChild; 23 embed = object.firstChild;
30 24
31 attr = document.createAttribute("width"); 25 attr = document.createAttribute("width");
32 object.setAttributeNode(attr); 26 object.setAttributeNode(attr);
33 attr.appendChild(document.createTextNode(1));
34 attr.childNodes[0].addEventListener("DOMNodeRemoved", handler, false);
35 27
36 document.body.appendChild(object); 28 document.body.appendChild(object);
37 29
38 object = attr = null; 30 object = attr = null;
39 gc(); 31 gc();
40 32
41 setTimeout(finishTest, 0); 33 setTimeout(finishTest, 0);
42 } 34 }
43 35
44 finishTest = function() 36 finishTest = function()
45 { 37 {
46 document.getElementById("foo"); 38 document.getElementById("foo");
47 39
48 if (window.testRunner) 40 if (window.testRunner)
49 testRunner.notifyDone(); 41 testRunner.notifyDone();
50 } 42 }
51 </script> 43 </script>
52 </head> 44 </head>
53 <body>PASS</body> 45 <body>PASS</body>
54 </html> 46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698