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 <utility> | 5 #include <utility> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
11 #include "chromeos/dbus/dbus_thread_manager.h" | 11 #include "chromeos/dbus/dbus_thread_manager.h" |
12 #include "components/arc/arc_bridge_service_impl.h" | 12 #include "components/arc/arc_bridge_service_impl.h" |
13 #include "components/arc/test/fake_arc_bridge_instance.h" | 13 #include "components/arc/test/fake_arc_bridge_instance.h" |
14 #include "ipc/mojo/scoped_ipc_support.h" | 14 #include "ipc/mojo/scoped_ipc_support.h" |
15 #include "mojo/public/cpp/environment/environment.h" | |
16 #include "mojo/public/cpp/system/message_pipe.h" | 15 #include "mojo/public/cpp/system/message_pipe.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
18 | 17 |
19 namespace arc { | 18 namespace arc { |
20 | 19 |
21 namespace { | 20 namespace { |
22 | 21 |
23 // A fake ArcBridgeBootstrap that creates a local connection. | 22 // A fake ArcBridgeBootstrap that creates a local connection. |
24 class FakeArcBridgeBootstrap : public ArcBridgeBootstrap { | 23 class FakeArcBridgeBootstrap : public ArcBridgeBootstrap { |
25 public: | 24 public: |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 service_->OnChannelClosed(); | 160 service_->OnChannelClosed(); |
162 instance_->WaitForInitCall(); | 161 instance_->WaitForInitCall(); |
163 ASSERT_EQ(ArcBridgeService::State::READY, state()); | 162 ASSERT_EQ(ArcBridgeService::State::READY, state()); |
164 ASSERT_EQ(2, instance_->init_calls()); | 163 ASSERT_EQ(2, instance_->init_calls()); |
165 | 164 |
166 service_->Shutdown(); | 165 service_->Shutdown(); |
167 ASSERT_EQ(ArcBridgeService::State::STOPPED, state()); | 166 ASSERT_EQ(ArcBridgeService::State::STOPPED, state()); |
168 } | 167 } |
169 | 168 |
170 } // namespace arc | 169 } // namespace arc |
OLD | NEW |