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 "mojo/common/handle_watcher.h" | 5 #include "mojo/common/handle_watcher.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 base::WeakPtrFactory<CallbackHelper> weak_factory_; | 115 base::WeakPtrFactory<CallbackHelper> weak_factory_; |
116 | 116 |
117 private: | 117 private: |
118 DISALLOW_COPY_AND_ASSIGN(CallbackHelper); | 118 DISALLOW_COPY_AND_ASSIGN(CallbackHelper); |
119 }; | 119 }; |
120 | 120 |
121 class HandleWatcherTest : public testing::TestWithParam<MessageLoopConfig> { | 121 class HandleWatcherTest : public testing::TestWithParam<MessageLoopConfig> { |
122 public: | 122 public: |
123 HandleWatcherTest() : message_loop_(CreateMessageLoop(GetParam())) {} | 123 HandleWatcherTest() : message_loop_(CreateMessageLoop(GetParam())) {} |
124 virtual ~HandleWatcherTest() { | 124 ~HandleWatcherTest() override { |
125 test::SetTickClockForTest(NULL); | 125 test::SetTickClockForTest(NULL); |
126 } | 126 } |
127 | 127 |
128 protected: | 128 protected: |
129 void TearDownMessageLoop() { | 129 void TearDownMessageLoop() { |
130 message_loop_.reset(); | 130 message_loop_.reset(); |
131 } | 131 } |
132 | 132 |
133 void InstallTickClock() { | 133 void InstallTickClock() { |
134 test::SetTickClockForTest(&tick_clock_); | 134 test::SetTickClockForTest(&tick_clock_); |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 message_loop.task_runner(), | 458 message_loop.task_runner(), |
459 &run_loop, &threads_active_counter)); | 459 &run_loop, &threads_active_counter)); |
460 } | 460 } |
461 run_loop.Run(); | 461 run_loop.Run(); |
462 ASSERT_EQ(0, threads_active_counter); | 462 ASSERT_EQ(0, threads_active_counter); |
463 } | 463 } |
464 | 464 |
465 } // namespace test | 465 } // namespace test |
466 } // namespace common | 466 } // namespace common |
467 } // namespace mojo | 467 } // namespace mojo |
OLD | NEW |