Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(679)

Side by Side Diff: net/websockets/websocket_handshake_handler_spdy_test.cc

Issue 25977005: [SPDY] Do not advertise SPDY/2 by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_websocket_stream_unittest.cc ('k') | net/websockets/websocket_job_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/websockets/websocket_handshake_handler.h" 5 #include "net/websockets/websocket_handshake_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "net/socket/next_proto.h" 9 #include "net/socket/next_proto.h"
10 #include "net/spdy/spdy_header_block.h" 10 #include "net/spdy/spdy_header_block.h"
(...skipping 10 matching lines...) Expand all
21 public ::testing::WithParamInterface<NextProto> { 21 public ::testing::WithParamInterface<NextProto> {
22 protected: 22 protected:
23 WebSocketHandshakeHandlerSpdyTest() : spdy_util_(GetParam()) {} 23 WebSocketHandshakeHandlerSpdyTest() : spdy_util_(GetParam()) {}
24 24
25 SpdyWebSocketTestUtil spdy_util_; 25 SpdyWebSocketTestUtil spdy_util_;
26 }; 26 };
27 27
28 INSTANTIATE_TEST_CASE_P( 28 INSTANTIATE_TEST_CASE_P(
29 NextProto, 29 NextProto,
30 WebSocketHandshakeHandlerSpdyTest, 30 WebSocketHandshakeHandlerSpdyTest,
31 testing::Values(kProtoSPDY2, kProtoSPDY3, kProtoSPDY31, kProtoSPDY4a2, 31 testing::Values(kProtoDeprecatedSPDY2,
32 kProtoSPDY3, kProtoSPDY31, kProtoSPDY4a2,
32 kProtoHTTP2Draft04)); 33 kProtoHTTP2Draft04));
33 34
34 TEST_P(WebSocketHandshakeHandlerSpdyTest, RequestResponse) { 35 TEST_P(WebSocketHandshakeHandlerSpdyTest, RequestResponse) {
35 WebSocketHandshakeRequestHandler request_handler; 36 WebSocketHandshakeRequestHandler request_handler;
36 37
37 static const char kHandshakeRequestMessage[] = 38 static const char kHandshakeRequestMessage[] =
38 "GET /demo HTTP/1.1\r\n" 39 "GET /demo HTTP/1.1\r\n"
39 "Host: example.com\r\n" 40 "Host: example.com\r\n"
40 "Upgrade: websocket\r\n" 41 "Upgrade: websocket\r\n"
41 "Connection: Upgrade\r\n" 42 "Connection: Upgrade\r\n"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 "set-cookie: WK-websocket-test=1\r\n" 183 "set-cookie: WK-websocket-test=1\r\n"
183 "set-cookie: WK-websocket-test-httponly=1; HttpOnly\r\n" 184 "set-cookie: WK-websocket-test-httponly=1; HttpOnly\r\n"
184 "\r\n"; 185 "\r\n";
185 186
186 EXPECT_EQ(kHandshakeResponseExpectedMessage, response_handler.GetResponse()); 187 EXPECT_EQ(kHandshakeResponseExpectedMessage, response_handler.GetResponse());
187 } 188 }
188 189
189 } // namespace 190 } // namespace
190 191
191 } // namespace net 192 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_websocket_stream_unittest.cc ('k') | net/websockets/websocket_job_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698