OLD | NEW |
1 <body onload="test()"> | 1 <body onload="test()"> |
2 <p>The regression test for <a href=https://bugs.webkit.org/show_bug.cgi?id=99658
>Bug 99658</a></p> | 2 <p>The regression test for <a href=https://bugs.webkit.org/show_bug.cgi?id=99658
>Bug 99658</a></p> |
3 <p>The test starts bunch of workers that just throw an exception. During that ti
me, current document is unloaded. The test passes if there are no crashes after
the page unload.</p> | 3 <p>The test starts bunch of workers that just throw an exception. During that ti
me, current document is unloaded. The test passes if there are no crashes after
the page unload.</p> |
4 <p>Note that the test is potentially flaky and may produce false positives if we
are unlucky with the worker exceptions timing. It should not fail if there is n
o bug though.</p> | 4 <p>Note that the test is potentially flaky and may produce false positives if we
are unlucky with the worker exceptions timing. It should not fail if there is n
o bug though.</p> |
5 <script src="../../resources/gc.js"></script> | 5 <script src="../../resources/gc.js"></script> |
6 <script> | 6 <script> |
| 7 |
7 function test() { | 8 function test() { |
8 if (document.location.search == "?done") { | 9 if (document.location.search == "?done") { |
9 // Set timeout to give the test some time to crash. | 10 // Set timeout to give the test some time to crash. |
10 setTimeout(function() { | 11 setTimeout(function() { |
11 if (window.testRunner) { | 12 if (window.testRunner) { |
12 console.log("No crashes: PASSED!"); | 13 console.log("No crashes: PASSED!"); |
13 testRunner.notifyDone(); | 14 testRunner.notifyDone(); |
14 } | 15 } |
15 }, 100); | 16 }, 100); |
16 return; | 17 return; |
(...skipping 25 matching lines...) Expand all Loading... |
42 | 43 |
43 setTimeout(function() { | 44 setTimeout(function() { |
44 console.log("Unloading the current document to see if there will be a cr
ash."); | 45 console.log("Unloading the current document to see if there will be a cr
ash."); |
45 document.location.href = "?done"; | 46 document.location.href = "?done"; |
46 workers = null; | 47 workers = null; |
47 gc(); | 48 gc(); |
48 }, 10); | 49 }, 10); |
49 } | 50 } |
50 </script> | 51 </script> |
51 </body> | 52 </body> |
OLD | NEW |