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

Side by Side Diff: google_apis/gcm/base/socket_stream_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/base/socket_stream.h" 5 #include "google_apis/gcm/base/socket_stream.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 net::ERR_IO_PENDING) { 169 net::ERR_IO_PENDING) {
170 run_loop.Run(); 170 run_loop.Run();
171 } 171 }
172 if (input_stream()->GetState() == SocketInputStream::CLOSED) 172 if (input_stream()->GetState() == SocketInputStream::CLOSED)
173 return; 173 return;
174 } 174 }
175 } 175 }
176 176
177 void GCMSocketStreamTest::OpenConnection() { 177 void GCMSocketStreamTest::OpenConnection() {
178 socket_ = socket_factory_.CreateTransportClientSocket( 178 socket_ = socket_factory_.CreateTransportClientSocket(
179 address_list_, NULL, net::NetLog::Source()); 179 address_list_, NULL, NULL, net::NetLog::Source());
180 socket_->Connect( 180 socket_->Connect(
181 base::Bind(&GCMSocketStreamTest::ConnectCallback, 181 base::Bind(&GCMSocketStreamTest::ConnectCallback,
182 base::Unretained(this))); 182 base::Unretained(this)));
183 PumpLoop(); 183 PumpLoop();
184 } 184 }
185 185
186 void GCMSocketStreamTest::ConnectCallback(int result) {} 186 void GCMSocketStreamTest::ConnectCallback(int result) {}
187 187
188 void GCMSocketStreamTest::ResetInputStream() { 188 void GCMSocketStreamTest::ResetInputStream() {
189 DCHECK(socket_.get()); 189 DCHECK(socket_.get());
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 TEST_F(GCMSocketStreamTest, WriteDisconnected) { 392 TEST_F(GCMSocketStreamTest, WriteDisconnected) {
393 BuildSocket(ReadList(), WriteList()); 393 BuildSocket(ReadList(), WriteList());
394 socket()->Disconnect(); 394 socket()->Disconnect();
395 DoOutputStreamWrite(base::StringPiece(kWriteData, kWriteDataSize)); 395 DoOutputStreamWrite(base::StringPiece(kWriteData, kWriteDataSize));
396 ASSERT_EQ(SocketOutputStream::CLOSED, output_stream()->GetState()); 396 ASSERT_EQ(SocketOutputStream::CLOSED, output_stream()->GetState());
397 ASSERT_EQ(net::ERR_CONNECTION_CLOSED, output_stream()->last_error()); 397 ASSERT_EQ(net::ERR_CONNECTION_CLOSED, output_stream()->last_error());
398 } 398 }
399 399
400 } // namespace 400 } // namespace
401 } // namespace gcm 401 } // namespace gcm
OLDNEW
« no previous file with comments | « extensions/browser/api/socket/tcp_socket.cc ('k') | google_apis/gcm/engine/connection_handler_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698