summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/websockets/Create-invalid-urls.any.js
blob: 73c9fadab9d8e249bcfc7e1f6a548becd1e27112 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[
  "ws://foo bar.com/",
  "wss://foo bar.com/",
  "ftp://"+location.host+"/",
  "mailto:example@example.org",
  "about:blank",
  location.origin + "/#",
  location.origin + "/#test",
  "#test"
].forEach(input => {
  test(() => {
    assert_throws_dom("SyntaxError", () => new WebSocket(input));
  }, `new WebSocket("${input}") should throw a "SyntaxError" DOMException`);
});