Closed Bug 1912272 Opened 1 year ago Closed 1 year ago

Add more helpers to QuotaManagerDependencyFixture

Categories

(Core :: Storage: Quota Manager, task, P2)

task

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: janv, Assigned: janv)

References

Details

Attachments

(7 files)

Add more helpers to QuotaManagerDependencyFixture.

Currently, getting cached origin usage may trigger temporary storage
initialization which is a problem in tests when we want just compare real and
cached usage without affecting the state of initialization.

This patch changes the behavior to return Nothing if temporary storage is not
initialized.

Consumers may either explicitly make sure that temporary storage is initialized
before getting cached origin usage or they can use the other mode when real
usage is colleced from disk.

Summary: Add QuotaManagerDependencyFixture::GetCachedOriginUsage → Add more helpers to QuotaManagerDependencyFixture

There are plans to add nsIQuotaManagerService::getCachedUsageForPrincipal and
then remove the aFromMemory argument from
nsIQuotaManagerService::getUsageForPrincipal, so this patch adds a testing
method in that sense.

The return value is deduced from the performed function.

Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f795a7822089 Add Await convenience method to QuotaManagerDependencyFixture; r=dom-storage-reviewers,jari https://hg.mozilla.org/integration/autoland/rev/6a46455a6060 Add more helpers to QuotaManagerDependencyFixture; r=dom-storage-reviewers,jari https://hg.mozilla.org/integration/autoland/rev/2008800c7ecb Gettting cached origin usage shouldn't trigger temporary storage initialization; r=hsingh https://hg.mozilla.org/integration/autoland/rev/de34394ce390 Change GetOriginUsage to always require non-null output argument; r=dom-storage-reviewers,jari https://hg.mozilla.org/integration/autoland/rev/5ef242e1c4f9 Add QuotaManagerDependencyFixture::GetCachedOriginUsage; r=dom-storage-reviewers,jari https://hg.mozilla.org/integration/autoland/rev/abe159f8800d Add support for returning values from PerformOnThread functions; r=dom-storage-reviewers,jari https://hg.mozilla.org/integration/autoland/rev/5619d371ada1 Introduce ENSURE_NO_FATAL_FAILURE macro; r=dom-storage-reviewers,jari
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: