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

Side by Side Diff: LayoutTests/http/tests/security/mixedContent/websocket/insecure-websocket-in-sandbox-in-secure-page.html

Issue 356843006: Add "lax mixed content checking" runtime flag. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test. Created 6 years, 5 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="/js-test-resources/testharness.js"></script> 4 <script src="/js-test-resources/testharness.js"></script>
5 <script src="/js-test-resources/testharnessreport.js"></script> 5 <script src="/js-test-resources/testharnessreport.js"></script>
6 <script> 6 <script>
7 7
8 if (window.testRunner) { 8 if (window.testRunner) {
9 testRunner.setCanOpenWindows(); 9 testRunner.setCanOpenWindows();
10 testRunner.setCloseRemainingWindowsWhenComplete(true); 10 testRunner.setCloseRemainingWindowsWhenComplete(true);
11 // Disallow insecure WebSockets. 11 // Disallow insecure WebSockets.
12 testRunner.overridePreference("WebKitAllowRunningInsecureContent", false); 12 testRunner.overridePreference("WebKitAllowRunningInsecureContent", false);
13 } 13 }
14 if (window.internals)
15 internals.settings.setLaxMixedContentCheckingEnabled(false);
14 16
15 17
16 var test = async_test("Test that when a HTTPS window that creates an insecure We bSocket connection is opened, the mixed content callback is triggered because th e main frame in the window is HTTPS but is trying connecting to an insecure WebS ocket server."); 18 var test = async_test("Test that when a HTTPS window that creates an insecure We bSocket connection is opened, the mixed content callback is triggered because th e main frame in the window is HTTPS but is trying connecting to an insecure WebS ocket server.");
17 test.step(function () 19 test.step(function ()
18 { 20 {
19 window.addEventListener("message", test.step_func(function (evt) { 21 window.addEventListener("message", test.step_func(function (evt) {
20 assert_equals(evt.data, "DONE", "evt.data"); 22 assert_equals(evt.data, "DONE", "evt.data");
21 test.done(); 23 test.done();
22 }), false); 24 }), false);
23 25
24 window.open("https://127.0.0.1:8443/security/mixedContent/websocket/resource s/sandboxed-expect-throw-on-construction.html"); 26 window.open("https://127.0.0.1:8443/security/mixedContent/websocket/resource s/sandboxed-expect-throw-on-construction.html");
25 }); 27 });
26 28
27 </script> 29 </script>
28 </head> 30 </head>
29 <body> 31 <body>
30 </body> 32 </body>
31 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698