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

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

Issue 9419032: Modify the MockConnect constructor to take an enum of ASYNC or SYNC, instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix Test Break Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/base/completion_callback.h" 6 #include "net/base/completion_callback.h"
7 #include "net/spdy/spdy_stream.h" 7 #include "net/spdy/spdy_stream.h"
8 #include "net/spdy/spdy_http_utils.h" 8 #include "net/spdy/spdy_http_utils.h"
9 #include "net/spdy/spdy_session.h" 9 #include "net/spdy/spdy_session.h"
10 #include "net/spdy/spdy_test_util.h" 10 #include "net/spdy/spdy_test_util.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 CreateMockRead(*echo), 166 CreateMockRead(*echo),
167 MockRead(true, 0, 0), // EOF 167 MockRead(true, 0, 0), // EOF
168 }; 168 };
169 reads[0].sequence_number = 1; 169 reads[0].sequence_number = 1;
170 reads[1].sequence_number = 3; 170 reads[1].sequence_number = 3;
171 reads[2].sequence_number = 4; 171 reads[2].sequence_number = 4;
172 172
173 scoped_ptr<OrderedSocketData> data( 173 scoped_ptr<OrderedSocketData> data(
174 new OrderedSocketData(reads, arraysize(reads), 174 new OrderedSocketData(reads, arraysize(reads),
175 writes, arraysize(writes))); 175 writes, arraysize(writes)));
176 MockConnect connect_data(false, OK); 176 MockConnect connect_data(SYNCHRONOUS, OK);
177 data->set_connect_data(connect_data); 177 data->set_connect_data(connect_data);
178 178
179 session_deps.socket_factory->AddSocketDataProvider(data.get()); 179 session_deps.socket_factory->AddSocketDataProvider(data.get());
180 SpdySession::SetSSLMode(false); 180 SpdySession::SetSSLMode(false);
181 181
182 scoped_refptr<SpdySession> session(CreateSpdySession()); 182 scoped_refptr<SpdySession> session(CreateSpdySession());
183 const char* kStreamUrl = "http://www.google.com/"; 183 const char* kStreamUrl = "http://www.google.com/";
184 GURL url(kStreamUrl); 184 GURL url(kStreamUrl);
185 185
186 HostPortPair host_port_pair("www.google.com", 80); 186 HostPortPair host_port_pair("www.google.com", 80);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 stream->OnHeaders(headers); 260 stream->OnHeaders(headers);
261 261
262 stream->set_response_received(); 262 stream->set_response_received();
263 EXPECT_TRUE(stream->response_received()); 263 EXPECT_TRUE(stream->response_received());
264 EXPECT_TRUE(stream->HasUrl()); 264 EXPECT_TRUE(stream->HasUrl());
265 EXPECT_EQ(kStreamUrl, stream->GetUrl().spec()); 265 EXPECT_EQ(kStreamUrl, stream->GetUrl().spec());
266 } 266 }
267 267
268 268
269 } // namespace net 269 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698