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

Side by Side Diff: client/site_tests/login_ChromeProfileSanitary/login_ChromeProfileSanitary.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 import logging, os, stat, time, utils 5 import logging, os, stat, time, utils
6 from autotest_lib.client.bin import chromeos_constants, site_cryptohome 6 from autotest_lib.client.bin import site_cryptohome
7 from autotest_lib.client.bin import site_login, site_ui_test 7 from autotest_lib.client.bin import site_login, site_ui_test
8 from autotest_lib.client.cros import constants as chromeos_constants
8 from autotest_lib.client.common_lib import error, site_httpd, site_ui 9 from autotest_lib.client.common_lib import error, site_httpd, site_ui
9 10
10 def respond_with_cookies(handler, url_args): 11 def respond_with_cookies(handler, url_args):
11 """Responds with a Set-Cookie header to any GET request, and redirects 12 """Responds with a Set-Cookie header to any GET request, and redirects
12 to a chosen URL. 13 to a chosen URL.
13 """ 14 """
14 handler.send_response(303) 15 handler.send_response(303)
15 handler.send_header('Set-Cookie', 'name=value') 16 handler.send_header('Set-Cookie', 'name=value')
16 handler.send_header('Location', url_args['continue'][0]) 17 handler.send_header('Location', url_args['continue'][0])
17 handler.end_headers() 18 handler.end_headers()
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 # Ensure chrome writes state to disk. 78 # Ensure chrome writes state to disk.
78 self.login() # will logout automatically 79 self.login() # will logout automatically
79 80
80 # Check mtime of Default/Cookies. If changed, KABLOOEY. 81 # Check mtime of Default/Cookies. If changed, KABLOOEY.
81 self.__wait_for_login_profile() 82 self.__wait_for_login_profile()
82 cookies_info = os.stat(chromeos_constants.LOGIN_PROFILE + '/Cookies') 83 cookies_info = os.stat(chromeos_constants.LOGIN_PROFILE + '/Cookies')
83 # TODO: Note that this currently (20100329) fails and will continue to 84 # TODO: Note that this currently (20100329) fails and will continue to
84 # do so until http://crosbug.com/1967 is fixed. 85 # do so until http://crosbug.com/1967 is fixed.
85 if cookies_mtime != cookies_info[stat.ST_MTIME]: 86 if cookies_mtime != cookies_info[stat.ST_MTIME]:
86 raise error.TestFail('Cookies in Default profile changed!') 87 raise error.TestFail('Cookies in Default profile changed!')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698