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

Side by Side Diff: LayoutTests/http/tests/eventsource/eventsource-cors-non-http.html

Issue 345813005: Rework EventSource CORS tests to be usable from Workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Generalize redirect.php?cors_enabled to cors_allow_origin 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 <!DOCTYPE html> 1 <!DOCTYPE HTML>
2 <html> 2 <script src="/js-test-resources/js-test.js"></script>
3 <head> 3 <script src="script-tests/eventsource-cors-non-http.js"></script>
4 <script src="../../js-test-resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 description("Test EventSource with non-HTTP protocol schemes in the URL.");
9 self.jsTestIsAsync = true;
10
11 var count = 0;
12 new EventSource("ftp://127.0.0.1").onerror =
13 new EventSource("file:///etc/motd").onerror =
14 new EventSource("localhost:8080/").onerror =
15 new EventSource("tel:1234").onerror = function () {
16 if (this.readyState == EventSource.CLOSED) {
17 testPassed("got error event and readyState is CLOSED");
18 } else {
19 testFailed("got error event but readyState is not CLOSED");
20 this.close();
21 }
22 if (count++ == 3)
23 finishJSTest();
24 };
25 </script>
26 </body>
27 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698