tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Create-non-absolute-url.any.js (293B)


      1 [
      2  "test",
      3  "?",
      4  null,
      5  123,
      6 ].forEach(input => {
      7  test(() => {
      8    const url = new URL(input, location);
      9    url.protocol = "ws";
     10    const ws = new WebSocket(input);
     11    assert_equals(ws.url, url.href);
     12    ws.close();
     13  }, `Create WebSocket - Pass a non absolute URL: ${input}`);
     14 });