| 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 "net/tools/quic/quic_epoll_connection_helper.h" |    5 #include "net/tools/quic/quic_epoll_connection_helper.h" | 
|    6  |    6  | 
|    7 #include "net/quic/crypto/quic_random.h" |    7 #include "net/quic/crypto/quic_random.h" | 
|    8 #include "net/tools/quic/test_tools/mock_epoll_server.h" |    8 #include "net/tools/quic/test_tools/mock_epoll_server.h" | 
|    9 #include "testing/gtest/include/gtest/gtest.h" |    9 #include "testing/gtest/include/gtest/gtest.h" | 
|   10  |   10  | 
|   11 using net::tools::test::MockEpollServer; |   11 using net::tools::test::MockEpollServer; | 
|   12  |   12  | 
|   13 namespace net { |   13 namespace net { | 
|   14 namespace tools { |   14 namespace tools { | 
|   15 namespace test { |   15 namespace test { | 
|   16 namespace { |   16 namespace { | 
|   17  |   17  | 
|   18 class TestDelegate : public QuicAlarm::Delegate { |   18 class TestDelegate : public QuicAlarm::Delegate { | 
|   19  public: |   19  public: | 
|   20   TestDelegate() : fired_(false) {} |   20   TestDelegate() : fired_(false) {} | 
|   21  |   21  | 
|   22   virtual QuicTime OnAlarm() OVERRIDE { |   22   virtual QuicTime OnAlarm() override { | 
|   23     fired_ = true; |   23     fired_ = true; | 
|   24     return QuicTime::Zero(); |   24     return QuicTime::Zero(); | 
|   25   } |   25   } | 
|   26  |   26  | 
|   27   bool fired() const { return fired_; } |   27   bool fired() const { return fired_; } | 
|   28  |   28  | 
|   29  private: |   29  private: | 
|   30   bool fired_; |   30   bool fired_; | 
|   31 }; |   31 }; | 
|   32  |   32  | 
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  136  |  136  | 
|  137   // Update it with an uninitialized time and ensure it's cancelled. |  137   // Update it with an uninitialized time and ensure it's cancelled. | 
|  138   alarm->Update(QuicTime::Zero(), QuicTime::Delta::FromMicroseconds(1)); |  138   alarm->Update(QuicTime::Zero(), QuicTime::Delta::FromMicroseconds(1)); | 
|  139   EXPECT_FALSE(alarm->IsSet()); |  139   EXPECT_FALSE(alarm->IsSet()); | 
|  140 } |  140 } | 
|  141  |  141  | 
|  142 }  // namespace |  142 }  // namespace | 
|  143 }  // namespace test |  143 }  // namespace test | 
|  144 }  // namespace tools |  144 }  // namespace tools | 
|  145 }  // namespace net |  145 }  // namespace net | 
| OLD | NEW |