Bug 1373444 - Look for NoSuchWindowException when waiting for manual browser close in wpt. r=maja_zf, a=test-only
authorJames Graham <james@hoppipolla.co.uk>
Thu, 31 Aug 2017 16:12:26 +0100
changeset 423933 d0fb17cf639bff43bde763ae81515bca8089047d
parent 423932 ba89ef7040e03c1c6e92a4adeeac0903124d6c80
child 423934 83a250a0a345c83cac9a46c27f7a8c9dd77e264a
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf, test-only
bugs1373444
milestone56.0
Bug 1373444 - Look for NoSuchWindowException when waiting for manual browser close in wpt. r=maja_zf, a=test-only This method works by running a long-running script and catching the exception when it is interrupted. But the exception changed so we must make a corresponding change here. MozReview-Commit-ID: EdZZAOVZ0Sw
testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py
@@ -175,24 +175,27 @@ class MarionetteProtocol(Protocol):
         socket_timeout = self.marionette.client.sock.gettimeout()
         if socket_timeout:
             self.marionette.timeout.script = socket_timeout / 2
 
         self.marionette.switch_to_window(self.runner_handle)
         while True:
             try:
                 self.marionette.execute_async_script("")
+            except errors.NoSuchWindowException:
+                # The window closed
+                break
             except errors.ScriptTimeoutException:
                 self.logger.debug("Script timed out")
                 pass
             except (socket.timeout, IOError):
                 self.logger.debug("Socket closed")
                 break
             except Exception as e:
-                self.logger.error(traceback.format_exc(e))
+                self.logger.warning(traceback.format_exc(e))
                 break
 
     def on_environment_change(self, old_environment, new_environment):
         #Unset all the old prefs
         for name in old_environment.get("prefs", {}).iterkeys():
             value = self.executor.original_pref_values[name]
             if value is None:
                 self.clear_user_pref(name)