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

Side by Side Diff: LayoutTests/fast/dom/insertedIntoDocument-child.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 object.setAttribute("form", "a"); 21 object.setAttribute("form", "a");
28 22
29 attr = document.createAttribute("width"); 23 attr = document.createAttribute("width");
30 object.setAttributeNode(attr); 24 object.setAttributeNode(attr);
31 attr.appendChild(document.createTextNode(1));
32 attr.childNodes[0].addEventListener("DOMNodeRemoved", handler, false);
33 25
34 embed = document.createElement("embed"); 26 embed = document.createElement("embed");
35 embed.setAttribute("width", 2); 27 embed.setAttribute("width", 2);
36 object.appendChild(embed); 28 object.appendChild(embed);
37 29
38 document.body.appendChild(object); 30 document.body.appendChild(object);
39 31
40 object = embed = attr = null; 32 object = embed = attr = null;
41 gc(); 33 gc();
42 34
43 setTimeout(finishTest, 0); 35 setTimeout(finishTest, 0);
44 } 36 }
45 37
46 finishTest = function() 38 finishTest = function()
47 { 39 {
48 form = document.createElement("form"); 40 form = document.createElement("form");
49 form.id = "form"; 41 form.id = "form";
50 document.body.appendChild(form); 42 document.body.appendChild(form);
51 43
52 if (window.testRunner) 44 if (window.testRunner)
53 testRunner.notifyDone(); 45 testRunner.notifyDone();
54 } 46 }
55 </script> 47 </script>
56 </head> 48 </head>
57 <body>PASS</body 49 <body>PASS</body
58 </html> 50 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698