Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: components/arc/arc_bridge_service_unittest.cc

Issue 2379223004: Switch from Delegate to Observer. (Closed)
Patch Set: Rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/arc/arc_bridge_service_impl.cc ('k') | components/arc/test/fake_arc_bridge_bootstrap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698