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/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
12 #include "base/test/simple_test_tick_clock.h" | 12 #include "base/test/simple_test_tick_clock.h" |
13 #include "mojo/common/time_helper.h" | 13 #include "mojo/common/time_helper.h" |
14 #include "mojo/public/cpp/system/core.h" | 14 #include "mojo/public/cpp/system/core.h" |
15 #include "mojo/public/tests/test_utils.h" | 15 #include "mojo/public/cpp/test_support/test_utils.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace mojo { | 18 namespace mojo { |
19 namespace common { | 19 namespace common { |
20 namespace test { | 20 namespace test { |
21 | 21 |
22 void RunUntilIdle() { | 22 void RunUntilIdle() { |
23 base::RunLoop run_loop; | 23 base::RunLoop run_loop; |
24 run_loop.RunUntilIdle(); | 24 run_loop.RunUntilIdle(); |
25 } | 25 } |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 callback_helper.GetCallback())); | 301 callback_helper.GetCallback())); |
302 EXPECT_TRUE(mojo::test::WriteTextMessage(test_pipe.handle0.get(), | 302 EXPECT_TRUE(mojo::test::WriteTextMessage(test_pipe.handle0.get(), |
303 std::string())); | 303 std::string())); |
304 callback_helper.RunUntilGotCallback(); | 304 callback_helper.RunUntilGotCallback(); |
305 EXPECT_TRUE(callback_helper.got_callback()); | 305 EXPECT_TRUE(callback_helper.got_callback()); |
306 } | 306 } |
307 | 307 |
308 } // namespace test | 308 } // namespace test |
309 } // namespace common | 309 } // namespace common |
310 } // namespace mojo | 310 } // namespace mojo |
OLD | NEW |