Closed Bug 2090968 Opened 26 days ago Closed 25 days ago

browser_viewport_resolution_restore.js fails when run twice in a row: the browser window resolution is not reset

Categories

(DevTools :: Responsive Design Mode, task)

task

Tracking

(firefox162 fixed)

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

browser_viewport_resolution_restore.js calls setResolutionAndScaleTo() on the browser window's windowUtils (browser.documentGlobal) and never restores it. The last case leaves the resolution at 1.1, so when the test runs a second time in the same browser (the upcoming mochitest-repeat jobs), the first case fails with "width=600 resolution should be near 1, and we got 1.100000023841858".

The fix resets the resolution to 1 in a registerCleanupFunction.

Side note: RDM never changes the browser window's resolution, so the test doesn't exercise what its header comment describes.

The test sets the resolution of the browser window holding the tab and never restores it, so the last case's 1.1 leaks into the next run of the test, whose first case expects 1.

Blocks: 2090991
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f50ab3f44ef1 https://hg.mozilla.org/integration/autoland/rev/5b2de7e114df Reset the browser window resolution after browser_viewport_resolution_restore.js, r=devtools-reviewers,nchevobbe.
Status: ASSIGNED → RESOLVED
Closed: 25 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
QA Whiteboard: [qa-triage-done-c163/b162]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: