blob: a28f02c191f7cb9e3c782e14ff88bea73a69d478 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../../js-test-resources/js-test-pre.js"></script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<script type="text/javascript">
description("URL that doesn't have trailing slash should not emit empty Request-URI.");
window.jsTestIsAsync = true;
var url = "ws://127.0.0.1:8880";
var handshake_success = false;
var ws_location;
var ws = new WebSocket(url);
ws.onopen = function () {
debug("WebSocket is open");
handshake_success = true;
};
ws.onmessage = function (evt) {
ws_location = evt.data;
debug("received:" + ws_location);
ws.close();
};
ws.onclose = function () {
debug("WebSocket is closed");
shouldBeTrue("handshake_success");
shouldBe("ws_location", '"ws://127.0.0.1:8880/"');
finishJSTest();
};
var successfullyParsed = true;
</script>
<script src="../../../../js-test-resources/js-test-post.js"></script>
</body>
</html>