OLD | NEW |
1 <body> | 1 <body> |
2 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34520">bug 34520</a
>: | 2 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34520">bug 34520</a
>: |
3 Assertion failure in CheckedRadioButtons::removeButton when using jQuery 1.4.1.
Also tests actual | 3 Assertion failure in CheckedRadioButtons::removeButton when using jQuery 1.4.1.
Also tests actual |
4 behavior the crashing jQuery was test was checking for.</p> | 4 behavior the crashing jQuery was test was checking for.</p> |
| 5 <script src="../../../resources/gc.js"></script> |
5 <script> | 6 <script> |
6 if (window.testRunner) { | 7 if (window.testRunner) { |
7 testRunner.dumpAsText(); | 8 testRunner.dumpAsText(); |
8 testRunner.waitUntilDone(); | 9 testRunner.waitUntilDone(); |
9 } | 10 } |
10 | 11 |
11 function gc() | |
12 { | |
13 if (window.GCController) | |
14 return GCController.collect(); | |
15 | |
16 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires
about 9K allocations before a collect) | |
17 var s = new String("abc"); | |
18 } | |
19 } | |
20 | 12 |
21 try { | 13 try { |
22 var div = document.createElement("div"); | 14 var div = document.createElement("div"); |
23 div.innerHTML = "<input type='radio' name='radiotest' checked='checked'/>"; | 15 div.innerHTML = "<input type='radio' name='radiotest' checked='checked'/>"; |
24 | 16 |
25 var fragment = document.createDocumentFragment(); | 17 var fragment = document.createDocumentFragment(); |
26 fragment.appendChild(div.firstChild); | 18 fragment.appendChild(div.firstChild); |
27 | 19 |
28 var clonedInput = fragment.cloneNode(true).cloneNode(true).lastChild; | 20 var clonedInput = fragment.cloneNode(true).cloneNode(true).lastChild; |
29 document.write((clonedInput.checked && clonedInput.getAttribute("checked") =
= "checked") ? "1. PASS" : "1. FAIL"); | 21 document.write((clonedInput.checked && clonedInput.getAttribute("checked") =
= "checked") ? "1. PASS" : "1. FAIL"); |
(...skipping 27 matching lines...) Expand all Loading... |
57 setTimeout(function() { | 49 setTimeout(function() { |
58 gc(); | 50 gc(); |
59 if (window.testRunner) | 51 if (window.testRunner) |
60 testRunner.notifyDone(); | 52 testRunner.notifyDone(); |
61 }, 0); | 53 }, 0); |
62 } catch (ex) { | 54 } catch (ex) { |
63 document.write("FAIL: " + ex); | 55 document.write("FAIL: " + ex); |
64 } | 56 } |
65 </script> | 57 </script> |
66 </body> | 58 </body> |
OLD | NEW |