Bug 1388627 - Remove obsolete Wait.until() calls from Window Manager Mixin.
Given that both 'close' and 'close_chrome_window' wait for the underlying
tab or window to be closed, there is not need to explicitely wait in tests.
MozReview-Commit-ID: HOGgqzkNE9d
--- a/testing/marionette/harness/marionette_harness/runner/mixins/window_manager.py
+++ b/testing/marionette/harness/marionette_harness/runner/mixins/window_manager.py
@@ -36,43 +36,31 @@ class WindowManagerMixin(object):
if self.start_tab not in current_window_handles:
self.start_tab = current_window_handles[0]
current_window_handles.remove(self.start_tab)
for handle in current_window_handles:
self.marionette.switch_to_window(handle)
self.marionette.close()
- # Bug 1311350 - close() doesn't wait for tab to be closed.
- Wait(self.marionette).until(
- lambda mn: handle not in mn.window_handles,
- message="Failed to close tab with handle {}".format(handle)
- )
-
self.marionette.switch_to_window(self.start_tab)
def close_all_windows(self):
current_chrome_window_handles = self.marionette.chrome_window_handles
# If the start window is not present anymore, use the next one of the list
if self.start_window not in current_chrome_window_handles:
self.start_window = current_chrome_window_handles[0]
current_chrome_window_handles.remove(self.start_window)
with self.marionette.using_context("chrome"):
for handle in current_chrome_window_handles:
self.marionette.switch_to_window(handle)
self.marionette.close_chrome_window()
- # Bug 1311350 - close_chrome_window() doesn't wait for window to be closed.
- Wait(self.marionette).until(
- lambda mn: handle not in mn.chrome_window_handles,
- message="Failed to close window with handle {}".format(handle)
- )
-
self.marionette.switch_to_window(self.start_window)
def open_tab(self, trigger="menu"):
current_tabs = self.marionette.window_handles
try:
if callable(trigger):
trigger()