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

Side by Side Diff: net/quic/quic_stream_factory_test.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/crypto/quic_server_info.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 (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/quic/quic_stream_factory.h" 5 #include "net/quic/quic_stream_factory.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "net/base/test_data_directory.h" 9 #include "net/base/test_data_directory.h"
10 #include "net/cert/cert_verifier.h" 10 #include "net/cert/cert_verifier.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 static void SetLoadServerInfoTimeout(QuicStreamFactory* factory, 99 static void SetLoadServerInfoTimeout(QuicStreamFactory* factory,
100 size_t load_server_info_timeout) { 100 size_t load_server_info_timeout) {
101 factory->load_server_info_timeout_ms_ = load_server_info_timeout; 101 factory->load_server_info_timeout_ms_ = load_server_info_timeout;
102 } 102 }
103 }; 103 };
104 104
105 class MockQuicServerInfo : public QuicServerInfo { 105 class MockQuicServerInfo : public QuicServerInfo {
106 public: 106 public:
107 MockQuicServerInfo(const QuicServerId& server_id) 107 MockQuicServerInfo(const QuicServerId& server_id)
108 : QuicServerInfo(server_id) {} 108 : QuicServerInfo(server_id) {}
109 virtual ~MockQuicServerInfo() {} 109 ~MockQuicServerInfo() override {}
110 110
111 virtual void Start() override {}; 111 void Start() override {}
112 112
113 virtual int WaitForDataReady(const CompletionCallback& callback) override { 113 int WaitForDataReady(const CompletionCallback& callback) override {
114 return ERR_IO_PENDING; 114 return ERR_IO_PENDING;
115 } 115 }
116 116
117 virtual void CancelWaitForDataReadyCallback() override {} 117 void CancelWaitForDataReadyCallback() override {}
118 118
119 virtual bool IsDataReady() override { return false; } 119 bool IsDataReady() override { return false; }
120 120
121 virtual bool IsReadyToPersist() override { return false; } 121 bool IsReadyToPersist() override { return false; }
122 122
123 virtual void Persist() override {}; 123 void Persist() override {}
124 124
125 virtual void OnExternalCacheHit() override {}; 125 void OnExternalCacheHit() override {}
126 }; 126 };
127 127
128 class MockQuicServerInfoFactory : public QuicServerInfoFactory { 128 class MockQuicServerInfoFactory : public QuicServerInfoFactory {
129 public: 129 public:
130 MockQuicServerInfoFactory() {} 130 MockQuicServerInfoFactory() {}
131 virtual ~MockQuicServerInfoFactory() {} 131 ~MockQuicServerInfoFactory() override {}
132 132
133 virtual QuicServerInfo* GetForServer(const QuicServerId& server_id) override { 133 QuicServerInfo* GetForServer(const QuicServerId& server_id) override {
134 return new MockQuicServerInfo(server_id); 134 return new MockQuicServerInfo(server_id);
135 } 135 }
136 }; 136 };
137 137
138 138
139 class QuicStreamFactoryTest : public ::testing::TestWithParam<QuicVersion> { 139 class QuicStreamFactoryTest : public ::testing::TestWithParam<QuicVersion> {
140 protected: 140 protected:
141 QuicStreamFactoryTest() 141 QuicStreamFactoryTest()
142 : random_generator_(0), 142 : random_generator_(0),
143 clock_(new MockClock()), 143 clock_(new MockClock()),
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 ASSERT_EQ(0u, runner_->GetPostedTasks().size()); 1598 ASSERT_EQ(0u, runner_->GetPostedTasks().size());
1599 1599
1600 scoped_ptr<QuicHttpStream> stream = request.ReleaseStream(); 1600 scoped_ptr<QuicHttpStream> stream = request.ReleaseStream();
1601 EXPECT_TRUE(stream.get()); 1601 EXPECT_TRUE(stream.get());
1602 EXPECT_TRUE(socket_data.at_read_eof()); 1602 EXPECT_TRUE(socket_data.at_read_eof());
1603 EXPECT_TRUE(socket_data.at_write_eof()); 1603 EXPECT_TRUE(socket_data.at_write_eof());
1604 } 1604 }
1605 1605
1606 } // namespace test 1606 } // namespace test
1607 } // namespace net 1607 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_server_info.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698