blob: 2156465f813f1e21f153e1e9282b74646d41832d [file] [log] [blame]
<html>
<body>
<div id=result></div>
<script>
function log(message)
{
document.getElementById("result").innerHTML += message + "<br>";
}
var worker = new SharedWorker("websocket_worker_simple.js");
var protocol = location.protocol.replace('http', 'ws');
var url = protocol + '//' + location.host + '/echo-with-no-extension';
worker.port.onmessage = function (evt) {
log(evt.data);
if (evt.data == "DONE") {
document.title = "OK";
} else {
document.title = "FAIL";
}
};
worker.port.postMessage(url);
</script>
</body>
</html>