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