| 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 <memory> | 5 #include <memory> |
| 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/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
| 12 #include "chromeos/dbus/dbus_thread_manager.h" | 12 #include "chromeos/dbus/dbus_thread_manager.h" |
| 13 #include "components/arc/arc_bridge_service_impl.h" | 13 #include "components/arc/arc_bridge_service_impl.h" |
| 14 #include "components/arc/test/fake_arc_bridge_bootstrap.h" | 14 #include "components/arc/test/fake_arc_bridge_bootstrap.h" |
| 15 #include "components/arc/test/fake_arc_bridge_instance.h" | 15 #include "components/arc/test/fake_arc_bridge_instance.h" |
| 16 #include "ipc/mojo/scoped_ipc_support.h" | |
| 17 #include "mojo/public/cpp/system/message_pipe.h" | 16 #include "mojo/public/cpp/system/message_pipe.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 19 | 18 |
| 20 namespace arc { | 19 namespace arc { |
| 21 | 20 |
| 22 namespace { | 21 namespace { |
| 23 | 22 |
| 24 class ArcBridgeTest : public testing::Test, public ArcBridgeService::Observer { | 23 class ArcBridgeTest : public testing::Test, public ArcBridgeService::Observer { |
| 25 public: | 24 public: |
| 26 ArcBridgeTest() : ready_(false) {} | 25 ArcBridgeTest() : ready_(false) {} |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 } | 151 } |
| 153 | 152 |
| 154 // Removing an unknown observer should be allowed. | 153 // Removing an unknown observer should be allowed. |
| 155 TEST_F(ArcBridgeTest, RemoveUnknownObserver) { | 154 TEST_F(ArcBridgeTest, RemoveUnknownObserver) { |
| 156 ASSERT_FALSE(ready()); | 155 ASSERT_FALSE(ready()); |
| 157 auto dummy_observer = base::MakeUnique<DummyObserver>(); | 156 auto dummy_observer = base::MakeUnique<DummyObserver>(); |
| 158 service_->RemoveObserver(dummy_observer.get()); | 157 service_->RemoveObserver(dummy_observer.get()); |
| 159 } | 158 } |
| 160 | 159 |
| 161 } // namespace arc | 160 } // namespace arc |
| OLD | NEW |