Closed Bug 1788182 Opened 3 years ago Closed 3 years ago

QM: Expose some methods to be able to work with quota manager in gtests

Categories

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

task

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: janv, Assigned: janv)

Details

Attachments

(1 file)

The "profile-do-change" notification is not fired in gtests, so some stuff which is initialized on the main thread and later used during QuotaManager::GetOrCreate is not available, so the method fails. The notification can't be send through the observer service because some other services would receive it and we would eventually hit some assertions because those services are not ready to receive it in gtests. So we need send the notification directly.
The other problem is that after quota manager shutdown, the gShutdown flag is still set to true which can also affect other gtests, so it's better to reset everything before a gtest which temporarily needs to use quota manager is finished.

Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/129809e05bab QM: Expose some methods to be able to work with quota manager in gtests; r=dom-storage-reviewers,jesup

Backed out along with Bug 1786465, Bug 1788178 for causing bustage on TestFileSystemDataManager.cpp

Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7c302d2d2d70 QM: Expose some methods to be able to work with quota manager in gtests; r=dom-storage-reviewers,jesup
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: