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

Unified Diff: client/bin/site_login.py

Issue 1371003: test: Add desktopui_WindowManagerFocusNewWindows. (Closed)
Patch Set: (sort of) handle the case where we need to log in Created 10 years, 9 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
Index: client/bin/site_login.py
diff --git a/client/bin/site_login.py b/client/bin/site_login.py
index 7d212fc582bbaf25e26dd9071e379c159f9feda2..51b8a9d842c72ab78ab57b7f28ade6017e4c419b 100644
--- a/client/bin/site_login.py
+++ b/client/bin/site_login.py
@@ -88,6 +88,16 @@ def wait_for_screensaver(timeout=10, raise_error=True):
return True
+def wait_for_window_manager(timeout=20):
+ """Wait until the window manager is running."""
+ start_time = time.time()
+ while time.time() - start_time < timeout:
+ if os.system('pgrep ^%s$' % chromeos_constants.WINDOW_MANAGER) == 0:
+ return True
+ time.sleep(0.1)
+ return False
+
+
def nuke_login_manager():
nuke_process_by_name('session_manager')
wait_for_browser()

Powered by Google App Engine
This is Rietveld 408576698