diff options
author | bors-servo <infra@servo.org> | 2023-05-15 07:11:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 07:11:20 +0200 |
commit | 17e1582ed4756fbcf2510946dfda00b616abc02c (patch) | |
tree | 8eb43f0a1023675f56fa79caaf8dc7de1cc6e940 /tests/wpt/web-platform-tests/websockets/Create-http-urls.any.js | |
parent | 8dfd613aa188d2271d692a31192284eabdaf9f9d (diff) | |
parent | 06e9d5a631ba321787dfb40cdcfd49dcab0c1510 (diff) | |
download | servo-17e1582ed4756fbcf2510946dfda00b616abc02c.tar.gz servo-17e1582ed4756fbcf2510946dfda00b616abc02c.zip |
Auto merge of #29737 - servo:wpt_update_14-05-2023, r=servo-wpt-sync
Sync WPT with upstream (14-05-2023)
Automated downstream sync of changes from upstream as of 14-05-2023
[no-wpt-sync]
r? @servo-wpt-sync
Diffstat (limited to 'tests/wpt/web-platform-tests/websockets/Create-http-urls.any.js')
-rw-r--r-- | tests/wpt/web-platform-tests/websockets/Create-http-urls.any.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/wpt/web-platform-tests/websockets/Create-http-urls.any.js b/tests/wpt/web-platform-tests/websockets/Create-http-urls.any.js new file mode 100644 index 00000000000..17590fc43ef --- /dev/null +++ b/tests/wpt/web-platform-tests/websockets/Create-http-urls.any.js @@ -0,0 +1,19 @@ +test(() => { + const url = new URL ("/", location); + url.protocol = "http"; + const httpURL = url.href; + url.protocol = "https"; + const httpsURL = url.href; + url.protocol = "ws"; + const wsURL = url.href; + url.protocol = "wss"; + const wssURL = url.href; + + let ws = new WebSocket(httpURL); + assert_equals(ws.url, wsURL); + ws.close(); + + ws = new WebSocket(httpsURL); + assert_equals(ws.url, wssURL); + ws.close(); +}, "WebSocket: ensure both HTTP schemes are supported"); |