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

Side by Side Diff: client/site_tests/login_CryptohomeMounted/login_CryptohomeMounted.py

Issue 5740004: Move site_chrome_test, site_logging, site_log_reader, site_crash_test into cros dir. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 os 5 import os
6 from autotest_lib.client.cros import constants as chromeos_constants 6 from autotest_lib.client.cros import constants as chromeos_constants
7 from autotest_lib.client.cros import cryptohome, login, ui_test 7 from autotest_lib.client.cros import cros_ui_test, cryptohome, login
8 8
9 TEST_USER = 'cryptohome_test@chromium.org' 9 TEST_USER = 'cryptohome_test@chromium.org'
10 TEST_PASS = 'testme' 10 TEST_PASS = 'testme'
11 TEST_FILE = os.path.join(chromeos_constants.CRYPTOHOME_MOUNT_PT, 'hello') 11 TEST_FILE = os.path.join(chromeos_constants.CRYPTOHOME_MOUNT_PT, 'hello')
12 12
13 13
14 class login_CryptohomeMounted(ui_test.UITest): 14 class login_CryptohomeMounted(cros_ui_test.UITest):
15 version = 1 15 version = 1
16 16
17 def initialize(self, creds='$default'): 17 def initialize(self, creds='$default'):
18 super(login_CryptohomeMounted, self).initialize(creds) 18 super(login_CryptohomeMounted, self).initialize(creds)
19 19
20 20
21 def run_once(self): 21 def run_once(self):
22 login.wait_for_cryptohome() 22 login.wait_for_cryptohome()
23 login.attempt_logout() 23 login.attempt_logout()
24 cryptohome.remove_vault(TEST_USER) 24 cryptohome.remove_vault(TEST_USER)
25 cryptohome.mount_vault(TEST_USER, TEST_PASS, create=True) 25 cryptohome.mount_vault(TEST_USER, TEST_PASS, create=True)
26 open(TEST_FILE, 'w').close() 26 open(TEST_FILE, 'w').close()
27 self.login() 27 self.login()
28 login.wait_for_cryptohome() 28 login.wait_for_cryptohome()
29 self.assert_(not os.path.exists(TEST_FILE)) 29 self.assert_(not os.path.exists(TEST_FILE))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698