Commit 4b8f10fc authored by tyoshino@chromium.org's avatar tyoshino@chromium.org

Test that a WebSocket handshake response with an empty valued header is accepted

BUG=380075

Review URL: https://codereview.chromium.org/312253002

git-svn-id: svn://svn.chromium.org/blink/trunk@175770 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 9848dd01
This is a testharness.js-based test.
PASS An empty valued header in a WebSocket handshake response doesn't fail a WebSocket
Harness: the test ran to completion.
<html>
<body>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
var t = async_test('An empty valued header in a WebSocket handshake response doesn\'t fail a WebSocket');
t.step(function() {
var ws = new WebSocket('ws://127.0.0.1:8880/handshake-response-with-empty-valued-header');
ws.onopen = function() {
t.done();
};
ws.onmessage = t.step_func(function(e) {
assert_unreached('Unexpected message event' + e);
});
ws.onerror = t.step_func(function() {
assert_unreached('Unexpected error event');
});
ws.onclose = t.step_func(function(e) {
assert_unreached('Unexpected close event' + e);
});
});
</script>
</body>
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
def web_socket_do_extra_handshake(request):
request.extra_headers.append(('foo', ''))
def web_socket_transfer_data(request):
pass
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment