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 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)) |
OLD | NEW |