Fix flake due to shadow rendering difference on webkit (#23961)

This commit is contained in:
Ferhat 2021-01-26 16:59:01 -08:00 committed by GitHub
parent 1411cb671b
commit 7ffca994cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -265,7 +265,8 @@ void testMain() async {
html.Element viewElement5 = builder5.build().webOnlyRootElement;
html.document.body.append(viewElement5);
await matchGoldenFile('compositing_physical_update_3.png',
region: region, maxDiffRatePercent: 0.4);
region: region, maxDiffRatePercent:
browserEngine == BrowserEngine.webkit ? 0.6 : 0.4);
viewElement5.remove();
/// Update shadow color.

View File

@ -22,6 +22,8 @@ void testMain() async {
test('screenshot test reports success', () async {
html.document.body.style.fontFamily = 'Roboto';
html.document.body.innerHtml = 'Hello world!';
await matchGoldenFile('__local__/smoke_test.png', region: Rect.fromLTWH(0, 0, 320, 200));
// TODO: https://github.com/flutter/flutter/issues/74702 , reduce webkit percentage.
await matchGoldenFile('__local__/smoke_test.png', region: Rect.fromLTWH(0, 0, 320, 200),
maxDiffRatePercent: browserEngine == BrowserEngine.webkit ? 3.0 : 0.28);
});
}