| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <script> | |
| 3 if (window.layoutTestController) { | |
| 4 layoutTestController.dumpAsText(); | |
| 5 layoutTestController.waitUntilDone(); | |
| 6 } | |
| 7 | |
| 8 function gc() { | |
| 9 if (window.GCController) | |
| 10 return GCController.collect(); | |
| 11 for (var i = 0; i < 10000; ++i) | |
| 12 var s = new String("foo"); | |
| 13 } | |
| 14 | |
| 15 function resetFormOwner() { | |
| 16 gc(); | |
| 17 var form = document.createElement('form'); | |
| 18 form.id = 'foo'; | |
| 19 document.body.appendChild(form); | |
| 20 document.body.innerHTML += 'PASS'; | |
| 21 if (window.layoutTestController) | |
| 22 layoutTestController.notifyDone(); | |
| 23 } | |
| 24 | |
| 25 function test() { | |
| 26 var div = document.createElement('div'); | |
| 27 var input = document.createElement('input'); | |
| 28 input.setAttribute('form', 'foo'); | |
| 29 div.appendChild(input); | |
| 30 setTimeout(resetFormOwner, 0); | |
| 31 } | |
| 32 </script> | |
| 33 <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> | |
| 35 </body> | |
| 36 </html> | |
| OLD | NEW |