| 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 |
| 6 from autotest_lib.client.bin import chromeos_constants |
| 7 from autotest_lib.client.bin import site_cryptohome, site_login, site_ui_test |
| 5 | 8 |
| 6 from autotest_lib.client.bin import site_login, site_ui_test | 9 |
| 10 TEST_USER = 'cryptohome_test@chromium.org' |
| 11 TEST_PASS = 'testme' |
| 12 TEST_FILE = os.path.join(chromeos_constants.CRYPTOHOME_MOUNT_PT, 'hello') |
| 7 | 13 |
| 8 | 14 |
| 9 class login_CryptohomeMounted(site_ui_test.UITest): | 15 class login_CryptohomeMounted(site_ui_test.UITest): |
| 10 version = 1 | 16 version = 1 |
| 11 | 17 |
| 12 def run_once(self): | 18 def run_once(self): |
| 13 site_login.wait_for_cryptohome() | 19 site_login.wait_for_cryptohome() |
| 20 site_login.attempt_logout() |
| 21 site_cryptohome.remove_vault(TEST_USER) |
| 22 site_cryptohome.mount_vault(TEST_USER, TEST_PASS, create=True) |
| 23 open(TEST_FILE, 'w').close() |
| 24 self.login() |
| 25 site_login.wait_for_cryptohome() |
| 26 self.assert_(not os.path.exists(TEST_FILE)) |
| OLD | NEW |