OLD | NEW |
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 // Allow insecure WebSockets. | 11 // Allow insecure WebSockets. |
12 testRunner.overridePreference("WebKitAllowRunningInsecureContent", true); | 12 testRunner.overridePreference("WebKitAllowRunningInsecureContent", true); |
13 } | 13 } |
| 14 if (window.internals) |
| 15 internals.settings.setLaxMixedContentCheckingEnabled(false); |
| 16 |
14 | 17 |
15 var test = async_test("Test that an insecure WebSocket connection is blocked whe
n created in an HTTPS resource."); | 18 var test = async_test("Test that an insecure WebSocket connection is blocked whe
n created in an HTTPS resource."); |
16 test.step(function () | 19 test.step(function () |
17 { | 20 { |
18 window.addEventListener("message", test.step_func(function (evt) | 21 window.addEventListener("message", test.step_func(function (evt) |
19 { | 22 { |
20 assert_equals(evt.data, "DONE", "evt.data"); | 23 assert_equals(evt.data, "DONE", "evt.data"); |
21 test.done(); | 24 test.done(); |
22 }), false); | 25 }), false); |
23 | 26 |
24 window.open("https://127.0.0.1:8443/security/mixedContent/websocket/resource
s/expect-successful-construction.html"); | 27 window.open("https://127.0.0.1:8443/security/mixedContent/websocket/resource
s/expect-successful-construction.html"); |
25 }); | 28 }); |
26 | 29 |
27 </script> | 30 </script> |
28 </head> | 31 </head> |
29 <body> | 32 <body> |
30 </body> | 33 </body> |
31 </html> | 34 </html> |
OLD | NEW |