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

Side by Side Diff: net/socket/deterministic_socket_data_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) 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 "net/socket/socket_test_util.h" 5 #include "net/socket/socket_test_util.h"
6 6
7 #include "testing/platform_test.h" 7 #include "testing/platform_test.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 //----------------------------------------------------------------------------- 10 //-----------------------------------------------------------------------------
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 MockTransportClientSocketPool socket_pool_; 57 MockTransportClientSocketPool socket_pool_;
58 ClientSocketHandle connection_; 58 ClientSocketHandle connection_;
59 59
60 DISALLOW_COPY_AND_ASSIGN(DeterministicSocketDataTest); 60 DISALLOW_COPY_AND_ASSIGN(DeterministicSocketDataTest);
61 }; 61 };
62 62
63 DeterministicSocketDataTest::DeterministicSocketDataTest() 63 DeterministicSocketDataTest::DeterministicSocketDataTest()
64 : sock_(NULL), 64 : sock_(NULL),
65 data_(NULL), 65 data_(NULL),
66 read_buf_(NULL), 66 read_buf_(NULL),
67 connect_data_(false, OK), 67 connect_data_(SYNCHRONOUS, OK),
68 endpoint_("www.google.com", 443), 68 endpoint_("www.google.com", 443),
69 tcp_params_(new TransportSocketParams(endpoint_, 69 tcp_params_(new TransportSocketParams(endpoint_,
70 LOWEST, 70 LOWEST,
71 false, 71 false,
72 false)), 72 false)),
73 histograms_(""), 73 histograms_(""),
74 socket_pool_(10, 10, &histograms_, &socket_factory_) { 74 socket_pool_(10, 10, &histograms_, &socket_factory_) {
75 } 75 }
76 76
77 void DeterministicSocketDataTest::TearDown() { 77 void DeterministicSocketDataTest::TearDown() {
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 // Issue the writes which will complete immediately 523 // Issue the writes which will complete immediately
524 data_->StopAfter(1); 524 data_->StopAfter(1);
525 AssertSyncWriteEquals(kMsg3, kLen3); 525 AssertSyncWriteEquals(kMsg3, kLen3);
526 526
527 data_->RunFor(1); 527 data_->RunFor(1);
528 ASSERT_EQ(kLen2, read_callback_.WaitForResult()); 528 ASSERT_EQ(kLen2, read_callback_.WaitForResult());
529 AssertReadBufferEquals(kMsg2, kLen2); 529 AssertReadBufferEquals(kMsg2, kLen2);
530 } 530 }
531 531
532 } // namespace net 532 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698