Index: LayoutTests/http/tests/security/mixedContent/websocket/resources/expect-throw-on-construction.js |
diff --git a/LayoutTests/http/tests/security/mixedContent/websocket/resources/expect-throw-on-construction.js b/LayoutTests/http/tests/security/mixedContent/websocket/resources/expect-throw-on-construction.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2dd025a109c1b1224be061bfc42cfe1b65c98fb5 |
--- /dev/null |
+++ b/LayoutTests/http/tests/security/mixedContent/websocket/resources/expect-throw-on-construction.js |
@@ -0,0 +1,16 @@ |
+function reportResult(msg) { |
+ if ("opener" in self) |
+ self.opener.postMessage(msg, "*"); |
+ else |
+ postMessage(msg); |
+} |
+ |
+(function () { |
+ try { |
+ var ws = new WebSocket("ws://127.0.0.1:8880/echo"); |
+ } catch (e) { |
+ reportResult("DONE"); |
+ return; |
+ } |
+ reportResult("FAIL: No exception was thrown") |
+})(); |