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

Side by Side Diff: LayoutTests/http/tests/eventsource/eventsource-reconnect-during-navigate-crash.html

Issue 347043002: Rework EventSource tests for better Worker test coverage. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move out CORS tests Created 6 years, 6 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 <html> 1 <!DOCTYPE HTML>
2 <body> 2 <script src="/js-test-resources/js-test.js"></script>
3 <p>Navigate while an EventSource reconnect timer is waiting, then have the recon nect timer trigger before the page unloads. We pass if we don't crash.
4 <script> 3 <script>
4 description("Navigate while an EventSource reconnect timer is waiting, then have the reconnect timer trigger before the page unloads.");
5
5 if (window.testRunner) { 6 if (window.testRunner) {
6 testRunner.waitUntilDone(); 7 testRunner.waitUntilDone();
7 testRunner.dumpAsText(); 8 testRunner.dumpAsText();
8 } 9 }
9 10
10 var navigateWasCalled = false; 11 var navigateWasCalled = false;
11 12
12 function navigate() { 13 function navigate() {
13 if (navigateWasCalled) 14 if (navigateWasCalled)
14 return; 15 return;
15 navigateWasCalled = true; 16 navigateWasCalled = true;
16 window.location = "resources/wait-then-notify-done.php"; 17 window.location = "resources/wait-then-notify-done.php";
17 } 18 }
18 19
19 var es = new EventSource("resources/reconnect.php"); 20 var es = new EventSource("resources/reconnect.php");
20 es.onerror = function() { 21 es.onerror = function() {
21 setTimeout(navigate, 0); 22 setTimeout(navigate, 0);
22 }; 23 };
23 </script> 24 </script>
24 </body> 25 </body>
25 </html> 26 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698