Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / form-associated-element-crash.html
blob9418632187964cd61bdaedc687de1ed0aeaa164e
1 <html>
2 <head>
3 <script>
4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.waitUntilDone();
9 if (!window.gc) {
10 gc = function () {
11 if (window.GCController)
12 return GCController.collect();
13 for (var i = 0; i < 10000; i++)
14 var s = new String("abc");
18 var element = document.createElement('input');
20 function test() {
21 element.setAttribute('form', 'form1');
22 document.body.appendChild(element);
23 element.attributes.removeNamedItem('form');
24 setTimeout(delay, 0);
27 function delay() {
28 document.body.removeChild(element);
29 element = 0;
30 gc();
31 var form = document.createElement('form');
32 form.setAttribute('id', 'form2');
33 document.body.appendChild(form);
34 if (window.testRunner)
35 testRunner.notifyDone();
37 </script>
38 </head>
39 <body onload="test()">
40 <p>
41 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.
42 </p>
43 PASS
44 </body>
45 </html>