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

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

Issue 2394883004: Fix compile error on simple chrome. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 service_->GetBootstrapForTesting()); 51 service_->GetBootstrapForTesting());
52 } 52 }
53 53
54 protected: 54 protected:
55 std::unique_ptr<ArcBridgeServiceImpl> service_; 55 std::unique_ptr<ArcBridgeServiceImpl> service_;
56 ArcBridgeService::StopReason stop_reason_; 56 ArcBridgeService::StopReason stop_reason_;
57 57
58 static std::unique_ptr<ArcBridgeBootstrap> CreateSuspendedBootstrap() { 58 static std::unique_ptr<ArcBridgeBootstrap> CreateSuspendedBootstrap() {
59 auto bootstrap = base::MakeUnique<FakeArcBridgeBootstrap>(); 59 auto bootstrap = base::MakeUnique<FakeArcBridgeBootstrap>();
60 bootstrap->SuspendBoot(); 60 bootstrap->SuspendBoot();
61 return bootstrap; 61 return std::move(bootstrap);
62 } 62 }
63 63
64 static std::unique_ptr<ArcBridgeBootstrap> CreateBootFailureBootstrap( 64 static std::unique_ptr<ArcBridgeBootstrap> CreateBootFailureBootstrap(
65 ArcBridgeService::StopReason reason) { 65 ArcBridgeService::StopReason reason) {
66 auto bootstrap = base::MakeUnique<FakeArcBridgeBootstrap>(); 66 auto bootstrap = base::MakeUnique<FakeArcBridgeBootstrap>();
67 bootstrap->EnableBootFailureEmulation(reason); 67 bootstrap->EnableBootFailureEmulation(reason);
68 return bootstrap; 68 return std::move(bootstrap);
69 } 69 }
70 70
71 private: 71 private:
72 void SetUp() override { 72 void SetUp() override {
73 chromeos::DBusThreadManager::Initialize(); 73 chromeos::DBusThreadManager::Initialize();
74 74
75 ready_ = false; 75 ready_ = false;
76 state_ = ArcBridgeService::State::STOPPED; 76 state_ = ArcBridgeService::State::STOPPED;
77 stop_reason_ = ArcBridgeService::StopReason::SHUTDOWN; 77 stop_reason_ = ArcBridgeService::StopReason::SHUTDOWN;
78 78
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 192 }
193 193
194 // Removing an unknown observer should be allowed. 194 // Removing an unknown observer should be allowed.
195 TEST_F(ArcBridgeTest, RemoveUnknownObserver) { 195 TEST_F(ArcBridgeTest, RemoveUnknownObserver) {
196 ASSERT_FALSE(ready()); 196 ASSERT_FALSE(ready());
197 auto dummy_observer = base::MakeUnique<DummyObserver>(); 197 auto dummy_observer = base::MakeUnique<DummyObserver>();
198 service_->RemoveObserver(dummy_observer.get()); 198 service_->RemoveObserver(dummy_observer.get());
199 } 199 }
200 200
201 } // namespace arc 201 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698