1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <script src="../../../../js-test-resources/js-test-pre.js"></script>
7 <div id="description"></div>
8 <div id="console"></div>
9 <script type="text/javascript">
10 description("Make sure handshake with URL with query components success.");
12 window.jsTestIsAsync = true;
13 if (window.layoutTestController)
14 layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 0);
16 var url = "ws://127.0.0.1:8880/websocket/tests/hybi/echo-location?q=v";
17 var handshake_success = false;
22 clearTimeout(timeoutID);
23 shouldBeTrue("handshake_success");
24 shouldBe("ws_location", "url");
29 var ws = new WebSocket(url);
30 ws.onopen = function () {
31 debug("WebSocket is open");
32 handshake_success = true;
34 ws.onmessage = function (evt) {
35 ws_location = evt.data;
36 debug("received:" + ws_location);
39 ws.onclose = function () {
40 debug("WebSocket is closed");
43 var timeoutID = setTimeout("endTest()", 2000);
46 <script src="../../../../js-test-resources/js-test-post.js"></script>