OLD | NEW |
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 <stddef.h> | 5 #include <stddef.h> |
6 #include <string> | 6 #include <string> |
7 #include <sys/epoll.h> | 7 #include <sys/epoll.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 class ClientDelegate : public PacketDroppingTestWriter::Delegate { | 172 class ClientDelegate : public PacketDroppingTestWriter::Delegate { |
173 public: | 173 public: |
174 explicit ClientDelegate(QuicClient* client) : client_(client) {} | 174 explicit ClientDelegate(QuicClient* client) : client_(client) {} |
175 ~ClientDelegate() override {} | 175 ~ClientDelegate() override {} |
176 void OnPacketSent(WriteResult result) override {} | 176 void OnPacketSent(WriteResult result) override {} |
177 void OnCanWrite() override { | 177 void OnCanWrite() override { |
178 EpollEvent event(EPOLLOUT, false); | 178 EpollEvent event(EPOLLOUT, false); |
179 client_->OnEvent(client_->fd(), &event); | 179 client_->OnEvent(client_->fd(), &event); |
180 } | 180 } |
| 181 |
181 private: | 182 private: |
182 QuicClient* client_; | 183 QuicClient* client_; |
183 }; | 184 }; |
184 | 185 |
185 class EndToEndTest : public ::testing::TestWithParam<TestParams> { | 186 class EndToEndTest : public ::testing::TestWithParam<TestParams> { |
186 protected: | 187 protected: |
187 EndToEndTest() | 188 EndToEndTest() |
188 : server_hostname_("example.com"), | 189 : server_hostname_("example.com"), |
189 server_started_(false), | 190 server_started_(false), |
190 strike_register_no_startup_period_(false) { | 191 strike_register_no_startup_period_(false) { |
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1359 QuicSession* session = dispatcher->session_map().begin()->second; | 1360 QuicSession* session = dispatcher->session_map().begin()->second; |
1360 EXPECT_EQ(0u, QuicSessionPeer::GetLocallyClosedStreamsHighestOffset( | 1361 EXPECT_EQ(0u, QuicSessionPeer::GetLocallyClosedStreamsHighestOffset( |
1361 session).size()); | 1362 session).size()); |
1362 server_thread_->Resume(); | 1363 server_thread_->Resume(); |
1363 } | 1364 } |
1364 | 1365 |
1365 } // namespace | 1366 } // namespace |
1366 } // namespace test | 1367 } // namespace test |
1367 } // namespace tools | 1368 } // namespace tools |
1368 } // namespace net | 1369 } // namespace net |
OLD | NEW |