no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / dom / websocket / tests / test_websocket1.html
blob1844a67f5811f239d187e9e88b145bfe994dd987
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 test1, // client tries to connect to a http scheme location;
16 test2, // assure serialization of the connections;
17 test3, // client tries to connect to an non-existent ws server;
18 test4, // client tries to connect using a relative url;
19 test5, // client uses an invalid protocol value;
20 test6, // counter and encoding check;
21 test7, // onmessage event origin property check
22 test8, // client calls close() and the server sends the close frame (with no
23 // code or reason) in acknowledgement;
24 test9, // client closes the connection before the ws connection is established;
25 test10, // client sends a message before the ws connection is established;
28 function testWebSocket() {
29 doTest();
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();
36 </script>
38 <div id="feedback">
39 </div>
41 </body>
42 </html>