| 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 from autotest_lib.client.bin import chromeos_constants | |
| 6 from autotest_lib.client.bin import site_cryptohome, site_ui_test | 5 from autotest_lib.client.bin import site_cryptohome, site_ui_test |
| 7 from autotest_lib.client.common_lib import error | 6 from autotest_lib.client.common_lib import error |
| 8 | 7 |
| 9 class login_CryptohomeUnmounted(site_ui_test.UITest): | 8 class login_CryptohomeUnmounted(site_ui_test.UITest): |
| 10 version = 1 | 9 version = 1 |
| 11 | 10 |
| 12 | 11 |
| 13 def run_once(self): | 12 def run_once(self): |
| 14 if not site_cryptohome.is_mounted(allow_fail=False): | 13 if not site_cryptohome.is_mounted(allow_fail=False): |
| 15 raise error.TestFail('Expected cryptohome to be mounted') | 14 raise error.TestFail('Expected cryptohome to be mounted') |
| 16 | 15 |
| 17 self.logout() | 16 self.logout() |
| 18 | 17 |
| 19 # allow the command to fail, so we can handle the error here | 18 # allow the command to fail, so we can handle the error here |
| 20 if site_cryptohome.is_mounted(allow_fail=True): | 19 if site_cryptohome.is_mounted(allow_fail=True): |
| 21 raise error.TestFail('Expected cryptohome NOT to be mounted') | 20 raise error.TestFail('Expected cryptohome NOT to be mounted') |
| OLD | NEW |