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

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

Issue 1580903002: Convert ignore_limits from a SocketParam to a socket request argument. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: RespectLimits Created 4 years, 10 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
« no previous file with comments | « net/websockets/websocket_basic_stream_test.cc ('k') | no next file » | 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_stream_create_helper.h" 5 #include "net/websockets/websocket_handshake_stream_create_helper.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 23 matching lines...) Expand all
34 : pool_(1, 1, socket_factory_maker_.factory()) {} 34 : pool_(1, 1, socket_factory_maker_.factory()) {}
35 35
36 // The created socket expects |expect_written| to be written to the socket, 36 // The created socket expects |expect_written| to be written to the socket,
37 // and will respond with |return_to_read|. The test will fail if the expected 37 // and will respond with |return_to_read|. The test will fail if the expected
38 // text is not written, or if all the bytes are not read. 38 // text is not written, or if all the bytes are not read.
39 scoped_ptr<ClientSocketHandle> CreateClientSocketHandle( 39 scoped_ptr<ClientSocketHandle> CreateClientSocketHandle(
40 const std::string& expect_written, 40 const std::string& expect_written,
41 const std::string& return_to_read) { 41 const std::string& return_to_read) {
42 socket_factory_maker_.SetExpectations(expect_written, return_to_read); 42 socket_factory_maker_.SetExpectations(expect_written, return_to_read);
43 scoped_ptr<ClientSocketHandle> socket_handle(new ClientSocketHandle); 43 scoped_ptr<ClientSocketHandle> socket_handle(new ClientSocketHandle);
44 socket_handle->Init( 44 socket_handle->Init("a", scoped_refptr<MockTransportSocketParams>(), MEDIUM,
45 "a", 45 ClientSocketPool::RespectLimits::ENABLED,
46 scoped_refptr<MockTransportSocketParams>(), 46 CompletionCallback(), &pool_, BoundNetLog());
47 MEDIUM,
48 CompletionCallback(),
49 &pool_,
50 BoundNetLog());
51 return socket_handle; 47 return socket_handle;
52 } 48 }
53 49
54 private: 50 private:
55 WebSocketMockClientSocketFactoryMaker socket_factory_maker_; 51 WebSocketMockClientSocketFactoryMaker socket_factory_maker_;
56 MockTransportClientSocketPool pool_; 52 MockTransportClientSocketPool pool_;
57 53
58 DISALLOW_COPY_AND_ASSIGN(MockClientSocketHandleFactory); 54 DISALLOW_COPY_AND_ASSIGN(MockClientSocketHandleFactory);
59 }; 55 };
60 56
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 177
182 EXPECT_EQ( 178 EXPECT_EQ(
183 "permessage-deflate;" 179 "permessage-deflate;"
184 " client_max_window_bits=14; server_max_window_bits=14;" 180 " client_max_window_bits=14; server_max_window_bits=14;"
185 " server_no_context_takeover; client_no_context_takeover", 181 " server_no_context_takeover; client_no_context_takeover",
186 stream->GetExtensions()); 182 stream->GetExtensions());
187 } 183 }
188 184
189 } // namespace 185 } // namespace
190 } // namespace net 186 } // namespace net
OLDNEW
« no previous file with comments | « net/websockets/websocket_basic_stream_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698