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)
Tracking
(firefox162 fixed)
| 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.
| Assignee | ||
Comment 1•26 days ago
|
||
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.
Comment 3•25 days ago
|
||
| bugherder | ||
Updated•8 days ago
|
Description
•