Engine -> Framework roll stopped on framework text field test failures

This issue has been tracked since 2023-03-18.

The engine roll here #122942 was reverted due to failures on framework CI here https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20framework_tests_libraries/10172/overview, which has many failures of tests in flutter/packages/flutter/test/material/text_field_test.dart.

Flagging folks with engine commits in that range that seem text related: @flar @LongCatIsLooong @loic-sharma and @jason-simmons to take a look at the Skia rolls to see if there's anything suspicious in them.

flar wrote this answer on 2023-03-18

Some of the failures are due to properties on Widgets which would not be a result of anything in Skia or any rendering changes. I'd strongly suspect the changes that affected the way accessibility is handled (single root assumption perhaps?)

jason-simmons wrote this answer on 2023-03-18

This failure was caused by ordering dependencies in the material/text_field_test.dart tests and does not appear to be related to the engine roll.

The tests started failing when the daily test order changed to --test-randomize-ordering-seed=20230318.

The tests run successfully with the #122942 roll and yesterday's seed value (--test-randomize-ordering-seed=20230317)

jason-simmons wrote this answer on 2023-03-19

These tests depend on execution order due to the interaction between debugDefaultTargetPlatformOverride and the Theme._kFallbackTheme singleton.

_kFallbackTheme is a lazily initialized static ThemeData. The fallback theme does not explicitly specify a platform, so the ThemeData constructor sets its platform based on the current value of defaultTargetPlatform.

Some of the tests in material/text_field_test.dart use TargetPlatformVariant to temporarily override the target platform. So the platform of the fallback theme will depend on which override was in effect the first time _kFallbackTheme was accessed and initialized.

Later tests may depend on platform-specific behaviors (for example, tests of haptics assume they are running on a platform that enables haptics). These tests will fail if they use the fallback theme and it is bound to an unexpected platform.

@Hixie @goderbauer What is the best way to fix this?

Is there a way for the test infrastructure to ensure that _kFallbackTheme is initialized for the Android platform, which is specified as the default for the test environment?

Or do tests need to avoid instantiating anything that would depend on the fallback theme?

zanderso wrote this answer on 2023-03-19

#122956 <- disables shuffling for this file.

More Details About Repo
Owner Name flutter
Repo Name flutter
Full Name flutter/flutter
Language Dart
Created Date 2015-03-06
Updated Date 2023-03-30
Star Count 151602
Watcher Count 3555
Fork Count 25000
Issue Count 11498

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date