blob: 49254018fc4e2572e320e09de859214eae08f585 [file] [log] [blame]
Geremy Condrac9571892012-03-05 12:32:24 -08001<html>
2<head>
3<script>
4if (window.layoutTestController)
5 layoutTestController.dumpAsText();
6
7function gc() {
8 if (window.GCController)
9 return GCController.collect();
10
11 for (var i = 0; i < 10000; i++)
12 var s = new String("abc");
13}
14
15function crash_test(element_name) {
16 var element = document.createElement(element_name);
17 element.setAttribute('form', '1');
18 var container = document.createElement('div');
19 container.appendChild(element);
20 document.implementation.createDocument().adoptNode(container);
21 container.removeChild(element);
22 delete element;
23 gc();
24 var form = document.createElement('form');
25 form.setAttribute('id', '2');
26 document.body.appendChild(form)
27}
28
29function test() {
30 crash_test('input');
31 crash_test('object');
32 document.body.innerHTML += "PASS";
33}
34</script>
35</head>
36<body onload="test()">
37<p>
38This page is a test case for <a href="https://bugs.webkit.org/show_bug.cgi?id=51418">Bug 51418</a>. WebKit should not crash when this page is loaded.
39</p>
40</body>
41</html>