blob: 20303061a5d533a65b2edd67017241ca75bd2605 [file] [log] [blame]
Geremy Condrac9571892012-03-05 12:32:24 -08001<html>
2<head>
3<script>
4if (window.layoutTestController) {
5 layoutTestController.dumpAsText();
6 layoutTestController.waitUntilDone();
7}
8
9function 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
18function 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
31function 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>
44This 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>
46PASS
47</body>
48</html>