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

Side by Side Diff: google_apis/gcm/engine/connection_handler_impl_unittest.cc

Issue 1376473003: Notify NQE of TCP RTT values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorder initialization in constructor Created 4 years, 8 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
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 "google_apis/gcm/engine/connection_handler_impl.h" 5 #include "google_apis/gcm/engine/connection_handler_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 const WriteList& write_list) { 203 const WriteList& write_list) {
204 mock_reads_ = read_list; 204 mock_reads_ = read_list;
205 mock_writes_ = write_list; 205 mock_writes_ = write_list;
206 data_provider_.reset( 206 data_provider_.reset(
207 new net::StaticSocketDataProvider( 207 new net::StaticSocketDataProvider(
208 &(mock_reads_[0]), mock_reads_.size(), 208 &(mock_reads_[0]), mock_reads_.size(),
209 &(mock_writes_[0]), mock_writes_.size())); 209 &(mock_writes_[0]), mock_writes_.size()));
210 socket_factory_.AddSocketDataProvider(data_provider_.get()); 210 socket_factory_.AddSocketDataProvider(data_provider_.get());
211 211
212 socket_ = socket_factory_.CreateTransportClientSocket( 212 socket_ = socket_factory_.CreateTransportClientSocket(
213 address_list_, NULL, net::NetLog::Source()); 213 address_list_, NULL, NULL, net::NetLog::Source());
214 socket_->Connect(net::CompletionCallback()); 214 socket_->Connect(net::CompletionCallback());
215 215
216 run_loop_.reset(new base::RunLoop()); 216 run_loop_.reset(new base::RunLoop());
217 PumpLoop(); 217 PumpLoop();
218 218
219 DCHECK(socket_->IsConnected()); 219 DCHECK(socket_->IsConnected());
220 return socket_.get(); 220 return socket_.get();
221 } 221 }
222 222
223 void GCMConnectionHandlerImplTest::PumpLoop() { 223 void GCMConnectionHandlerImplTest::PumpLoop() {
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 WaitForMessage(); // The login send. 903 WaitForMessage(); // The login send.
904 WaitForMessage(); // The login response. 904 WaitForMessage(); // The login response.
905 received_message.reset(); 905 received_message.reset();
906 WaitForMessage(); // The invalid message. 906 WaitForMessage(); // The invalid message.
907 EXPECT_FALSE(received_message.get()); 907 EXPECT_FALSE(received_message.get());
908 EXPECT_EQ(net::ERR_FAILED, last_error()); 908 EXPECT_EQ(net::ERR_FAILED, last_error());
909 } 909 }
910 910
911 } // namespace 911 } // namespace
912 } // namespace gcm 912 } // namespace gcm
OLDNEW
« no previous file with comments | « google_apis/gcm/base/socket_stream_unittest.cc ('k') | jingle/glue/chrome_async_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698