QM: Add dedicated test for temporary storage eviction using SimpleDB
Categories
(Core :: Storage: Quota Manager, task, P2)
Tracking
()
People
(Reporter: janv, Assigned: janv)
References
(Blocks 1 open bug)
Details
(Keywords: leave-open)
Attachments
(3 files)
The goal of this bug is to add a dedicated test for temporary storage eviction using the SimpleDB internal API. This will restore essential coverage that was lost years ago.
Historically, test_temporary_storage.js
(added in bug 785884) was intended to verify core eviction behavior for temporary storage, but it was rewritten in bug 1144806 due to intermittent failures. At that time, SimpleDB/LSNG was not yet available, and the test relied on IndexedDB, which introduced unpredictable storage usage that made precise quota control difficult. As a result, some of the general eviction coverage was lost during the rewrite.
There are still a few xpcshell tests for eviction, such as:
However, these focus on specific edge cases, such as persisted origins or client-specific behavior, and do not provide a broad, controlled view of origin eviction functionality.
This bug will introduce a new test that:
- Uses SimpleDB for deterministic writes and predictable storage usage
- Covers eviction behavior across multiple origins
- Simulates semi-realistic usage patterns in separate stages
- Verifies access time tracking, inactivity-based eviction, and quota shrinking behavior
By restoring this coverage, we can ensure that core eviction logic remains well-tested and that future changes do not unintentionally regress existing behavior.
Assignee | ||
Comment 1•20 days ago
|
||
Adds a new pref, dom.quotaManager.temporaryStorage.updateOriginAccessTime, to
allow disabling updates of origin access time in temporary storage.
This pref is intended for manual testing and debugging. The goal is to
temporarily disable access time tracking and confirm that our current test
suite does not fail, which highlights that we are missing test coverage for
this behavior.
The default value is true to preserve current behavior.
Assignee | ||
Comment 2•20 days ago
|
||
Updates several tests to explicitly disable the quota info cache by setting
dom.quotaManager.loadQuotaFromCache to false.
These tests were previously relying on origin access time updates (which set
the "accessed" flag) to trigger full origin scans. This behavior was a side
effect rather than an intentional part of the test logic.
Disabling the quota info cache ensures these tests do not depend on unrelated
behavior and continue to pass even when access time updates are disabled via
the dom.quotaManager.temporaryStorage.updateOriginAccessTime pref.
This is a follow-up to the patch that added the pref for manual testing.
Assignee | ||
Comment 3•20 days ago
|
||
This patch adds a new test that verifies temporary storage eviction logic using
the internal SimpleDB API. This test restores essential coverage that was lost
when test_temporary_storage.js was rewritten in the past because IndexedDB
increases storage usage unpredictably, making precise eviction testing
difficult.
See the main comment in the test for details on each simulated stage and what
behavior is being verified.
Assignee | ||
Updated•4 days ago
|
Comment 5•4 days ago
|
||
bugherder |
Comment 7•4 days ago
|
||
bugherder |
Description
•