Bug 1388627 - close_chrome_window always operates in chrome context. draft
authorHenrik Skupin <mail@hskupin.info>
Wed, 09 Aug 2017 10:40:47 +0200
changeset 643081 5d3073ff8eb1033d3a7e65603d8ef6fc2d94575a
parent 643080 79ecc1ad1eb96e62f1598312b9846f61a773fd33
child 725202 40f498897a401a36992a5b7bbe90a8febde9a983
push id72984
push userbmo:hskupin@gmail.com
push dateWed, 09 Aug 2017 08:41:10 +0000
bugs1388627
milestone57.0a1
Bug 1388627 - close_chrome_window always operates in chrome context. MozReview-Commit-ID: J1R407tTuy4
testing/marionette/harness/marionette_harness/runner/mixins/window_manager.py
--- a/testing/marionette/harness/marionette_harness/runner/mixins/window_manager.py
+++ b/testing/marionette/harness/marionette_harness/runner/mixins/window_manager.py
@@ -46,22 +46,21 @@ class WindowManagerMixin(object):
     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()
+        for handle in current_chrome_window_handles:
+            self.marionette.switch_to_window(handle)
+            self.marionette.close_chrome_window()
 
-            self.marionette.switch_to_window(self.start_window)
+        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()
             elif trigger == 'menu':