tor-browser

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

010.html (814B)


      1 <!doctype html>
      2 <title>WebSockets: protocol in response but no requested protocol</title>
      3 <script src=/resources/testharness.js></script>
      4 <script src=/resources/testharnessreport.js></script>
      5 <script src=../constants.sub.js></script>
      6 <meta name="variant" content="?default">
      7 <meta name="variant" content="?wss">
      8 <meta name="variant" content="?wpt_flags=h2">
      9 <div id=log></div>
     10 <script>
     11 async_test(function(t) {
     12  var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/handshake_protocol');
     13  ws.onopen = ws.onmessage = ws.onclose = t.step_func(e => assert_unreached(e.type));
     14  ws.onerror = t.step_func(function(e) {
     15    ws.onclose = t.step_func(function(e) {
     16      assert_false(e.wasClean, 'e.wasClean should be false');
     17      assert_equals(e.code, 1006, 'e.code should be 1006');
     18      t.done();
     19    });
     20  })
     21 });
     22 </script>