| OLD | NEW |
| 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_linux.h" | 5 #include "services/device/battery/battery_status_manager_linux.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
| 13 #include "base/synchronization/waitable_event.h" | 13 #include "base/synchronization/waitable_event.h" |
| 14 #include "base/threading/thread.h" | 14 #include "base/threading/thread.h" |
| 15 #include "dbus/mock_bus.h" | 15 #include "dbus/mock_bus.h" |
| 16 #include "dbus/mock_object_proxy.h" | 16 #include "dbus/mock_object_proxy.h" |
| 17 #include "dbus/object_path.h" | 17 #include "dbus/object_path.h" |
| 18 #include "dbus/property.h" | 18 #include "dbus/property.h" |
| 19 #include "device/battery/battery_status_manager_linux-inl.h" | 19 #include "services/device/battery/battery_status_manager_linux-inl.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 | 22 |
| 23 using testing::_; | 23 using testing::_; |
| 24 using testing::Invoke; | 24 using testing::Invoke; |
| 25 using testing::NiceMock; | 25 using testing::NiceMock; |
| 26 using testing::Return; | 26 using testing::Return; |
| 27 using testing::Unused; | 27 using testing::Unused; |
| 28 | 28 |
| 29 namespace device { | 29 namespace device { |
| (...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 status = last_battery_status(); | 1214 status = last_battery_status(); |
| 1215 EXPECT_EQ(last_count, count_battery_updates()); | 1215 EXPECT_EQ(last_count, count_battery_updates()); |
| 1216 | 1216 |
| 1217 EXPECT_FALSE(status.charging); | 1217 EXPECT_FALSE(status.charging); |
| 1218 EXPECT_EQ(std::numeric_limits<double>::infinity(), status.charging_time); | 1218 EXPECT_EQ(std::numeric_limits<double>::infinity(), status.charging_time); |
| 1219 EXPECT_EQ(200, status.discharging_time); | 1219 EXPECT_EQ(200, status.discharging_time); |
| 1220 EXPECT_EQ(0.7, status.level); | 1220 EXPECT_EQ(0.7, status.level); |
| 1221 } | 1221 } |
| 1222 | 1222 |
| 1223 } // namespace device | 1223 } // namespace device |
| OLD | NEW |