| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/tools/quic/quic_server.h" | 5 #include "net/tools/quic/quic_server.h" |
| 6 | 6 |
| 7 #include "net/quic/core/crypto/quic_random.h" | 7 #include "net/quic/core/crypto/quic_random.h" |
| 8 #include "net/quic/core/quic_utils.h" | 8 #include "net/quic/core/quic_utils.h" |
| 9 #include "net/quic/test_tools/crypto_test_utils.h" | 9 #include "net/quic/test_tools/crypto_test_utils.h" |
| 10 #include "net/quic/test_tools/mock_quic_dispatcher.h" | 10 #include "net/quic/test_tools/mock_quic_dispatcher.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 server_.CreateUDPSocketAndListen(server_address_); | 80 server_.CreateUDPSocketAndListen(server_address_); |
| 81 ASSERT_TRUE(QuicServerPeer::SetSmallSocket(&server_)); | 81 ASSERT_TRUE(QuicServerPeer::SetSmallSocket(&server_)); |
| 82 | 82 |
| 83 if (!server_.overflow_supported()) { | 83 if (!server_.overflow_supported()) { |
| 84 LOG(WARNING) << "Overflow not supported. Not testing."; | 84 LOG(WARNING) << "Overflow not supported. Not testing."; |
| 85 return; | 85 return; |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 | 88 |
| 89 protected: | 89 protected: |
| 90 QuicFlagSaver saver_; |
| 90 int port_; | 91 int port_; |
| 91 IPEndPoint server_address_; | 92 IPEndPoint server_address_; |
| 92 TestQuicServer server_; | 93 TestQuicServer server_; |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 // Tests that if dispatcher has CHLOs waiting for connection creation, EPOLLIN | 96 // Tests that if dispatcher has CHLOs waiting for connection creation, EPOLLIN |
| 96 // event should try to create connections for them. And set epoll mask with | 97 // event should try to create connections for them. And set epoll mask with |
| 97 // EPOLLIN if there are still CHLOs remaining at the end of epoll event. | 98 // EPOLLIN if there are still CHLOs remaining at the end of epoll event. |
| 98 TEST_F(QuicServerEpollInTest, ProcessBufferedCHLOsOnEpollin) { | 99 TEST_F(QuicServerEpollInTest, ProcessBufferedCHLOsOnEpollin) { |
| 99 FLAGS_quic_limit_num_new_sessions_per_epoll_loop = true; | 100 FLAGS_quic_limit_num_new_sessions_per_epoll_loop = true; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 arraysize(valid_packet), | 192 arraysize(valid_packet), |
| 192 QuicTime::Zero(), false); | 193 QuicTime::Zero(), false); |
| 193 | 194 |
| 194 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1); | 195 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1); |
| 195 DispatchPacket(encrypted_valid_packet); | 196 DispatchPacket(encrypted_valid_packet); |
| 196 } | 197 } |
| 197 | 198 |
| 198 } // namespace | 199 } // namespace |
| 199 } // namespace test | 200 } // namespace test |
| 200 } // namespace net | 201 } // namespace net |
| OLD | NEW |