Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/workers/worker-exception-during-navigation.html

Issue 2818563004: sendBeacon should throw a TypeError on bad URLs. (Closed)
Patch Set: Patch Set 2 was the final submit, 3 was uploaded by mistake. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698