[gnome-settings-daemon] power: Add test for unidle on unplug
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: Add test for unidle on unplug
- Date: Sun, 27 Jan 2013 13:48:09 +0000 (UTC)
commit 98eee8c611b235a05c341973cd445de09b02ba90
Author: Bastien Nocera <hadess hadess net>
Date: Sun Jan 27 14:45:35 2013 +0100
power: Add test for unidle on unplug
plugins/power/test.py | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/plugins/power/test.py b/plugins/power/test.py
index 0f0605b..7eedea8 100755
--- a/plugins/power/test.py
+++ b/plugins/power/test.py
@@ -652,5 +652,15 @@ class PowerPluginTest(gsdtestcase.GSDTestCase):
# And wait a little more to see us dim again
self.check_dim(idle_delay + 2)
+ # Unplug the AC
+ self.obj_upower.Set('org.freedesktop.UPower', 'OnBattery', True)
+ self.obj_upower.EmitSignal('', 'Changed', '', [], dbus_interface='org.freedesktop.DBus.Mock')
+
+ # Check that we undim
+ self.check_undim(gsdpowerconstants.POWER_UP_TIME_ON_AC / 2)
+
+ # And wait a little more to see us dim again
+ self.check_dim(idle_delay + 2)
+
# avoid writing to stderr
unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, verbosity=2))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]