<!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>
description("Test WebSocket.binaryType attribute.");

var ws = new WebSocket("ws://localhost:8880/websocket/tests/hybi/simple");
shouldBeEqualToString("ws.binaryType", "blob");

ws.binaryType = "arraybuffer";
shouldBeEqualToString("ws.binaryType", "arraybuffer");

ws.binaryType = "blob";
shouldBeEqualToString("ws.binaryType", "blob");

ws.binaryType = 'Blob';
shouldBeEqualToString("ws.binaryType", "blob");

ws.binaryType = 'ArrayBuffer';
shouldBeEqualToString("ws.binaryType", "blob");

ws.binaryType = '';
shouldBeEqualToString("ws.binaryType", "blob");

</script>
<script src="../../../../js-test-resources/js-test-post.js"></script>
</body>
</html>
