Closed Bug 1629825 Opened 4 years ago Closed 4 years ago

Add test for removing appcache data

Categories

(Core :: Networking: Cache, task, P2)

task

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: valentin, Assigned: valentin)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

We want to make sure that even when the pref is off that we still remove the appcache data when requested.
This bug is meant to add a test ensuring we do so.

FWIW I'm tracking having structured unit tests for ClearDataService here: https://bugzilla.mozilla.org/show_bug.cgi?id=1538633. While we don't have a unit test for the ClearDataService for AppCache, yet, there are at least two other tests that are testing AppCache removal of some sort: https://searchfox.org/mozilla-central/source/browser/base/content/test/sanitize/browser_sanitizeDialog.js#522 and https://searchfox.org/mozilla-central/source/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js#88

Maybe there are other tests, too. So, while it's probably fine to write a new test, an alternative approach could be looking at these tests and ensuring that they cover this case (and run successfully).

This bug was initially about adding a test that we can still clear appcache
data even when the storage pref is off.
However, due to the fact that we only check the pref at startup and then
are unable to access the storage device if disabled, it's best to just
delete the OfflineCache folder shortly after startup.

Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/8f42708d9a47
Delete Appcache directory when storage pref is turned off r=necko-reviewers,kershaw
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: