OLD | NEW |
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 "chromeos/dbus/fake_power_manager_client.h" | 5 #include "chromeos/dbus/fake_power_manager_client.h" |
6 | 6 |
7 #include "base/basictypes.h" | |
8 #include "base/macros.h" | 7 #include "base/macros.h" |
9 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
12 | 11 |
13 namespace chromeos { | 12 namespace chromeos { |
14 namespace { | 13 namespace { |
15 | 14 |
16 const double kInitialBatteryPercent = 85; | 15 const double kInitialBatteryPercent = 85; |
17 const double kUpdatedBatteryPercent = 70; | 16 const double kUpdatedBatteryPercent = 70; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 EXPECT_EQ(power_manager::PowerSupplyProperties_ExternalPower_AC, | 127 EXPECT_EQ(power_manager::PowerSupplyProperties_ExternalPower_AC, |
129 test_observer.props().external_power()); | 128 test_observer.props().external_power()); |
130 EXPECT_EQ(3, test_observer.num_power_changed()); | 129 EXPECT_EQ(3, test_observer.num_power_changed()); |
131 | 130 |
132 // Test removing observer. | 131 // Test removing observer. |
133 client.RemoveObserver(&test_observer); | 132 client.RemoveObserver(&test_observer); |
134 EXPECT_FALSE(client.HasObserver(&test_observer)); | 133 EXPECT_FALSE(client.HasObserver(&test_observer)); |
135 }; | 134 }; |
136 | 135 |
137 } // namespace chromeos | 136 } // namespace chromeos |
OLD | NEW |