| 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 // Disallow insecure WebSockets. | |
| 12 testRunner.overridePreference("WebKitAllowRunningInsecureContent", false); | |
| 13 } | 11 } |
| 14 | 12 |
| 15 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."); | 13 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."); |
| 16 test.step(function () | 14 test.step(function () |
| 17 { | 15 { |
| 18 window.addEventListener("message", test.step_func(function (evt) { | 16 window.addEventListener("message", test.step_func(function (evt) { |
| 19 assert_equals(evt.data, "DONE", "evt.data"); | 17 assert_equals(evt.data, "DONE", "evt.data"); |
| 20 test.done(); | 18 test.done(); |
| 21 }), false); | 19 }), false); |
| 22 | 20 |
| 23 window.open("https://127.0.0.1:8443/security/mixedContent/websocket/resource
s/expect-throw-on-construction.html"); | 21 window.open("https://127.0.0.1:8443/security/mixedContent/websocket/resource
s/expect-throw-on-construction.html"); |
| 24 }); | 22 }); |
| 25 | 23 |
| 26 </script> | 24 </script> |
| 27 </head> | 25 </head> |
| 28 <body> | 26 <body> |
| 29 </body> | 27 </body> |
| 30 </html> | 28 </html> |
| OLD | NEW |