Closed Bug 1748664 Opened 2 years ago Closed 2 years ago

Add test case for clearing CORS preflight cache between private browsing sessions

Categories

(Core :: DOM: Networking, task, P3)

task

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: manuel, Assigned: manuel)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

Follow up on Bug 1738150.

Opening a follow up, because it is a rather big task. I made that the cache is cleared manually by opening the test testing/web-platform/tests/cors/preflight-cache via ./mach test testing/web-platform/tests/cors/preflight-cache.htm in the private browsing tab and adding print statement at the relevant places.

Automatically executing that test is a bit harder, thats why I opened this follow up bug. Additional information: https://phabricator.services.mozilla.com/D133196#4379356

I'll probably have to figure out how to execute the web-platform test in the private browsing window and check that the cache gets cleared when closing the private browsing window.

Severity: -- → N/A
Priority: -- → P3
Whiteboard: [necko-triaged]

I'll probably have to figure out how to execute the web-platform test in the private browsing window and check that the cache gets cleared when closing the private browsing window.

I think it's not that complicated.
The test steps in my mind are:

  1. Create a private window (await BrowserTestUtils.openNewBrowserWindow({ private: true });).
  2. Test if the CORS cache works with the private window. This function seems to do the trick.
  3. Close the private window.
  4. Test if CORS cache from the private window is cleared.

Maybe add a new task in toolkit/components/cleardata/tests/browser/browser_preflight_cache.js is easier than creating a new test file.

Flags: needinfo?(mbucher)
Assignee: nobody → mbucher
Status: NEW → ASSIGNED
Flags: needinfo?(mbucher)
Pushed by mbucher@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7b4c655e6965
Test that CORS-preflight cache get cleared after last private browsing window closes r=necko-reviewers,valentin
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: