Skip to content

Commit

Permalink
WPT clear-cache.https.html: clarify and cleanup test function
Browse files Browse the repository at this point in the history
Clearing cookies isn't necessary, because the test doesn't rely on cookies anymore.

Differential Revision: https://phabricator.services.mozilla.com/D234941

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1942778
gecko-commit: 5634203a9e231baac99c8dc43d74445dd600d64c
gecko-reviewers: anti-tracking-reviewers, emz
  • Loading branch information
mb authored and moz-wptsync-bot committed Jan 21, 2025
1 parent 88234ea commit 41bcf67
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions clear-site-data/clear-cache.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

// Here's the set-up for this test:
// Step 1 (main window) Open first window with first url putting some resource
// into the cache and maybe receiving clear-site-data header
// Step 2 (first window) Message first window with uuid
// into the cache and maybe receiving clear-site-data header
// Step 2 (first window) Message main window with uuid
// Step 3 (main window) Open second window with second url
// Step 4 (second window) Message first window with uuid (either cached or non-cached)
// Step 4 (second window) Message main window with uuid (either cached or non-cached)
// Optional Step 5 (main window) Open third window with third url
// Optional Step 6 (third window) Message first window with uuid (either cached or non-cached)
// Optional Step 6 (third window) Message main window with uuid (either cached or non-cached)
// Step 7 (main window): Assert first and last uuid not equal due to `clear-site-data: "cache"` header
function test_cache_clear(test, params1, params2, params3) {
let cache_helper = "cache_helper=" + self.crypto.randomUUID() + "&";
Expand Down Expand Up @@ -60,8 +60,6 @@
// Step 1
let first_window = window.open(firstUrl);
test.add_cleanup(first_window.close);
// tests are using cookies to differentiate between requests
test.add_cleanup(test_driver.delete_all_cookies)
});
}

Expand Down

0 comments on commit 41bcf67

Please sign in to comment.