chromium/third_party/blink/web_tests/http/tests/websocket/fragmented-control-frame.html

<!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 whether WebSocket rejects a fragmented control frame and aborts the connection.");

window.jsTestIsAsync = true;

var url = "ws://localhost:8880/fragmented-control-frame";
var ws = new WebSocket(url);
var closeEvent;

ws.onopen = function()
{
    debug("onopen() was called.");
};

ws.onmessage = function(event)
{
    var message = event.data;
    testFailed("onmessage() was called. (message = \"" + message + "\")");
};

ws.onclose = function(event)
{
    closeEvent = event;
    shouldBeFalse("closeEvent.wasClean");
    finishJSTest();
};

ws.onerror = function(errorEvent)
{
    testPassed("onerror() was called");
};

</script>
</body>
</html>