OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS 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 import dbus | 5 import dbus |
6 import gobject | 6 import gobject |
7 import os | 7 import os |
8 import time | 8 import time |
9 | 9 |
10 from autotest_lib.client.bin import utils | 10 from autotest_lib.client.bin import utils |
11 from autotest_lib.client.common_lib import error | 11 from autotest_lib.client.common_lib import error |
12 from autotest_lib.client.cros import ui_test | 12 from autotest_lib.client.cros import cros_ui_test |
13 | 13 |
14 from dbus.mainloop.glib import DBusGMainLoop | 14 from dbus.mainloop.glib import DBusGMainLoop |
15 | 15 |
16 class desktopui_ScreenLocker(ui_test.UITest): | 16 class desktopui_ScreenLocker(cros_ui_test.UITest): |
17 version = 1 | 17 version = 1 |
18 _POWER_MANAGER_INTERFACE = 'org.chromium.PowerManager' | 18 _POWER_MANAGER_INTERFACE = 'org.chromium.PowerManager' |
19 | 19 |
20 def locked(self): | 20 def locked(self): |
21 self._locked = True | 21 self._locked = True |
22 | 22 |
23 def unlocked(self): | 23 def unlocked(self): |
24 self._locked = False | 24 self._locked = False |
25 | 25 |
26 def process_event(self): | 26 def process_event(self): |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 raise error.TestFail('screen locker unlocked with bogus password.') | 72 raise error.TestFail('screen locker unlocked with bogus password.') |
73 | 73 |
74 # send the correct password | 74 # send the correct password |
75 ax.send_text(self.password) | 75 ax.send_text(self.password) |
76 ax.send_hotkey('Return') | 76 ax.send_hotkey('Return') |
77 | 77 |
78 # wait for screen to unlock | 78 # wait for screen to unlock |
79 utils.poll_for_condition( | 79 utils.poll_for_condition( |
80 condition=lambda: self.is_screen_unlocked(), | 80 condition=lambda: self.is_screen_unlocked(), |
81 desc='screenlocker unlock') | 81 desc='screenlocker unlock') |
OLD | NEW |