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

Side by Side Diff: net/socket/sequenced_socket_data_unittest.cc

Issue 1123393005: Remove redundant at_read_eof and at_write_eof methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/quic/quic_stream_factory_test.cc ('k') | net/socket/socket_test_util.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <string> 5 #include <string>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 OnHostResolutionCallback(), 236 OnHostResolutionCallback(),
237 TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT)), 237 TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT)),
238 socket_pool_(10, 10, &socket_factory_), 238 socket_pool_(10, 10, &socket_factory_),
239 expect_eof_(true) { 239 expect_eof_(true) {
240 } 240 }
241 241
242 SequencedSocketDataTest::~SequencedSocketDataTest() { 242 SequencedSocketDataTest::~SequencedSocketDataTest() {
243 // Make sure no unexpected pending tasks will cause a failure. 243 // Make sure no unexpected pending tasks will cause a failure.
244 base::RunLoop().RunUntilIdle(); 244 base::RunLoop().RunUntilIdle();
245 if (expect_eof_) { 245 if (expect_eof_) {
246 EXPECT_EQ(expect_eof_, data_->at_read_eof()); 246 EXPECT_EQ(expect_eof_, data_->AllReadDataConsumed());
247 EXPECT_EQ(expect_eof_, data_->at_write_eof()); 247 EXPECT_EQ(expect_eof_, data_->AllWriteDataConsumed());
248 } 248 }
249 } 249 }
250 250
251 void SequencedSocketDataTest::Initialize(MockRead* reads, 251 void SequencedSocketDataTest::Initialize(MockRead* reads,
252 size_t reads_count, 252 size_t reads_count,
253 MockWrite* writes, 253 MockWrite* writes,
254 size_t writes_count) { 254 size_t writes_count) {
255 data_.reset( 255 data_.reset(
256 new SequencedSocketData(reads, reads_count, writes, writes_count)); 256 new SequencedSocketData(reads, reads_count, writes, writes_count));
257 data_->set_connect_data(connect_data_); 257 data_->set_connect_data(connect_data_);
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 1093
1094 ASSERT_EQ(ERR_IO_PENDING, 1094 ASSERT_EQ(ERR_IO_PENDING,
1095 sock_->Read(helper.read_buf().get(), kLen1, helper.callback())); 1095 sock_->Read(helper.read_buf().get(), kLen1, helper.callback()));
1096 1096
1097 base::MessageLoop::current()->RunUntilIdle(); 1097 base::MessageLoop::current()->RunUntilIdle();
1098 } 1098 }
1099 1099
1100 } // namespace 1100 } // namespace
1101 1101
1102 } // namespace net 1102 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_stream_factory_test.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698