Skip to content

Commit

Permalink
[wptrunner] Clear cookies between testharness tests for Chrome (#48106)
Browse files Browse the repository at this point in the history
Work around #48078 with CDP [0] in the absence of a robust cross-vendor
solution.

[0]: https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-clearBrowserCookies
  • Loading branch information
jonathan-j-lee committed Sep 12, 2024
1 parent 9605a2c commit 199e58f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/wptrunner/wptrunner/executors/executorchrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ def close_old_windows(self):
if not self.reuse_window:
self.close_test_window()
self.webdriver.window_handle = self.runner_handle
# TODO(web-platform-tests/wpt#48078): Find a cross-platform way to clear
# cookies for all domains.
self.parent.cdp.execute_cdp_command("Network.clearBrowserCookies")
return self.runner_handle

def open_test_window(self, window_id):
Expand Down

0 comments on commit 199e58f

Please sign in to comment.