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

Side by Side Diff: LayoutTests/fast/dom/node-iterator-reference-node-moved-crash.html

Issue 106773003: Make arguments to Document methods non-optional (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years 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 function gc() 9 function gc()
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++) { // force garbage collection (F F requires about 9K allocations before a collect). 14 for (var i = 0; i < 10000; i++) { // force garbage collection (F F requires about 9K allocations before a collect).
15 var s = new String("abc"); 15 var s = new String("abc");
16 } 16 }
17 } 17 }
18 18
19 function runTest() 19 function runTest()
20 { 20 {
21 iteratorRoot = document.createElement(); 21 iteratorRoot = document.createElement('div');
22 element = iteratorRoot.appendChild(document.createElement()); 22 element = iteratorRoot.appendChild(document.createElement('div') );
23 element.appendChild(document.createElement()); 23 element.appendChild(document.createElement('div'));
24 24
25 iterator = document.createNodeIterator(iteratorRoot, -1); 25 iterator = document.createNodeIterator(iteratorRoot, -1);
26 iterator.nextNode(); iterator.nextNode(); iterator.nextNode(); 26 iterator.nextNode(); iterator.nextNode(); iterator.nextNode();
27 iterator.previousNode(); 27 iterator.previousNode();
28 28
29 iteratorRoot.removeChild(element); 29 iteratorRoot.removeChild(element);
30 30
31 otherDocument = document.implementation.createHTMLDocument(); 31 otherDocument = document.implementation.createHTMLDocument();
32 otherDocument.body.appendChild(iteratorRoot); 32 otherDocument.body.appendChild(iteratorRoot);
33 33
34 delete iterator; 34 delete iterator;
35 gc(); 35 gc();
36 div = document.body.appendChild(document.createElement('div')); 36 div = document.body.appendChild(document.createElement('div'));
37 document.body.removeChild(div); 37 document.body.removeChild(div);
38 gc(); 38 gc();
39 39
40 if (window.testRunner) 40 if (window.testRunner)
41 testRunner.notifyDone(); 41 testRunner.notifyDone();
42 } 42 }
43 </script> 43 </script>
44 </head> 44 </head>
45 <body onload="runTest()"> 45 <body onload="runTest()">
46 Test passes if it does not crash. 46 Test passes if it does not crash.
47 </body> 47 </body>
48 </html> 48 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/id-attribute-shared.html ('k') | LayoutTests/fast/dom/normalize-attributes-mutation-event-crash.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698