Geremy Condra | c957189 | 2012-03-05 12:32:24 -0800 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
| 3 | <script> |
| 4 | if (window.layoutTestController) { |
| 5 | layoutTestController.dumpAsText(); |
| 6 | layoutTestController.waitUntilDone(); |
| 7 | } |
| 8 | |
| 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() |
| 19 | { |
| 20 | var element = document.createElement('input'); |
| 21 | element.setAttribute('form', 'form1'); |
| 22 | var div = document.createElement('div'); |
| 23 | div.appendChild(element); |
| 24 | element.removeAttribute('form'); |
| 25 | div.innerHTML = ''; |
| 26 | element = 0; |
| 27 | gc(); |
| 28 | setTimeout(delay, 0); |
| 29 | } |
| 30 | |
| 31 | function delay() |
| 32 | { |
| 33 | var form = document.createElement('form'); |
| 34 | form.setAttribute('id', 'form2'); |
| 35 | document.body.appendChild(form); |
| 36 | location.reload(); |
| 37 | if (window.layoutTestController) |
| 38 | layoutTestController.notifyDone(); |
| 39 | } |
| 40 | </script> |
| 41 | </head> |
| 42 | <body onload="test()"> |
| 43 | <p> |
| 44 | This page is a test case for <a href="https://bugs.webkit.org/show_bug.cgi?id=51905">Bug 51905</a>. WebKit should not crash when this page is loaded. |
| 45 | </p> |
| 46 | PASS |
| 47 | </body> |
| 48 | </html> |