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

Side by Side Diff: services/device/battery/battery_status_manager_win_unittest.cc

Issue 2818673003: [DeviceService] Expose battery monitoring solely via the Device Service (Closed)
Patch Set: Java file format change Created 3 years, 7 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_manager_win.h" 5 #include "services/device/battery/battery_status_manager_win.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace device { 9 namespace device {
10 10
11 namespace { 11 namespace {
12 12
13 TEST(BatteryStatusManagerWinTest, ACLineStatusOffline) { 13 TEST(BatteryStatusManagerWinTest, ACLineStatusOffline) {
14 SYSTEM_POWER_STATUS win_status; 14 SYSTEM_POWER_STATUS win_status;
15 win_status.ACLineStatus = WIN_AC_LINE_STATUS_OFFLINE; 15 win_status.ACLineStatus = WIN_AC_LINE_STATUS_OFFLINE;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 mojom::BatteryStatus status = ComputeWebBatteryStatus(win_status); 71 mojom::BatteryStatus status = ComputeWebBatteryStatus(win_status);
72 EXPECT_TRUE(status.charging); 72 EXPECT_TRUE(status.charging);
73 EXPECT_EQ(std::numeric_limits<double>::infinity(), status.charging_time); 73 EXPECT_EQ(std::numeric_limits<double>::infinity(), status.charging_time);
74 EXPECT_EQ(std::numeric_limits<double>::infinity(), status.discharging_time); 74 EXPECT_EQ(std::numeric_limits<double>::infinity(), status.discharging_time);
75 EXPECT_EQ(.5, status.level); 75 EXPECT_EQ(.5, status.level);
76 } 76 }
77 77
78 } // namespace 78 } // namespace
79 79
80 } // namespace device 80 } // namespace device
OLDNEW
« no previous file with comments | « services/device/battery/battery_status_manager_win.cc ('k') | services/device/battery/battery_status_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698