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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/custom/tref-clone-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 <svg xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()"> 1 <svg xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()">
2 <defs> 2 <defs>
3 <style id="style"/> 3 <style id="style"/>
4 <text id="ref"></text> 4 <text id="ref"></text>
5 </defs> 5 </defs>
6 <g><use xlink:href="#ref"/></g> 6 <g><use xlink:href="#ref"/></g>
7 <g><text><tref id="tref" xlink:href="#ref"/></text></g> 7 <g><text><tref id="tref" xlink:href="#ref"/></text></g>
8 <script src="../../resources/gc.js"></script>
8 <script> 9 <script>
9 function gc() {
10 if (window.GCController)
11 GCController.collect();
12 else {
13 for (var i = 0; i < 10000; ++i)
14 new Object;
15 }
16 }
17 if (window.testRunner) { 10 if (window.testRunner) {
18 testRunner.dumpAsText(); 11 testRunner.dumpAsText();
19 testRunner.waitUntilDone(); 12 testRunner.waitUntilDone();
20 } 13 }
21 function runTest() { 14 function runTest() {
22 var tref = document.getElementById("tref"); 15 var tref = document.getElementById("tref");
23 tref.cloneNode(true); 16 tref.cloneNode(true);
24 gc(); 17 gc();
25 var elem = document.getElementById("style"); 18 var elem = document.getElementById("style");
26 var parent = elem.parentNode; 19 var parent = elem.parentNode;
27 parent.insertBefore(document.createElement("source"), elem); 20 parent.insertBefore(document.createElement("source"), elem);
28 document.body.innerHTML = "PASS"; 21 document.body.innerHTML = "PASS";
29 if (window.testRunner) 22 if (window.testRunner)
30 testRunner.notifyDone(); 23 testRunner.notifyDone();
31 } 24 }
32 </script> 25 </script>
33 </svg> 26 </svg>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698