diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2012-10-03 21:26:45 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2012-10-03 21:26:45 +0200 |
| commit | c30284384fe3a08bfa1eb8afdddf4ce03784d330 (patch) | |
| tree | b0bd0d1ac1b6302332f6057042a3d78c21d3978b /tests/test-device.cc | |
| parent | 938cb5db1032167f0ffdf777afd617adba0e5e9e (diff) | |
| parent | 0fa9b264b7d79f9bb303b9383379635bb293cf3d (diff) | |
| download | ayatana-indicator-power-c30284384fe3a08bfa1eb8afdddf4ce03784d330.tar.gz ayatana-indicator-power-c30284384fe3a08bfa1eb8afdddf4ce03784d330.tar.bz2 ayatana-indicator-power-c30284384fe3a08bfa1eb8afdddf4ce03784d330.zip | |
* New upstream release.
- Show a more accurate view of discharging batteries (LP: #1054146)
- Fix a GIcon memory leak
- In device.c, include gi18n-lib.h instead of gi18n.h
Diffstat (limited to 'tests/test-device.cc')
| -rw-r--r-- | tests/test-device.cc | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/tests/test-device.cc b/tests/test-device.cc index 728010d..eb087dc 100644 --- a/tests/test-device.cc +++ b/tests/test-device.cc @@ -310,8 +310,9 @@ TEST_F(DeviceTest, IconNames) INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_DISCHARGING, INDICATOR_POWER_DEVICE_PERCENTAGE, 95.0, NULL); - check_icon_names (device, "battery-full-symbolic;" + check_icon_names (device, "battery-100;" "gpm-battery-100;" + "battery-full-symbolic;" "battery-full"); // discharging battery, 85% @@ -319,8 +320,9 @@ TEST_F(DeviceTest, IconNames) INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_DISCHARGING, INDICATOR_POWER_DEVICE_PERCENTAGE, 85.0, NULL); - check_icon_names (device, "battery-full-symbolic;" + check_icon_names (device, "battery-080;" "gpm-battery-080;" + "battery-full-symbolic;" "battery-full"); // discharging battery, 50% -- 1 hour left @@ -329,8 +331,9 @@ TEST_F(DeviceTest, IconNames) INDICATOR_POWER_DEVICE_PERCENTAGE, 50.0, INDICATOR_POWER_DEVICE_TIME, (guint64)(60*60), NULL); - check_icon_names (device, "battery-good-symbolic;" + check_icon_names (device, "battery-060;" "gpm-battery-060;" + "battery-good-symbolic;" "battery-good"); // discharging battery, 25% -- 1 hour left @@ -339,8 +342,9 @@ TEST_F(DeviceTest, IconNames) INDICATOR_POWER_DEVICE_PERCENTAGE, 25.0, INDICATOR_POWER_DEVICE_TIME, (guint64)(60*60), NULL); - check_icon_names (device, "battery-good-symbolic;" + check_icon_names (device, "battery-040;" "gpm-battery-040;" + "battery-good-symbolic;" "battery-good"); // discharging battery, 25% -- 15 minutes left @@ -349,8 +353,9 @@ TEST_F(DeviceTest, IconNames) INDICATOR_POWER_DEVICE_PERCENTAGE, 25.0, INDICATOR_POWER_DEVICE_TIME, (guint64)(60*15), NULL); - check_icon_names (device, "battery-low-symbolic;" + check_icon_names (device, "battery-020;" "gpm-battery-020;" + "battery-low-symbolic;" "battery-low"); // discharging battery, 5% -- 1 hour left @@ -359,8 +364,9 @@ TEST_F(DeviceTest, IconNames) INDICATOR_POWER_DEVICE_PERCENTAGE, 5.0, INDICATOR_POWER_DEVICE_TIME, (guint64)(60*60), NULL); - check_icon_names (device, "battery-good-symbolic;" + check_icon_names (device, "battery-040;" "gpm-battery-040;" + "battery-good-symbolic;" "battery-good"); // discharging battery, 5% -- 15 minutes left @@ -369,9 +375,11 @@ TEST_F(DeviceTest, IconNames) INDICATOR_POWER_DEVICE_PERCENTAGE, 5.0, INDICATOR_POWER_DEVICE_TIME, (guint64)(60*15), NULL); - check_icon_names (device, "battery-caution-symbolic;" + check_icon_names (device, "battery-000;" "gpm-battery-000;" + "battery-caution-symbolic;" "battery-caution"); + // state unknown g_object_set (o, INDICATOR_POWER_DEVICE_KIND, UP_DEVICE_KIND_BATTERY, INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_UNKNOWN, |
