forked from mirrors/gecko-dev
Automatic update from web-platform-tests Add WebSocket mixed content wpt (#40632) Also modify common.sub.js so it doesn't try to make insecure connections in secure contents. Firefox passes the new mixed-content test in all contexts. Safari fails the new mixed-content test in all contexts. Change-Id: Ia3e82096e738095a04d3c7b5f8d21819f5de2faf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4624022 Reviewed-by: Kenichi Ishibashi <bashi@chromium.org> Commit-Queue: Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/main@{#1161711} Co-authored-by: Adam Rice <ricea@chromium.org> -- wpt-commits: da3624035b594d3eb30dd5605bf92eb7264548e1 wpt-pr: 40632
7 lines
271 B
JavaScript
7 lines
271 B
JavaScript
// META: global=window,worker
|
|
// META: script=constants.sub.js
|
|
|
|
test(() => {
|
|
assert_throws_dom('SecurityError', () => CreateInsecureWebSocket(),
|
|
'constructor should throw');
|
|
}, 'constructing an insecure WebSocket in a secure context should throw');
|