Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: client/site_tests/desktopui_ScreenSaverUnlock/desktopui_ScreenSaverUnlock.py

Issue 3073014: Autotest for ScreenLocker (Closed) Base URL: ssh://git@gitrw.chromium.org/autotest.git
Patch Set: bvt only Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: client/site_tests/desktopui_ScreenSaverUnlock/desktopui_ScreenSaverUnlock.py
diff --git a/client/site_tests/desktopui_ScreenSaverUnlock/desktopui_ScreenSaverUnlock.py b/client/site_tests/desktopui_ScreenSaverUnlock/desktopui_ScreenSaverUnlock.py
deleted file mode 100644
index 816b8a4f9ee618461ea675dbf0ce9591107b4402..0000000000000000000000000000000000000000
--- a/client/site_tests/desktopui_ScreenSaverUnlock/desktopui_ScreenSaverUnlock.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import time
-from autotest_lib.client.bin import site_ui_test, site_utils
-from autotest_lib.client.common_lib import error
-
-class desktopui_ScreenSaverUnlock(site_ui_test.UITest):
- version = 1
-
-
- def run_once(self, is_control=False):
- self.wait_for_screensaver()
- self.xsystem('xscreensaver-command -lock')
-
- site_utils.poll_for_condition(
- lambda: self.is_screensaver_locked(),
- desc='screensaver lock')
-
- ax = self.get_autox()
-
- # Send a key and wait for the screensaver to wakeup and
- # present the login dialog.
- # TODO: a less brittle way to do this would be nice
- ax.send_hotkey('Return')
- time.sleep(2)
-
- if is_control:
- # send an incorrect password
- ax.send_text('_boguspassword_')
- ax.send_hotkey('Return')
-
- # verify that the screen unlock attempt failed
- try:
- site_utils.poll_for_condition(
- lambda: self.is_screensaver_unlocked(),
- desc='screensaver unlock')
- except error.TestError:
- pass
- else:
- raise error.TestFail('screen saver unlocked with bogus password.')
- else:
- # send the correct password
- ax.send_text(self.password)
- ax.send_hotkey('Return')
-
- # wait for screen to unlock
- site_utils.poll_for_condition(
- lambda: self.is_screensaver_unlocked(),
- desc='screensaver unlock')
« no previous file with comments | « client/site_tests/desktopui_ScreenLocker/desktopui_ScreenLocker.py ('k') | server/site_tests/suite_BuildVerify/control » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698