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

Side by Side Diff: net/spdy/spdy_stream_unittest.cc

Issue 8572041: Make ClientSocketPoolManager into an interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix some straggler renames. Created 9 years, 1 month 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/spdy/spdy_session_unittest.cc ('k') | net/spdy/spdy_websocket_stream_unittest.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/memory/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "net/spdy/spdy_stream.h" 6 #include "net/spdy/spdy_stream.h"
7 #include "net/spdy/spdy_http_utils.h" 7 #include "net/spdy/spdy_http_utils.h"
8 #include "net/spdy/spdy_session.h" 8 #include "net/spdy/spdy_session.h"
9 #include "net/spdy/spdy_test_util.h" 9 #include "net/spdy/spdy_test_util.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 HostPortPair host_port_pair("www.google.com", 80); 185 HostPortPair host_port_pair("www.google.com", 80);
186 scoped_refptr<TransportSocketParams> transport_params( 186 scoped_refptr<TransportSocketParams> transport_params(
187 new TransportSocketParams(host_port_pair, LOWEST, false, false)); 187 new TransportSocketParams(host_port_pair, LOWEST, false, false));
188 188
189 scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle); 189 scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle);
190 EXPECT_EQ(OK, 190 EXPECT_EQ(OK,
191 connection->Init(host_port_pair.ToString(), 191 connection->Init(host_port_pair.ToString(),
192 transport_params, 192 transport_params,
193 LOWEST, 193 LOWEST,
194 NULL, 194 NULL,
195 session_->transport_socket_pool(), 195 session_->GetTransportSocketPool(),
196 BoundNetLog())); 196 BoundNetLog()));
197 session->InitializeWithSocket(connection.release(), false, OK); 197 session->InitializeWithSocket(connection.release(), false, OK);
198 198
199 scoped_refptr<SpdyStream> stream; 199 scoped_refptr<SpdyStream> stream;
200 ASSERT_EQ( 200 ASSERT_EQ(
201 OK, 201 OK,
202 session->CreateStream(url, LOWEST, &stream, BoundNetLog(), NULL)); 202 session->CreateStream(url, LOWEST, &stream, BoundNetLog(), NULL));
203 scoped_refptr<IOBufferWithSize> buf(new IOBufferWithSize(8)); 203 scoped_refptr<IOBufferWithSize> buf(new IOBufferWithSize(8));
204 memcpy(buf->data(), "\0hello!\xff", 8); 204 memcpy(buf->data(), "\0hello!\xff", 8);
205 TestOldCompletionCallback callback; 205 TestOldCompletionCallback callback;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 stream->OnHeaders(headers); 261 stream->OnHeaders(headers);
262 262
263 stream->set_response_received(); 263 stream->set_response_received();
264 EXPECT_TRUE(stream->response_received()); 264 EXPECT_TRUE(stream->response_received());
265 EXPECT_TRUE(stream->HasUrl()); 265 EXPECT_TRUE(stream->HasUrl());
266 EXPECT_EQ(kStreamUrl, stream->GetUrl().spec()); 266 EXPECT_EQ(kStreamUrl, stream->GetUrl().spec());
267 } 267 }
268 268
269 269
270 } // namespace net 270 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_unittest.cc ('k') | net/spdy/spdy_websocket_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698