OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/public/cpp/utility/run_loop.h" | 5 #include "mojo/public/cpp/utility/run_loop.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "mojo/public/cpp/system/core.h" | 9 #include "mojo/public/cpp/system/core.h" |
| 10 #include "mojo/public/cpp/test_support/test_utils.h" |
10 #include "mojo/public/cpp/utility/run_loop_handler.h" | 11 #include "mojo/public/cpp/utility/run_loop_handler.h" |
11 #include "mojo/public/tests/test_utils.h" | |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace mojo { | 14 namespace mojo { |
15 namespace { | 15 namespace { |
16 | 16 |
17 class TestRunLoopHandler : public RunLoopHandler { | 17 class TestRunLoopHandler : public RunLoopHandler { |
18 public: | 18 public: |
19 TestRunLoopHandler() | 19 TestRunLoopHandler() |
20 : ready_count_(0), | 20 : ready_count_(0), |
21 error_count_(0), | 21 error_count_(0), |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 EXPECT_TRUE(RunLoop::current() == NULL); | 185 EXPECT_TRUE(RunLoop::current() == NULL); |
186 { | 186 { |
187 RunLoop run_loop; | 187 RunLoop run_loop; |
188 EXPECT_EQ(&run_loop, RunLoop::current()); | 188 EXPECT_EQ(&run_loop, RunLoop::current()); |
189 } | 189 } |
190 EXPECT_TRUE(RunLoop::current() == NULL); | 190 EXPECT_TRUE(RunLoop::current() == NULL); |
191 } | 191 } |
192 | 192 |
193 } // namespace | 193 } // namespace |
194 } // namespace mojo | 194 } // namespace mojo |
OLD | NEW |