Skip to content

Commit

Permalink
Fix flake due to shadow rendering difference on webkit (flutter#23961)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferhatb authored and hjfreyer committed Mar 22, 2021
1 parent d7b3937 commit 096304f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion lib/web_ui/test/golden_tests/golden_success_smoke_test.dart
Expand Up @@ -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);
});
}

0 comments on commit 096304f

Please sign in to comment.