Closed Bug 2092283 Opened 13 days ago Closed 12 days ago

browser_Manifest_install.js fails when run twice in the same browser: "We haven't installed this manifest yet - Got true, expected false"

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

dom/manifest/test/browser_Manifest_install.js installs a web app manifest and never removes it. The cached Manifest object, its JSON file in the profile and its scope entry are all still there when the test runs a second time, so its first check fails in the upcoming mochitest-browser-chrome-repeat jobs on every platform. This is also why the test is skipped under verify-standalone.

The test also deletes the first Manifest object from the cache while its JSONFile saveSoon() is still armed, and that late save writes the file again after cleanup.

The fix finalizes that store instead of calling _save() on it, adds a cleanup function that removes the cache entry, the file and the scope, and removes the verify-standalone skip-if added in bug 1995208.

The test left its manifest installed: the cached Manifest object, its file in the profile, and its scope entry. The first Manifest object also still had a pending deferred save, which rewrote the file after the test ended, so finalize it instead of only saving it. This makes the test pass when run twice in the same browser and under verify-standalone, so remove the verify-standalone annotation from bug 1995208.

Blocks: 2092566
Status: ASSIGNED → RESOLVED
Closed: 12 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: