<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content"> | |
<script src="/js-test-resources/testharness.js"></script> | |
<script src="/js-test-resources/testharnessreport.js"></script> | |
</head> | |
<body> | |
<script> | |
test(function () { | |
assert_throws("SecurityError", | |
function () { | |
new WebSocket("ws://example.test:8880/echo"); | |
}); | |
}, "Test that insecure websocket construction throws."); | |
</script> | |
</body> | |
</html> |