[gnome-settings-daemon] power: Add a suspend inhibitor when testing the screensaver
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: Add a suspend inhibitor when testing the screensaver
- Date: Fri, 25 Jan 2013 13:46:18 +0000 (UTC)
commit d3898b6cd12621b231c75ba7dcc4fedb35604470
Author: Bastien Nocera <hadess hadess net>
Date: Fri Jan 25 14:40:56 2013 +0100
power: Add a suspend inhibitor when testing the screensaver
Which should have absolutely no effect, because we're not testing
suspend. Hopefully, this should uncover some bugs.
plugins/power/test.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/plugins/power/test.py b/plugins/power/test.py
index 6144b0d..8039a07 100755
--- a/plugins/power/test.py
+++ b/plugins/power/test.py
@@ -267,6 +267,11 @@ class PowerPluginTest(gsdtestcase.GSDTestCase):
def test_sleep_inactive_blank(self):
'''screensaver/blank interaction'''
+ # create suspend inhibitor which should have no effect on the idle
+ inhibit_id = self.obj_session_mgr.Inhibit(
+ 'testsuite', dbus.UInt32(0), 'for testing',
+ dbus.UInt32(gsdpowerenums.GSM_INHIBITOR_FLAG_SUSPEND))
+
self.obj_screensaver.SetActive(True)
self.assertTrue(self.obj_screensaver.GetActive(), 'screensaver not turned on')
@@ -285,6 +290,9 @@ class PowerPluginTest(gsdtestcase.GSDTestCase):
# and check for blank after the blank timeout
self.check_blank(10)
+ # Drop inhibitor
+ self.obj_session_mgr.Uninhibit(dbus.UInt32(inhibit_id))
+
def test_session_idle_delay(self):
'''verify that session idle delay works as expected when changed'''
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]