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

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

Issue 3404010: autotest: Make WM tests wait for initial browser window. (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Created 10 years, 3 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 | « no previous file | client/site_tests/desktopui_WindowManagerHotkeys/desktopui_WindowManagerHotkeys.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/site_tests/desktopui_WindowManagerFocusNewWindows/desktopui_WindowManagerFocusNewWindows.py
diff --git a/client/site_tests/desktopui_WindowManagerFocusNewWindows/desktopui_WindowManagerFocusNewWindows.py b/client/site_tests/desktopui_WindowManagerFocusNewWindows/desktopui_WindowManagerFocusNewWindows.py
index e5b18f20a9d76c89c3dc7c941ed120a54cb7e57c..4e8b917e1662051a6274ad19a9836934cb6a770a 100644
--- a/client/site_tests/desktopui_WindowManagerFocusNewWindows/desktopui_WindowManagerFocusNewWindows.py
+++ b/client/site_tests/desktopui_WindowManagerFocusNewWindows/desktopui_WindowManagerFocusNewWindows.py
@@ -3,7 +3,7 @@
# found in the LICENSE file.
import os, time
-from autotest_lib.client.bin import site_ui_test, test
+from autotest_lib.client.bin import site_login, site_ui_test, test
from autotest_lib.client.common_lib import error
class desktopui_WindowManagerFocusNewWindows(site_ui_test.UITest):
@@ -21,11 +21,11 @@ class desktopui_WindowManagerFocusNewWindows(site_ui_test.UITest):
"""
try:
self.autox.await_condition(
- lambda: info.is_focused,
- desc='Waiting for window 0x%x to be focused' % id)
- self.autox.await_condition(
lambda: self.autox.get_active_window_property() == id,
desc='Waiting for _NET_ACTIVE_WINDOW to contain 0x%x' % id)
Daniel Erat 2010/09/17 17:31:57 The window manager sets the property before it ass
kmixter1 2010/09/17 20:32:37 Not sure if this reordering is being done to be mo
Daniel Erat 2010/09/17 20:39:21 It's the former. :-)
+ self.autox.await_condition(
+ lambda: info.is_focused,
+ desc='Waiting for window 0x%x to be focused' % id)
# get_geometry() returns a tuple, so we need to construct a tuple to
# compare against it.
@@ -44,6 +44,10 @@ class desktopui_WindowManagerFocusNewWindows(site_ui_test.UITest):
'Timed out on condition: %s' % exception.__str__())
def run_once(self):
+ # Make sure that we don't have the initial browser window popping up in
+ # the middle of the test.
+ site_login.wait_for_initial_chrome_window()
+
self.autox = self.get_autox()
# Create a window and check that we switch to it.
@@ -58,14 +62,6 @@ class desktopui_WindowManagerFocusNewWindows(site_ui_test.UITest):
info2 = self.autox.get_window_info(win2.id)
self.__check_active_window(win2.id, info2)
- # Cycle backwards to the first window.
- self.autox.send_hotkey('Alt-Shift-Tab')
- self.__check_active_window(win.id, info)
-
- # Cycle forwards to the second window.
- self.autox.send_hotkey('Alt-Tab')
- self.__check_active_window(win2.id, info2)
-
# Now destroy the second window and check that the WM goes back
# to the first window.
win2.destroy()
« no previous file with comments | « no previous file | client/site_tests/desktopui_WindowManagerHotkeys/desktopui_WindowManagerHotkeys.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698