| Index: client/site_tests/login_ChromeProfileSanitary/login_ChromeProfileSanitary.py
|
| diff --git a/client/site_tests/login_ChromeProfileSanitary/login_ChromeProfileSanitary.py b/client/site_tests/login_ChromeProfileSanitary/login_ChromeProfileSanitary.py
|
| index 257e35cb27a4b62a337765db64d34c5b8930a6e8..12120c2b5cc28aeb7dc8000f562b0a86f0c14ae4 100644
|
| --- a/client/site_tests/login_ChromeProfileSanitary/login_ChromeProfileSanitary.py
|
| +++ b/client/site_tests/login_ChromeProfileSanitary/login_ChromeProfileSanitary.py
|
| @@ -54,11 +54,13 @@ class login_ChromeProfileSanitary(site_ui_test.UITest):
|
| cookies_info = os.stat(chromeos_constants.LOGIN_PROFILE + '/Cookies')
|
| cookies_mtime = cookies_info[stat.ST_MTIME]
|
|
|
| - # "crash" chrome.
|
| + # Wait for chrome to show, then "crash" it.
|
| site_login.wait_for_initial_chrome_window()
|
| site_login.nuke_process_by_name(chromeos_constants.BROWSER,
|
| with_prejudice = True)
|
| + site_login.refresh_window_manager()
|
| site_login.wait_for_browser()
|
| + site_login.wait_for_initial_chrome_window()
|
|
|
| # Navigate to site that leaves cookies.
|
| latch = self._testServer.add_wait_url(self._wait_path)
|
| @@ -69,14 +71,12 @@ class login_ChromeProfileSanitary(site_ui_test.UITest):
|
| clean_state=False)
|
| logging.debug('Chrome session started.')
|
| latch.wait(timeout)
|
| -
|
| - # Ensure chrome writes state to disk.
|
| - self.logout()
|
| - self.login()
|
| -
|
| if not latch.is_set():
|
| raise error.TestError('Never received callback from browser.')
|
|
|
| + # Ensure chrome writes state to disk.
|
| + self.login() # will logout automatically
|
| +
|
| # Check mtime of Default/Cookies. If changed, KABLOOEY.
|
| self.__wait_for_login_profile()
|
| cookies_info = os.stat(chromeos_constants.LOGIN_PROFILE + '/Cookies')
|
|
|