Skip to content

Commit

Permalink
Suppress webdriver executor timeout when debugger present.
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Matthews <[email protected]>
  • Loading branch information
jdm committed Jan 15, 2025
1 parent 475127f commit 96d8105
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tools/wptrunner/wptrunner/executors/executorwebdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,8 @@ def teardown(self):

class WebDriverRun(TimedRunner):
def set_timeout(self):
if not self.timeout:
return
try:
self.protocol.base.set_timeout(self.timeout + self.extra_timeout)
except webdriver_error.UnknownErrorException:
Expand Down Expand Up @@ -976,11 +978,14 @@ def on_environment_change(self, new_environment):
def do_test(self, test):
url = self.test_url(test)

timeout = (test.timeout * self.timeout_multiplier if self.debug_info is None
else None)

success, data = WebDriverRun(self.logger,
self.do_testharness,
self.protocol,
url,
test.timeout * self.timeout_multiplier,
timeout,
self.extra_timeout).run()

if success:
Expand Down Expand Up @@ -1096,11 +1101,13 @@ def screenshot(self, test, viewport_size, dpi, page_ranges):
assert viewport_size is None
assert dpi is None

timeout = self.timeout_multiplier * test.timeout if self.debug_info is None else None

return WebDriverRun(self.logger,
self._screenshot,
self.protocol,
self.test_url(test),
test.timeout,
timeout,
self.extra_timeout).run()

def _screenshot(self, protocol, url, timeout):
Expand Down

0 comments on commit 96d8105

Please sign in to comment.