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

Unified Diff: client/site_tests/login_ChromeProfileSanitary/login_ChromeProfileSanitary.py

Issue 1631027: Update and stabilize login_ChromeProfileSanitary (Closed)
Patch Set: Created 10 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/bin/site_login.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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')
« no previous file with comments | « client/bin/site_login.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698