OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta http-equiv="Content-Security-Policy" content="block-all-mixed-content"
> | 4 <meta http-equiv="Content-Security-Policy" content="block-all-mixed-content"
> |
5 <script src="/js-test-resources/testharness.js"></script> | 5 <script src="/js-test-resources/testharness.js"></script> |
6 <script src="/js-test-resources/testharnessreport.js"></script> | 6 <script src="/js-test-resources/testharnessreport.js"></script> |
7 </head> | 7 </head> |
8 <body> | 8 <body> |
9 <script> | 9 <script> |
10 test(function () { | 10 test(function () { |
11 assert_throws("SecurityError", | 11 assert_throws("SecurityError", |
12 function () { | 12 function () { |
13 new WebSocket("ws://127.0.0.1:8880/echo"); | 13 new WebSocket("ws://example.test:8880/echo"); |
14 }); | 14 }); |
15 }, "Test that insecure websocket construction throws."); | 15 }, "Test that insecure websocket construction throws."); |
16 </script> | 16 </script> |
17 </body> | 17 </body> |
18 </html> | 18 </html> |
OLD | NEW |