| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/message_pump/handle_watcher.h" | 5 #include "mojo/message_pump/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/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
| 12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "mojo/message_pump/message_pump_mojo.h" | 14 #include "mojo/message_pump/message_pump_mojo.h" |
| 15 #include "mojo/public/cpp/test_support/test_support.h" |
| 16 #include "mojo/public/cpp/test_support/test_utils.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 16 #include "third_party/mojo/src/mojo/public/cpp/test_support/test_support.h" | |
| 17 #include "third_party/mojo/src/mojo/public/cpp/test_support/test_utils.h" | |
| 18 | 18 |
| 19 namespace mojo { | 19 namespace mojo { |
| 20 namespace common { | 20 namespace common { |
| 21 namespace test { | 21 namespace test { |
| 22 | 22 |
| 23 enum MessageLoopConfig { | 23 enum MessageLoopConfig { |
| 24 MESSAGE_LOOP_CONFIG_DEFAULT = 0, | 24 MESSAGE_LOOP_CONFIG_DEFAULT = 0, |
| 25 MESSAGE_LOOP_CONFIG_MOJO = 1 | 25 MESSAGE_LOOP_CONFIG_MOJO = 1 |
| 26 }; | 26 }; |
| 27 | 27 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 ASSERT_TRUE( | 192 ASSERT_TRUE( |
| 193 mojo::test::ReadTextMessage(pipe.handle0.get(), &received_message)); | 193 mojo::test::ReadTextMessage(pipe.handle0.get(), &received_message)); |
| 194 EXPECT_EQ(kMessage, received_message); | 194 EXPECT_EQ(kMessage, received_message); |
| 195 received_message.clear(); | 195 received_message.clear(); |
| 196 } | 196 } |
| 197 } | 197 } |
| 198 | 198 |
| 199 } // namespace test | 199 } // namespace test |
| 200 } // namespace common | 200 } // namespace common |
| 201 } // namespace mojo | 201 } // namespace mojo |
| OLD | NEW |