tor-browser

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

close-invalid.any.js (486B)


      1 // META: script=constants.sub.js
      2 // META: variant=?default
      3 // META: variant=?wss
      4 // META: variant=?wpt_flags=h2
      5 
      6 [
      7  [0, "0"],
      8  [500, "500"],
      9  [NaN, "NaN"],
     10  ["string", "String"],
     11  [null, "null"],
     12  [0x10000 + 1000, "2**16+1000"],
     13 ].forEach(function(t) {
     14  test(function() {
     15    var ws = CreateWebSocket(false, false);
     16    assert_throws_dom("InvalidAccessError", function() {
     17      ws.close(t[0]);
     18    });
     19    ws.onerror = this.unreached_func();
     20  }, t[1] + " on a websocket");
     21 });