Closed Bug 2092273 Opened 13 days ago Closed 9 days ago

browser_privatebrowsing_downloadLastDir.js fails when run twice in the same profile: per-site download directory content pref leaks

Categories

(Firefox :: Private Browsing, task)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

browser_privatebrowsing_downloadLastDir.js fails on its second run in the same browser (as in the upcoming mochitest-repeat jobs) with File picker should start with browser.download.lastDir - Got "$TMP/testdir-2", expected "$TMP".

Saving from a non-private window makes DownloadLastDir.setFile store the directory as a per-site content pref for test1.com, as well as in browser.download.lastDir. The test's cleanup only clears the pref. The second run recreates the same testdir* directories, so the picker starts in the directory the first run saved last.

The fix is to remove the browser.download.lastDir content pref in the cleanup function as well.

Otherwise a second run in the same profile starts the file picker in the directory the first run last saved to for test1.com.

Blocks: 2092566
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9aa8ef1e8595 https://hg.mozilla.org/integration/autoland/rev/de68ce057da8 Clear the per-site download directory content pref in browser_privatebrowsing_downloadLastDir.js cleanup, r=firefox-desktop-core-reviewers ,Gijs.
Status: ASSIGNED → RESOLVED
Closed: 9 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: