Index: LayoutTests/http/tests/eventsource/script-tests/eventsource-cors-non-http.js |
diff --git a/LayoutTests/http/tests/eventsource/script-tests/eventsource-cors-non-http.js b/LayoutTests/http/tests/eventsource/script-tests/eventsource-cors-non-http.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9177aba8a7c973156023e5e00551f2088475597a |
--- /dev/null |
+++ b/LayoutTests/http/tests/eventsource/script-tests/eventsource-cors-non-http.js |
@@ -0,0 +1,18 @@ |
+if (self.importScripts) |
+ importScripts("/js-test-resources/js-test.js"); |
+ |
+description("Test EventSource with non-HTTP protocol schemes in the URL."); |
+ |
+self.jsTestIsAsync = true; |
+ |
+var es, count = 0; |
+ |
+new EventSource("ftp://127.0.0.1").onerror = |
+new EventSource("file:///etc/motd").onerror = |
+new EventSource("localhost:8080/").onerror = |
+new EventSource("tel:1234").onerror = function () { |
+ es = this; |
+ shouldBe("es.readyState", "EventSource.CLOSED"); |
+ if (count++ == 3) |
+ finishJSTest(); |
+}; |