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

Side by Side 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: Rebase, Addressed #2 Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 function reportResult(msg) {
2 if ("opener" in self)
3 self.opener.postMessage(msg, "*");
4 else
5 postMessage(msg);
6 }
7
8 (function () {
9 var ws = null;
10 try {
11 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
12 } catch (e) {
13 reportResult("DONE");
14 return;
15 }
16 reportResult("FAIL: No exception was thrown")
17 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698