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

Side by Side Diff: LayoutTests/fast/dom/Attr/child-nodes-cache.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
(Empty)
1 <body onload="test()">
2 <p>Running test...</p>
3 <textarea id=t rows=20>textarea</textarea>
4 <script>
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.waitUntilDone();
8 }
9
10 function gc()
11 {
12 if (window.GCController)
13 return GCController.collect();
14
15 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
16 var s = new String("abc");
17 }
18 }
19
20 function test()
21 {
22 var elem = document.getElementById("t");
23 var nodes = document.getElementById("t").getAttributeNode('rows').childNodes ;
24 nodes[0]; // Prime the child node cache.
25 document.body.removeChild(document.getElementById("t"));
26 elem.getAttributeNode('rows').removeChild(nodes[0]);
27 setTimeout(function() {
28 gc();
29 try { nodes[0].textContent } catch (ex) { }
30
31 document.getElementsByTagName("p")[0].innerHTML = "PASS"
32 if (window.testRunner)
33 testRunner.notifyDone();
34 }, 0);
35 }
36 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698