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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/mixedContent/websocket/resources/expect-successful-construction.js

Issue 1931063004: Stop blocking 'http://127.0.0.1/' as mixed content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ugh. Created 4 years, 6 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
OLDNEW
1 function reportResult(msg) { 1 function reportResult(msg) {
2 if ("opener" in self) 2 if ("opener" in self)
3 self.opener.postMessage(msg, "*"); 3 self.opener.postMessage(msg, "*");
4 else 4 else
5 postMessage(msg); 5 postMessage(msg);
6 } 6 }
7 7
8 new Promise(function (resolve, reject) { 8 new Promise(function (resolve, reject) {
9 var ws = new WebSocket("ws://127.0.0.1:8880/echo"); 9 var ws = new WebSocket("ws://example.test:8880/echo");
10 ws.onopen = function () { 10 ws.onopen = function () {
11 resolve(); 11 resolve();
12 }; 12 };
13 ws.onmessage = function () { 13 ws.onmessage = function () {
14 reject("Unexpected message event"); 14 reject("Unexpected message event");
15 }; 15 };
16 ws.onerror = function () { 16 ws.onerror = function () {
17 reject("Unexpected error event"); 17 reject("Unexpected error event");
18 }; 18 };
19 ws.onclose = function () { 19 ws.onclose = function () {
20 reject("Unexpected close event before open event"); 20 reject("Unexpected close event before open event");
21 }; 21 };
22 }).then( 22 }).then(
23 function () { 23 function () {
24 reportResult("DONE"); 24 reportResult("DONE");
25 }, 25 },
26 function (reason) { 26 function (reason) {
27 reportResult("FAIL: " + reason); 27 reportResult("FAIL: " + reason);
28 } 28 }
29 ); 29 );
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698