diff --git a/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tools/wptrunner/wptrunner/executors/executorwebdriver.py index 35d8019e0801e5..e0414669372e07 100644 --- a/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -409,10 +409,7 @@ def do_test(self, test): def do_testharness(self, protocol, url, timeout): format_map = {"url": strip_server(url)} - # In theory the previous test should have closed any leftover windows, - # but to avoid relying on that we also attempt cleanup here. parent_window = protocol.testharness.close_old_windows() - # Now start the test harness protocol.base.execute_script("window.open('about:blank', '%s', 'noopener')" % self.window_id) test_window = protocol.testharness.get_test_window(self.window_id, @@ -449,11 +446,6 @@ def do_testharness(self, protocol, url, timeout): done, rv = handler(result) if done: break - - # Attempt to cleanup any leftover windows. This should create a clean - # state for future tests, and expose any unexpectedly-open prompts. - protocol.testharness.close_old_windows() - return rv def wait_for_load(self, protocol):