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

Side by Side Diff: LayoutTests/http/tests/eventsource/script-tests/eventsource-retry-precision.js

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
(Empty)
1 if (self.importScripts)
2 importScripts("/js-test-resources/js-test.js");
3
4 description("Test EventSource retry time precision.");
5
6 self.jsTestIsAsync = true;
7
8 var timeoutId = setTimeout(function () {
9 testPassed("did not immediately reconnect");
10 end();
11 }, 500);
12
13 var count = 0;
14 var es = new EventSource("resources/precise-retry.asis");
15 es.onopen = function () {
16 if (count++ != 2)
17 return;
18 clearTimeout(timeoutId);
19 testFailed("reconnected too soon");
20 end();
21 };
22
23 function end() {
24 es.close();
25 debug("DONE");
26 finishJSTest();
27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698