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

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

Issue 451383002: Plumbing for TCP FastOpen for SSL sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased to master. Created 6 years, 3 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 (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 "net/socket/socket_test_util.h" 5 #include "net/socket/socket_test_util.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "testing/platform_test.h" 10 #include "testing/platform_test.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 }; 67 };
68 68
69 DeterministicSocketDataTest::DeterministicSocketDataTest() 69 DeterministicSocketDataTest::DeterministicSocketDataTest()
70 : sock_(NULL), 70 : sock_(NULL),
71 read_buf_(NULL), 71 read_buf_(NULL),
72 connect_data_(SYNCHRONOUS, OK), 72 connect_data_(SYNCHRONOUS, OK),
73 endpoint_("www.google.com", 443), 73 endpoint_("www.google.com", 443),
74 tcp_params_(new TransportSocketParams(endpoint_, 74 tcp_params_(new TransportSocketParams(endpoint_,
75 false, 75 false,
76 false, 76 false,
77 OnHostResolutionCallback())), 77 OnHostResolutionCallback(),
78 AUTO_CONNECT_USE_DEFAULT)),
78 histograms_(std::string()), 79 histograms_(std::string()),
79 socket_pool_(10, 10, &histograms_, &socket_factory_) {} 80 socket_pool_(10, 10, &histograms_, &socket_factory_) {}
80 81
81 void DeterministicSocketDataTest::TearDown() { 82 void DeterministicSocketDataTest::TearDown() {
82 // Empty the current queue. 83 // Empty the current queue.
83 base::MessageLoop::current()->RunUntilIdle(); 84 base::MessageLoop::current()->RunUntilIdle();
84 PlatformTest::TearDown(); 85 PlatformTest::TearDown();
85 } 86 }
86 87
87 void DeterministicSocketDataTest::Initialize(MockRead* reads, 88 void DeterministicSocketDataTest::Initialize(MockRead* reads,
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 data_->StopAfter(1); 612 data_->StopAfter(1);
612 AssertSyncWriteEquals(kMsg3, kLen3); 613 AssertSyncWriteEquals(kMsg3, kLen3);
613 614
614 data_->RunFor(1); 615 data_->RunFor(1);
615 ASSERT_TRUE(read_callback_.have_result()); 616 ASSERT_TRUE(read_callback_.have_result());
616 ASSERT_EQ(kLen2, read_callback_.WaitForResult()); 617 ASSERT_EQ(kLen2, read_callback_.WaitForResult());
617 AssertReadBufferEquals(kMsg2, kLen2); 618 AssertReadBufferEquals(kMsg2, kLen2);
618 } 619 }
619 620
620 } // namespace net 621 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698