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

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

Issue 5519008: Create a cros directory under client, and start moving things into it. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 10 years 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 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, site_auth_server 6 from autotest_lib.client.common_lib import error, site_auth_server
7 from autotest_lib.client.cros import constants as chromeos_constants
8 8
9 class login_CryptohomeIncognitoUnmounted(site_ui_test.UITest): 9 class login_CryptohomeIncognitoUnmounted(site_ui_test.UITest):
10 version = 1 10 version = 1
11 11
12 12
13 def __login_denier(self, handler, url_args): 13 def __login_denier(self, handler, url_args):
14 handler.send_response(403) 14 handler.send_response(403)
15 handler.end_headers() 15 handler.end_headers()
16 handler.wfile.write('Error=BadAuthentication.') 16 handler.wfile.write('Error=BadAuthentication.')
17 17
18 18
19 def start_authserver(self): 19 def start_authserver(self):
20 self._authServer = site_auth_server.GoogleAuthServer( 20 self._authServer = site_auth_server.GoogleAuthServer(
21 cl_responder=self.__login_denier) 21 cl_responder=self.__login_denier)
22 self._authServer.run() 22 self._authServer.run()
23 23
24 self.use_local_dns() 24 self.use_local_dns()
25 25
26 26
27 def run_once(self): 27 def run_once(self):
28 if (site_cryptohome.is_mounted(allow_fail=True) or 28 if (site_cryptohome.is_mounted(allow_fail=True) or
29 not site_cryptohome.is_mounted_on_tmpfs( 29 not site_cryptohome.is_mounted_on_tmpfs(
30 device=chromeos_constants.CRYPTOHOME_INCOGNITO)): 30 device=chromeos_constants.CRYPTOHOME_INCOGNITO)):
31 raise error.TestFail('CryptohomeIsMountedOnTmpfs should return ' 31 raise error.TestFail('CryptohomeIsMountedOnTmpfs should return '
32 'True.') 32 'True.')
33 self.logout() 33 self.logout()
34 # allow the command to fail, so we can handle the error here 34 # allow the command to fail, so we can handle the error here
35 if site_cryptohome.is_mounted(allow_fail=True): 35 if site_cryptohome.is_mounted(allow_fail=True):
36 raise error.TestFail('Expected cryptohome NOT to be mounted') 36 raise error.TestFail('Expected cryptohome NOT to be mounted')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698