blob: bb1e264d8842c894af4f90e88d9c4cd187870cfd [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="/js-test-resources/js-test.js"></script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<script>
description("Test WebSocket.extensions attribute with no extension support in server side.");
window.jsTestIsAsync = true;
var ws = new WebSocket("ws://localhost:8880/echo-with-no-extension");
debug("Check the value before opening the connection:");
shouldBeEqualToString("ws.extensions", "");
// extensions attribute is read-only.
debug("Check if the value is read only:");
shouldBeEqualToString("ws.extensions = 'foo'; ws.extensions", "");
ws.onopen = function(event)
{
debug("Check the value after the connection is established:");
shouldBeEqualToString("ws.extensions", "");
finishJSTest();
};
</script>
</body>
</html>