blob: 7609ab2f9e8ec203baa581a00a4cfa8902d49ee3 [file] [log] [blame]
<!DOCTYPE html>
<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("WebSocket: Receive Blobs in Web Workers.");
window.jsTestIsAsync = true;
if (window.layoutTestController)
layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 0);
function startsWith(str, prefix)
{
return str.indexOf(prefix) == 0;
}
var worker = new Worker("resources/receive-blob.js");
worker.onmessage = function (event)
{
var message = event.data;
if (startsWith(message, "PASS"))
testPassed(message);
else if (startsWith(message, "FAIL"))
testFailed(message)
else
debug(message);
if (message === "DONE")
finishJSTest();
};
var successfullyParsed = true;
</script>
<script src="../../../../../js-test-resources/js-test-post.js"></script>
</body>
</html>