| 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 "ash/system/chromeos/power/power_status_view.h" | 5 #include "ash/common/system/chromeos/power/power_status_view.h" |
| 6 | 6 |
| 7 #include "ash/system/chromeos/power/power_status.h" | 7 #include "ash/common/system/chromeos/power/power_status.h" |
| 8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
| 9 #include "chromeos/dbus/power_manager/power_supply_properties.pb.h" | 9 #include "chromeos/dbus/power_manager/power_supply_properties.pb.h" |
| 10 #include "grit/ash_strings.h" | 10 #include "grit/ash_strings.h" |
| 11 #include "ui/base/l10n/l10n_util.h" | 11 #include "ui/base/l10n/l10n_util.h" |
| 12 #include "ui/base/l10n/time_format.h" | 12 #include "ui/base/l10n/time_format.h" |
| 13 #include "ui/gfx/image/image_skia.h" | 13 #include "ui/gfx/image/image_skia.h" |
| 14 #include "ui/views/controls/image_view.h" | 14 #include "ui/views/controls/image_view.h" |
| 15 #include "ui/views/controls/label.h" | 15 #include "ui/views/controls/label.h" |
| 16 | 16 |
| 17 using power_manager::PowerSupplyProperties; | 17 using power_manager::PowerSupplyProperties; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 UpdatePowerStatus(prop); | 136 UpdatePowerStatus(prop); |
| 137 EXPECT_EQ(original_image.bitmap(), GetBatteryImage().bitmap()); | 137 EXPECT_EQ(original_image.bitmap(), GetBatteryImage().bitmap()); |
| 138 | 138 |
| 139 // Make a big change to the percentage and check that a new image is used. | 139 // Make a big change to the percentage and check that a new image is used. |
| 140 prop.set_battery_percent(100.0); | 140 prop.set_battery_percent(100.0); |
| 141 UpdatePowerStatus(prop); | 141 UpdatePowerStatus(prop); |
| 142 EXPECT_NE(original_image.bitmap(), GetBatteryImage().bitmap()); | 142 EXPECT_NE(original_image.bitmap(), GetBatteryImage().bitmap()); |
| 143 } | 143 } |
| 144 | 144 |
| 145 } // namespace ash | 145 } // namespace ash |
| OLD | NEW |