| 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/edk/system/channel_manager.h" | 5 #include "mojo/edk/system/channel_manager.h" |
| 6 | 6 |
| 7 #include <functional> | 7 #include <functional> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 namespace system { | 32 namespace system { |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| 35 class ChannelManagerTest : public testing::Test { | 35 class ChannelManagerTest : public testing::Test { |
| 36 public: | 36 public: |
| 37 ChannelManagerTest() | 37 ChannelManagerTest() |
| 38 : platform_handle_watcher_(nullptr), | 38 : platform_handle_watcher_(nullptr), |
| 39 message_loop_(CreateTestMessageLoopForIO(&platform_handle_watcher_)), | 39 message_loop_(CreateTestMessageLoopForIO(&platform_handle_watcher_)), |
| 40 channel_manager_(&platform_support_, | 40 channel_manager_(&platform_support_, |
| 41 message_loop_->GetTaskRunner().Clone(), | 41 message_loop_->GetTaskRunner().Clone(), |
| 42 platform_handle_watcher_, |
| 42 nullptr) {} | 43 nullptr) {} |
| 43 ~ChannelManagerTest() override {} | 44 ~ChannelManagerTest() override {} |
| 44 | 45 |
| 45 protected: | 46 protected: |
| 46 MessageLoop* message_loop() { return message_loop_.get(); } | 47 MessageLoop* message_loop() { return message_loop_.get(); } |
| 47 const RefPtr<TaskRunner>& task_runner() { | 48 const RefPtr<TaskRunner>& task_runner() { |
| 48 return message_loop_->GetTaskRunner(); | 49 return message_loop_->GetTaskRunner(); |
| 49 } | 50 } |
| 50 ChannelManager& channel_manager() { return channel_manager_; } | 51 ChannelManager& channel_manager() { return channel_manager_; } |
| 51 | 52 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 181 |
| 181 EXPECT_EQ(MOJO_RESULT_OK, d->Close()); | 182 EXPECT_EQ(MOJO_RESULT_OK, d->Close()); |
| 182 } | 183 } |
| 183 | 184 |
| 184 // TODO(vtl): Test |CreateChannelWithoutBootstrapOnIOThread()|. (This will | 185 // TODO(vtl): Test |CreateChannelWithoutBootstrapOnIOThread()|. (This will |
| 185 // require additional functionality in |Channel|.) | 186 // require additional functionality in |Channel|.) |
| 186 | 187 |
| 187 } // namespace | 188 } // namespace |
| 188 } // namespace system | 189 } // namespace system |
| 189 } // namespace mojo | 190 } // namespace mojo |
| OLD | NEW |