| 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 "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
| 13 #include "chromeos/dbus/dbus_thread_manager.h" | 13 #include "chromeos/dbus/dbus_thread_manager.h" |
| 14 #include "components/arc/arc_bridge_service_impl.h" | 14 #include "components/arc/arc_bridge_service_impl.h" |
| 15 #include "components/arc/test/fake_arc_bridge_bootstrap.h" | 15 #include "components/arc/test/fake_arc_bridge_bootstrap.h" |
| 16 #include "components/arc/test/fake_arc_bridge_instance.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 DummyObserver : public ArcBridgeService::Observer {}; | 23 class DummyObserver : public ArcBridgeService::Observer {}; |
| 25 | 24 |
| 26 } // namespace | 25 } // namespace |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 } | 192 } |
| 194 | 193 |
| 195 // Removing an unknown observer should be allowed. | 194 // Removing an unknown observer should be allowed. |
| 196 TEST_F(ArcBridgeTest, RemoveUnknownObserver) { | 195 TEST_F(ArcBridgeTest, RemoveUnknownObserver) { |
| 197 ASSERT_FALSE(ready()); | 196 ASSERT_FALSE(ready()); |
| 198 auto dummy_observer = base::MakeUnique<DummyObserver>(); | 197 auto dummy_observer = base::MakeUnique<DummyObserver>(); |
| 199 service_->RemoveObserver(dummy_observer.get()); | 198 service_->RemoveObserver(dummy_observer.get()); |
| 200 } | 199 } |
| 201 | 200 |
| 202 } // namespace arc | 201 } // namespace arc |
| OLD | NEW |