Skip to content

Commit

Permalink
Revert "[webdriver] Close old windows at the end of each test as well…
Browse files Browse the repository at this point in the history
… as beginning (#24879)" (#25544)

This reverts commit c35a4f0.

Unfortunately this broke the debugging flow of --pause-after-test; the
window is closed at the end of the test so the user can't see the
results or edit/refresh etc.
  • Loading branch information
stephenmcgruer authored Sep 15, 2020
1 parent f9c9e7b commit 3851e62
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions tools/wptrunner/wptrunner/executors/executorwebdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 3851e62

Please sign in to comment.