Chromium Code Reviews

Unified Diff: LayoutTests/http/tests/security/mixedContent/websocket/resources/expect-throw-on-construction.js

Issue 222153002: Disallow connecting an insecure WebSocket from a secure page. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update expectation Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
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..a6632ed8b6621fc84bdb5ad5f0da953da7e5442e
--- /dev/null
+++ b/LayoutTests/http/tests/security/mixedContent/websocket/resources/expect-throw-on-construction.js
@@ -0,0 +1,10 @@
+(function () {
+ var ws = null;
+ try {
+ ws = new WebSocket("ws://127.0.0.1:8880/echo");
+ } catch (e) {
+ postMessage("DONE");
+ return;
+ }
+ postMessage("FAIL: No exception was thrown")
+})();

Powered by Google App Engine