Open Bug 1794643 Opened 2 years ago Updated 1 year ago

Display scaling causes local test discrepancies with and without headless mode in test_label.xhtml

Categories

(Testing :: General, defect, P3)

Firefox 107
Desktop
Windows 11
defect

Tracking

(Not tracked)

People

(Reporter: nlapre, Unassigned)

Details

I run a monitor at 2560x1440 and use 125% scale (in Windows 11 settings, System -> Display -> Scale -> set to 125%). I've noticed that, when running some tests locally, things will fail without --headless but succeed with --headless. In particular, this check in test_label.xhtml fails locally for me at 125% scaling, but succeeds in headless mode or if I manually set the scaling to 100%. It seems that the text crops slightly differently (by one character) when scaling is adjusted up to 125%. Tests in CI appear to always run at 100% scaling.

Is there a way for tests to respect the scaling of the system in such a way that I don't have to manually adjust my scaling locally to reproduce the CI environment? Maybe a system pref that can be respected? If this is a problem larger than our testing infrastructure, or is specific to the accessible test suites (where I do almost all of my work) or this test in particular, please re-categorize :)

The severity field is not set for this bug.
:ahal, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(ahal)

I'm definitely not surprised that this would cause test failures :)

Making sure tests adapt to different scaling ratios would be ideal, but I don't think going through and updating hundreds or thousands of old tests (I'm guessing this would impact most reftests too), is very feasible or worthwhile. I'm also not sure how hard it would be.

Is there some way we could automatically adjust scaling at the start and restore it again at the end of a test run?

Severity: -- → S3
Flags: needinfo?(ahal)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.