browser_test_resolution.js seems to make some invalid assumptions
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: kats, Assigned: eeejay)
References
Details
Attachments
(1 file)
The test browser_test_resolution.js
here fails with some of the changes I have inflight for bug 1644271. The bug in question is enabling some of the MobileViewportManager
code (in particular, the code that sets the visual viewport size) in preparation for supporting APZ zooming on desktop.
The part of the test that fails as a result is this line on the p1 div. The reason is that the unscaled width taken here is the full browser window width without any scrollbars. After setting the 2.0 resolution scale, the browser now enables scrollbars (because the scaled content no longer fits in the window) and the scaledWidth comes out as 2 * (width - scrollbar_width)
instead of 2 * width
.
It's not really clear to me what assumptions this test is making, though. In a couple of places it seems to say that setResolution only does stuff on mobile, and so I'm wondering if this test is running on desktop as some sort of proxy, and not counting on the fact that on desktop we have non-overlay scrollbars (which affect layout space) while on mobile we only ever have overlay scrollbars (which do not affect layout space).
Reporter | ||
Comment 1•5 years ago
|
||
:eeejay as the original author of this test do you have any thoughts? I'm unsure what the best fix for this test is; it seems like forcing overlay scrollbars on desktop for the test might be the way to go.
Reporter | ||
Comment 2•5 years ago
|
||
Also to be clear: setResolution does do stuff on desktop now, so maybe that makes the test "valid on desktop" instead of just "proxy test for mobile" and the correct fix is something else.
Assignee | ||
Comment 3•5 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #1)
:eeejay as the original author of this test do you have any thoughts? I'm unsure what the best fix for this test is; it seems like forcing overlay scrollbars on desktop for the test might be the way to go.
I agree. I think overlay scrollbars will keep this test simple. It will still preserve its original purpose and will still have value in desktop cases. The scrollbar is irrelevant.
Assignee | ||
Comment 4•5 years ago
|
||
Using overlay scrollbars will avoid the need to account for the trimmed
space that is introduced after an overflowing zoom caused by scrollbars.
Updated•5 years ago
|
Comment 6•5 years ago
|
||
bugherder |
Description
•