tor-browser

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

http2-websocket.sub.h2.any.js (452B)


      1 function check(protocol, domain, port, done) {
      2  var url = protocol + '://' + domain + ':' + port + '/echo';
      3  var ws = new WebSocket(url);
      4 
      5  ws.addEventListener('error', function() {
      6    done(false);
      7  });
      8 
      9  ws.addEventListener('open', function() {
     10    done(true);
     11  });
     12 }
     13 
     14 async_test(function(t) {
     15  check('wss', '{{browser_host}}', {{ports[h2][0]}}, t.step_func(function(result) {
     16    assert_true(result);
     17 
     18    t.done();
     19  }));
     20 }, 'WSS over h2');