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..2cef3d14fd9efb82a94192b7bb5e663bd9b5bbbc |
--- /dev/null |
+++ b/LayoutTests/http/tests/security/mixedContent/websocket/resources/expect-throw-on-construction.js |
@@ -0,0 +1,17 @@ |
+function reportResult(msg) { |
+ if ("opener" in self) |
+ self.opener.postMessage(msg, "*"); |
+ else |
+ postMessage(msg); |
+} |
+ |
+(function () { |
+ var ws = null; |
+ try { |
+ ws = new WebSocket("ws://127.0.0.1:8880/echo"); |
yhirano
2014/04/15 04:19:39
Can ws be declared here? (Or, it isn't needed, may
tyoshino (SeeGerritForStatus)
2014/04/15 05:14:57
I did like this because I wanted to capture except
|
+ } catch (e) { |
+ reportResult("DONE"); |
+ return; |
+ } |
+ reportResult("FAIL: No exception was thrown") |
+})(); |