no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / dom / websocket / tests / test_websocket2.html
blobafbbaba62f99f3a699aa401035450cd454d5d4de
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">
14 var tests = [
15 test11, // a simple hello echo;
16 test12, // client sends a message containing unpaired surrogates
17 test13, //server sends an invalid message;
18 test14, // server sends the close frame, it doesn't close the tcp connection
19 // and it keeps sending normal ws messages;
20 test15, // server closes the tcp connection, but it doesn't send the close
21 // frame;
22 test16, // client calls close() and tries to send a message;
23 test17, // see bug 572975 - all event listeners set
24 test18, // client tries to connect to an http resource;
25 test19, // server closes the tcp connection before establishing the ws
26 // connection;
27 test20, // see bug 572975 - only on error and onclose event listeners set
30 function testWebSocket() {
31 doTest();
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();
38 </script>
40 <div id="feedback">
41 </div>
43 </body>
44 </html>