tor-browser

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

test_websocket3.html (1631B)


      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 test21, // see bug 572975 - same as test 17, but delete strong event listeners
     16         // when receiving the message event;
     17 test22, // server takes too long to establish the ws connection;
     18 test23, // should detect WebSocket on window object;
     19 test24, // server rejects sub-protocol string
     20 test25, // ctor with valid empty sub-protocol array
     21 test26, // ctor with invalid sub-protocol array containing 1 empty element
     22 test27, // ctor with invalid sub-protocol array containing an empty element in
     23         // list
     24 test28, // ctor using valid 1 element sub-protocol array
     25 test29, // ctor using all valid 5 element sub-protocol array
     26 test30, // ctor using valid 1 element sub-protocol array with element server
     27         // will reject
     28 ];
     29 
     30 function testWebSocket() {
     31  doTest();
     32 }
     33 
     34 SimpleTest.requestFlakyTimeout("The web socket tests are really fragile, but avoiding timeouts might be hard, since it's testing stuff on the network. " +
     35                               "Expect all sorts of flakiness in this test...");
     36 SimpleTest.waitForExplicitFinish();
     37 
     38 </script>
     39 
     40 <div id="feedback">
     41 </div>
     42 
     43 </body>
     44 </html>