OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
| 3 <script src="../../resources/gc.js"></script> |
3 <script> | 4 <script> |
4 if (window.testRunner) { | 5 if (window.testRunner) { |
5 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
6 testRunner.waitUntilDone(); | 7 testRunner.waitUntilDone(); |
7 } | 8 } |
8 | 9 |
9 function gc() { | |
10 var array = []; | |
11 for (var i = 0x30000; i--; ) | |
12 if (!(Math.round(Math.random() * 20))) | |
13 array = []; | |
14 else | |
15 array.push(new String(Math.random())) | |
16 } | |
17 | |
18 function test() | 10 function test() |
19 { | 11 { |
20 var element = document.createElement('input'); | 12 var element = document.createElement('input'); |
21 element.setAttribute('form', 'form1'); | 13 element.setAttribute('form', 'form1'); |
22 var div = document.createElement('div'); | 14 var div = document.createElement('div'); |
23 div.appendChild(element); | 15 div.appendChild(element); |
24 element.removeAttribute('form'); | 16 element.removeAttribute('form'); |
25 div.innerHTML = ''; | 17 div.innerHTML = ''; |
26 element = 0; | 18 element = 0; |
27 gc(); | 19 gc(); |
(...skipping 11 matching lines...) Expand all Loading... |
39 } | 31 } |
40 </script> | 32 </script> |
41 </head> | 33 </head> |
42 <body onload="test()"> | 34 <body onload="test()"> |
43 <p> | 35 <p> |
44 This page is a test case for <a href="https://bugs.webkit.org/show_bug.cgi?id=51
905">Bug 51905</a>. WebKit should not crash when this page is loaded. | 36 This page is a test case for <a href="https://bugs.webkit.org/show_bug.cgi?id=51
905">Bug 51905</a>. WebKit should not crash when this page is loaded. |
45 </p> | 37 </p> |
46 PASS | 38 PASS |
47 </body> | 39 </body> |
48 </html> | 40 </html> |
OLD | NEW |