diff options
author | Bastien Nocera <hadess@hadess.net> | 2018-03-02 18:18:19 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2018-03-02 19:07:56 +0100 |
commit | c42b68bb39181157749cdb9c894920a7433aeb39 (patch) | |
tree | 0f93d81ce48402f26d8fd36da9e3f5a057513002 | |
parent | 36bc0a45a610a43fafab59922b1cfc9b9140db8e (diff) | |
download | gnome-settings-daemon-c42b68bb39181157749cdb9c894920a7433aeb39.tar.gz |
power: Add test for previous commit
This just tries to access the keyboard brightness, which should crash
gsd-power without the fix.
https://bugzilla.gnome.org/show_bug.cgi?id=793512
-rwxr-xr-x | plugins/power/test.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/power/test.py b/plugins/power/test.py index 6711ce27..0bb61c5f 100755 --- a/plugins/power/test.py +++ b/plugins/power/test.py @@ -884,6 +884,18 @@ class PowerPluginTest(gsdtestcase.GSDTestCase): self.obj_session_mgr.Uninhibit(dbus.UInt32(inhibit_id), dbus_interface='org.gnome.SessionManager') + def test_check_missing_kbd_brightness(self): + ''' https://bugzilla.gnome.org/show_bug.cgi?id=793512 ''' + + obj_gsd_power_kbd = self.session_bus_con.get_object( + 'org.gnome.SettingsDaemon.Power', '/org/gnome/SettingsDaemon/Power') + obj_gsd_power_kbd_props = dbus.Interface(obj_gsd_power_kbd, dbus.PROPERTIES_IFACE) + + # This would cause: + # DBusException: org.freedesktop.DBus.Error.Failed: Failed to get property: Brightness + # if gsd-power crashed + kbd_brightness = obj_gsd_power_kbd_props.Get('org.gnome.SettingsDaemon.Power.Keyboard', 'Brightness') + def disabled_test_unindle_on_ac_plug(self): idle_delay = round(gsdpowerconstants.MINIMUM_IDLE_DIM_DELAY / gsdpowerconstants.IDLE_DELAY_TO_IDLE_DIM_MULTIPLIER) self.settings_session['idle-delay'] = idle_delay |