| 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 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_MOCK_EPOLL_SERVER_H_ | 5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_MOCK_EPOLL_SERVER_H_ |
| 6 #define NET_TOOLS_QUIC_TEST_TOOLS_MOCK_EPOLL_SERVER_H_ | 6 #define NET_TOOLS_QUIC_TEST_TOOLS_MOCK_EPOLL_SERVER_H_ |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "net/tools/flip_server/epoll_server.h" | 9 #include "net/tools/epoll_server/epoll_server.h" |
| 10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| 11 | 11 |
| 12 namespace net { | 12 namespace net { |
| 13 namespace tools { | 13 namespace tools { |
| 14 namespace test { | 14 namespace test { |
| 15 | 15 |
| 16 // Unlike the full MockEpollServer, this only lies about the time but lets | 16 // Unlike the full MockEpollServer, this only lies about the time but lets |
| 17 // fd events operate normally. Usefully when interacting with real backends | 17 // fd events operate normally. Usefully when interacting with real backends |
| 18 // but wanting to skip forward in time to trigger timeouts. | 18 // but wanting to skip forward in time to trigger timeouts. |
| 19 class FakeTimeEpollServer : public EpollServer { | 19 class FakeTimeEpollServer : public EpollServer { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 private: // members | 97 private: // members |
| 98 EventQueue event_queue_; | 98 EventQueue event_queue_; |
| 99 int64 until_in_usec_; | 99 int64 until_in_usec_; |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace test | 102 } // namespace test |
| 103 } // namespace tools | 103 } // namespace tools |
| 104 } // namespace net | 104 } // namespace net |
| 105 | 105 |
| 106 #endif // NET_TOOLS_QUIC_TEST_TOOLS_MOCK_EPOLL_SERVER_H_ | 106 #endif // NET_TOOLS_QUIC_TEST_TOOLS_MOCK_EPOLL_SERVER_H_ |
| OLD | NEW |