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

Side by Side Diff: device/battery/battery_status_service.cc

Issue 2819163002: [DeviceService] Replace content browser test with service test for BatteryMonitorImpl (Closed)
Patch Set: Rebase only Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "device/battery/battery_status_service.h" 5 #include "device/battery/battery_status_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const BatteryStatusService::BatteryUpdateCallback& 98 const BatteryStatusService::BatteryUpdateCallback&
99 BatteryStatusService::GetUpdateCallbackForTesting() const { 99 BatteryStatusService::GetUpdateCallbackForTesting() const {
100 return update_callback_; 100 return update_callback_;
101 } 101 }
102 102
103 void BatteryStatusService::SetBatteryManagerForTesting( 103 void BatteryStatusService::SetBatteryManagerForTesting(
104 std::unique_ptr<BatteryStatusManager> test_battery_manager) { 104 std::unique_ptr<BatteryStatusManager> test_battery_manager) {
105 battery_fetcher_ = std::move(test_battery_manager); 105 battery_fetcher_ = std::move(test_battery_manager);
106 status_ = mojom::BatteryStatus(); 106 status_ = mojom::BatteryStatus();
107 status_updated_ = false; 107 status_updated_ = false;
108 is_shutdown_ = false;
109 main_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get();
108 } 110 }
109 111
110 } // namespace device 112 } // namespace device
OLDNEW
« no previous file with comments | « content/test/data/battery_status/battery_status_promise_resolution_test.html ('k') | services/device/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698