tor-browser

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

test_websocket4.html (1574B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"></meta>
      5  <title>WebSocket test</title>
      6  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      7  <script type="text/javascript" src="websocket_helpers.js"></script>
      8  <script type="text/javascript" src="websocket_tests.js"></script>
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     10 </head>
     11 <body onload="testWebSocket()">
     12 <script class="testbody" type="text/javascript">
     13 
     14 var tests = [
     15  test31, // ctor using valid 2 element sub-protocol array with 1 element server
     16          // will reject and one server will accept
     17  test32, // ctor using invalid sub-protocol array that contains duplicate items
     18  test33, // test for sending/receiving custom close code (but no close reason)
     19  test34, // test for receiving custom close code and reason
     20  test35, // test for sending custom close code and reason
     21  test36, // negative test for sending out of range close code
     22  test37, // negative test for too long of a close reason
     23  test38, // ensure extensions attribute is defined
     24  test39, // a basic wss:// connectivity test
     25  test40, // negative test for wss:// with no cert
     26 ];
     27 
     28 function testWebSocket() {
     29  doTest();
     30 }
     31 
     32 SimpleTest.requestFlakyTimeout("The web socket tests are really fragile, but avoiding timeouts might be hard, since it's testing stuff on the network. " +
     33                               "Expect all sorts of flakiness in this test...");
     34 SimpleTest.waitForExplicitFinish();
     35 
     36 </script>
     37 
     38 <div id="feedback">
     39 </div>
     40 
     41 </body>
     42 </html>