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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/dangling-form-element-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 <html> 1 <html>
2 <script src="../../resources/gc.js"></script>
2 <script> 3 <script>
3 if (window.testRunner) { 4 if (window.testRunner) {
4 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
5 testRunner.waitUntilDone(); 6 testRunner.waitUntilDone();
6 } 7 }
7 8
8 function gc() {
9 if (window.GCController)
10 return GCController.collectAll();
11 for (var i = 0; i < 10000; ++i)
12 var s = new String("foo");
13 }
14
15 function resetFormOwner() { 9 function resetFormOwner() {
16 gc(); 10 gc();
17 var form = document.createElement('form'); 11 var form = document.createElement('form');
18 form.id = 'foo'; 12 form.id = 'foo';
19 document.body.appendChild(form); 13 document.body.appendChild(form);
20 document.body.innerHTML += 'PASS'; 14 document.body.innerHTML += 'PASS';
21 if (window.testRunner) 15 if (window.testRunner)
22 testRunner.notifyDone(); 16 testRunner.notifyDone();
23 } 17 }
24 18
25 function test() { 19 function test() {
26 var div = document.createElement('div'); 20 var div = document.createElement('div');
27 var input = document.createElement('input'); 21 var input = document.createElement('input');
28 input.setAttribute('form', 'foo'); 22 input.setAttribute('form', 'foo');
29 div.appendChild(input); 23 div.appendChild(input);
30 setTimeout(resetFormOwner, 0); 24 setTimeout(resetFormOwner, 0);
31 } 25 }
32 </script> 26 </script>
33 <body onload="test()"> 27 <body onload="test()">
34 <p>Checks dangling form associated elements doesn't cause crash. WebKit should n ot crash when this page is loaded.</p> 28 <p>Checks dangling form associated elements doesn't cause crash. WebKit should n ot crash when this page is loaded.</p>
35 </body> 29 </body>
36 </html> 30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698