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: third_party/WebKit/LayoutTests/fast/dom/Range/remove-all-children-crash.html

Issue 2847943002: Cleanup LayoutTests that define a function gc(). (Closed)
Patch Set: Fixing Layout Tests Failures Created 3 years, 7 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
OLDNEW
1 <body> 1 <body>
2 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=28697">bug 28697</a >.</p> 2 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=28697">bug 28697</a >.</p>
3 <div id="div"><p id="one"></p><p id="two">FAIL, the test did not start.</p></div > 3 <div id="div"><p id="one"></p><p id="two">FAIL, the test did not start.</p></div >
4 <script src="../../../resources/gc.js"></script>
4 <script> 5 <script>
5 if (window.testRunner) 6 if (window.testRunner)
6 testRunner.dumpAsText(); 7 testRunner.dumpAsText();
7 8
8 function gc() {
9 if (typeof GCController !== "undefined")
10 GCController.collect();
11 else {
12 function gcRec(n) {
13 if (n < 1)
14 return {};
15 var temp = {i: "ab" + i + (i / 100000)};
16 temp += "foo";
17 gcRec(n-1);
18 }
19 for (var i = 0; i < 1000; i++)
20 gcRec(10)
21 }
22 }
23
24 var div = document.getElementById("div"); 9 var div = document.getElementById("div");
25 var two = document.getElementById("two"); 10 var two = document.getElementById("two");
26 var range = document.createRange(); 11 var range = document.createRange();
27 range.setStart(two, 0); 12 range.setStart(two, 0);
28 range.setEnd(two, 0); 13 range.setEnd(two, 0);
29 14
30 div.innerHTML = "FAIL, the test did not complete."; 15 div.innerHTML = "FAIL, the test did not complete.";
31 16
32 gc(); 17 gc();
33 18
34 range.startOffset; 19 range.startOffset;
35 div.innerHTML = "PASS, the test did not crash."; 20 div.innerHTML = "PASS, the test did not crash.";
36 if (window.testRunner) { 21 if (window.testRunner) {
37 testRunner.notifyDone(); 22 testRunner.notifyDone();
38 } 23 }
39 </script> 24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698