-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
While investigating this revert, a couple of concerning things were discovered wrt the Flutter test suite in the web.
-
The revert was caused because some tests failed when the
sceneof the HTML renderer started respecting the "overridden" value ofdevicePixelRatioto report its "logical size".- Bad behavior that fixed golden tests and allowed
hostElementto reland was introduced here. - This used to work before because we were using the logical size directly from the
windowJS object, which doesn't care about overrides.
- Bad behavior that fixed golden tests and allowed
-
The devicePixelRatio overridden by flutter tests (3.0) does NOT match the devicePixelRatio set by the browser when it starts.
- In fact, the browser is starting always with DPR=1. It should pass
'--force-device-scale-factor=X'for other DPRs.
- In fact, the browser is starting always with DPR=1. It should pass
-
By hijacking theFixed by: Pass along web renderer into debugging options in the test command. #143128_matchers_web.dartfile, it seems that theisCanvasKitboolean used there to determine how to match a golden never returnstrue(this might be a regression)
TL;DR: The flutter test runner needs some love in the flutter/flutter repository.