Closed
Bug 2090991
Opened 21 days ago
Closed 11 days ago
[meta] Fix the devtools tests that fail when run twice in a row
Categories
(DevTools :: Storage Inspector, task)
DevTools
Storage Inspector
Tracking
(firefox162 fixed)
RESOLVED
FIXED
162 Branch
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: florian, Assigned: florian)
References
Details
(Keywords: meta)
Attachments
(1 external file)
Running every mochitest twice in a row, as the upcoming mochitest-repeat jobs do, exposed devtools tests that fail on the second run because the first one left state behind (cache entries, files, window settings, databases, console session state), plus three product bugs that only show up on a repeated run.
Easy test-only patches
browser_net_cached-status.js(bug 1975964): the test left its responses in the HTTP cache, so the second run's "uncached" requests were cache hits. The test now clears the cache in cleanup.browser_networkobserver_localMode.js(bug 2086525): on Linux the test wrote an<img>file into its folder and never deleted it, so the next run clicked the wrong link. It is now removed in cleanup.browser_viewport_resolution_restore.js(bug 2090968): the test sets the browser window's resolution and never resets it, so the second run starts from the first run's last value. A cleanup now resets it.browser_console_restore.js(bug 2090970): the test stores the Browser Console session state, which sets a singleton flag it never resets, so the second run fails its first check. The test now resets the state at the end.
Test fixes that need a closer look
browser_dbg-overrides.js(bug 2090982): the test lefttest.jsin the temp dir, so on the second run its existence check passed early and the original source overwrote the override. The file is now removed in cleanup, and the test waits for the override to be set.browser_webconsole_show_subresource_security_errors.js(bug 2090983): on the second run the script with the broken STS header came from the HTTP cache, so no warning was logged. It is now served withCache-Control: no-store, and theskip-iffor verify is dropped.
Product fixes
browser_allocations_inspector_selections.jsandbrowser_allocations_reload_inspector.js(bug 2090987): on the second run the allocation tracker'sacceptGlobalthrew on the first run's closed but not yet collected inspector window. It now ignores closed windows.browser_console_eager_eval_resolve.js(bug 2090984 and bug 2090986): the test ran in the parent process, where the first run permanently loads the module it checks is not loaded. It now evaluates in a new content process, and the content process target actor gets the objects-manager actor that clearing the Browser Console needs there.browser_storage_fission_indexeddb.js(bug 2090969, both patches): after the test's cleanup deleted its database, the storage inspector reopened it without a version and recreated it empty, so the second run's setup hung. The actor no longer creates missing databases, and the test closes its own IndexedDB connection.
Comment 1•21 days ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Storage Inspector' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Component: General → Storage Inspector
| Assignee | ||
Comment 2•16 days ago
|
||
Like the standalone variant: on backstop pushes, on Linux and Windows only, to
spare the mac pool.
Pushed by fqueze@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/c84ff4d98496
https://hg.mozilla.org/integration/autoland/rev/b23bcf6a79e2
Run mochitest-devtools-chrome-repeat on autoland and mozilla-central, r=taskgraph-reviewers,ahal.
Comment 4•11 days ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 11 days ago
status-firefox162:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
Updated•3 days ago
|
QA Whiteboard: [qa-triage-done-c163/b162]
You need to log in
before you can comment on or make changes to this bug.
Description
•