Bug 1513023 - Wait for wpt tests to finish across reloads. r=ato, a=test-only
authorJames Graham <james@hoppipolla.co.uk>
Mon, 10 Dec 2018 18:39:39 +0000
changeset 508940 66f0ce8d3d6411977362f1c7f5dbf7615f394dea
parent 508939 15f8c7303cfb96d06492f1b450ba4ad1db9e85e4
child 508941 e2336587275ff698b85165c571fbd6bedd77109c
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato, test-only
Bug 1513023 - Wait for wpt tests to finish across reloads. r=ato, a=test-only When wpt is used by developers they often want to reload a test that's running to allow iterative development (or running under devtools, etc.). The recent switch to target marionette commands at the test window rather than the opener window broke this as waiting is implemented as an async script that never returns (i.e. a promise that never resolves) and when this is in the test window navigating that window causes the script to return. A simple, but not particuarly elegant, solution here is to simply rerun the script in the new window. Differential Revision: https://phabricator.services.mozilla.com/D14087
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py
@@ -93,16 +93,20 @@ class MarionetteBaseProtocolPart(BasePro
             except errors.NoSuchWindowException:
                 # The window closed
             except errors.ScriptTimeoutException:
                 self.logger.debug("Script timed out")
+            except errors.JavascriptException as e:
+                # This can happen if we navigate, but just keep going
+                self.logger.debug(e.message)
+                pass
             except IOError:
                 self.logger.debug("Socket closed")
             except Exception as e: