Remove Material imports from painting tests#186937
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors painting tests to remove Material library dependencies, transitioning to the Widgets library and local color constants. It introduces a private helper function for golden tests and updates the cross-import checker. Feedback was provided to ensure private members are documented with triple-slash comments as required by the style guide.
|
Addressed the helper documentation feedback in 3a182e9. Verification passed for the cross-import checker, Dart analyze, Flutter analyze, and git diff --check. The targeted painting test command ran; continuous_rectangle_border_test.dart passed, while decoration_image_lerp_test.dart reported local golden pixel diffs, so no golden expectations were changed and CI/Gold can be the source of truth. |
|
This is approved, and the only current status failure appears to be the global tree-status. Could you please add autosubmit when you get a chance? |
…11832) Manual roll requested by [email protected] flutter/flutter@701665b...2ba5420 2026-06-03 [email protected] Roll Packages from 818b310 to b11504f (8 revisions) (flutter/flutter#187511) 2026-06-03 [email protected] Add new file patterns for team-web labeler (flutter/flutter#187397) 2026-06-03 [email protected] Roll Skia from 279b17fe9fc1 to d625048c853a (12 revisions) (flutter/flutter#187483) 2026-06-03 [email protected] [SwiftPM] Fix prefer_initializing_formals lint (flutter/flutter#187502) 2026-06-03 [email protected] Roll Fuchsia Linux SDK from q27k7_um1GvVrySZS... to ap7MhLX4TdpWRrLS_... (flutter/flutter#187478) 2026-06-03 [email protected] [SwiftPM] Fix concurrent directory/file/symlink creation crashes (flutter/flutter#186953) 2026-06-03 [email protected] [Impeller] Fix positioning of text shadow masks (flutter/flutter#187460) 2026-06-02 [email protected] Remove Material imports from painting tests (flutter/flutter#186937) 2026-06-02 [email protected] Add android_hardware_smoke_test integration tests (flutter/flutter#187130) 2026-06-02 [email protected] Roll pub packages (flutter/flutter#187471) 2026-06-02 [email protected] [flutter tool] propagate analytics env to sub-tools (flutter/flutter#186780) 2026-06-02 [email protected] Adds macro for fragment shaders to support flutter <= 3.44 (flutter/flutter#187316) 2026-06-02 [email protected] Small clean-up in different java files under `engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/` (flutter/flutter#186631) 2026-06-02 [email protected] refactor(web): Unify ui.Path code for CanvasKit and Skwasm (flutter/flutter#187331) 2026-06-02 [email protected] Roll Packages from f5d50ca to 818b310 (2 revisions) (flutter/flutter#187441) 2026-06-02 [email protected] Allow selecting multi-digit device options (flutter/flutter#186184) 2026-06-02 [email protected] Improve error message for type mismatch in Navigator.pop and maybePop. (flutter/flutter#186571) 2026-06-02 [email protected] Remove semantics_tester import from material_button_test.dart (flutter/flutter#184807) 2026-06-02 [email protected] [flutter_tools] Refactor hostPlatform to use Abi.current() (flutter/flutter#185369) 2026-06-02 [email protected] Clean up avoid_type_to_string suppressions (flutter/flutter#186869) 2026-06-02 [email protected] Update Flutter documentation links in flutter_console.bat (flutter/flutter#187354) 2026-06-02 [email protected] Revert "[Impeller] Allow attaching specific texture mip levels and slices" (flutter/flutter#187445) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#11832) Manual roll requested by [email protected] flutter/flutter@701665b...2ba5420 2026-06-03 [email protected] Roll Packages from 818b310 to b11504f (8 revisions) (flutter/flutter#187511) 2026-06-03 [email protected] Add new file patterns for team-web labeler (flutter/flutter#187397) 2026-06-03 [email protected] Roll Skia from 279b17fe9fc1 to d625048c853a (12 revisions) (flutter/flutter#187483) 2026-06-03 [email protected] [SwiftPM] Fix prefer_initializing_formals lint (flutter/flutter#187502) 2026-06-03 [email protected] Roll Fuchsia Linux SDK from q27k7_um1GvVrySZS... to ap7MhLX4TdpWRrLS_... (flutter/flutter#187478) 2026-06-03 [email protected] [SwiftPM] Fix concurrent directory/file/symlink creation crashes (flutter/flutter#186953) 2026-06-03 [email protected] [Impeller] Fix positioning of text shadow masks (flutter/flutter#187460) 2026-06-02 [email protected] Remove Material imports from painting tests (flutter/flutter#186937) 2026-06-02 [email protected] Add android_hardware_smoke_test integration tests (flutter/flutter#187130) 2026-06-02 [email protected] Roll pub packages (flutter/flutter#187471) 2026-06-02 [email protected] [flutter tool] propagate analytics env to sub-tools (flutter/flutter#186780) 2026-06-02 [email protected] Adds macro for fragment shaders to support flutter <= 3.44 (flutter/flutter#187316) 2026-06-02 [email protected] Small clean-up in different java files under `engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/` (flutter/flutter#186631) 2026-06-02 [email protected] refactor(web): Unify ui.Path code for CanvasKit and Skwasm (flutter/flutter#187331) 2026-06-02 [email protected] Roll Packages from f5d50ca to 818b310 (2 revisions) (flutter/flutter#187441) 2026-06-02 [email protected] Allow selecting multi-digit device options (flutter/flutter#186184) 2026-06-02 [email protected] Improve error message for type mismatch in Navigator.pop and maybePop. (flutter/flutter#186571) 2026-06-02 [email protected] Remove semantics_tester import from material_button_test.dart (flutter/flutter#184807) 2026-06-02 [email protected] [flutter_tools] Refactor hostPlatform to use Abi.current() (flutter/flutter#185369) 2026-06-02 [email protected] Clean up avoid_type_to_string suppressions (flutter/flutter#186869) 2026-06-02 [email protected] Update Flutter documentation links in flutter_console.bat (flutter/flutter#187354) 2026-06-02 [email protected] Revert "[Impeller] Allow attaching specific texture mip levels and slices" (flutter/flutter#187445) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Removes the remaining Material dependency from two painting tests by switching them to `widgets.dart`. The decoration image test now uses local color constants for the former `Colors.white` and `Colors.pink` values. The continuous rectangle border golden harness now paints the shape directly with `ShapeDecoration` instead of using `Material`. Part of flutter#177412 Refs flutter#177028 Tests: - `bin/cache/dart-sdk/bin/dart --enable-asserts dev/bots/check_tests_cross_imports.dart` - `bin/cache/dart-sdk/bin/dart analyze packages/flutter/test/painting/decoration_image_lerp_test.dart packages/flutter/test/painting/continuous_rectangle_border_test.dart dev/bots/check_tests_cross_imports.dart` - `./bin/flutter analyze --no-pub packages/flutter/test/painting/decoration_image_lerp_test.dart packages/flutter/test/painting/continuous_rectangle_border_test.dart dev/bots/check_tests_cross_imports.dart` - `./bin/flutter test --no-pub packages/flutter/test/painting/continuous_rectangle_border_test.dart` - `git diff --check` Note: `./bin/flutter test --no-pub packages/flutter/test/painting/decoration_image_lerp_test.dart packages/flutter/test/painting/continuous_rectangle_border_test.dart` still reports local golden diffs for `painting.decoration_image.lerp.1.png` and `painting.decoration_image.lerp.2.png`. Temporarily restoring the baseline Material version of `decoration_image_lerp_test.dart` produces the same two failures locally, so they do not appear to be caused by this cleanup. --------- Co-authored-by: Victor Sanni <[email protected]>
Removes the remaining Material dependency from two painting tests by switching them to
widgets.dart.The decoration image test now uses local color constants for the former
Colors.whiteandColors.pinkvalues. The continuous rectangle border golden harness now paints the shape directly withShapeDecorationinstead of usingMaterial.Part of #177412
Refs #177028
Tests:
bin/cache/dart-sdk/bin/dart --enable-asserts dev/bots/check_tests_cross_imports.dartbin/cache/dart-sdk/bin/dart analyze packages/flutter/test/painting/decoration_image_lerp_test.dart packages/flutter/test/painting/continuous_rectangle_border_test.dart dev/bots/check_tests_cross_imports.dart./bin/flutter analyze --no-pub packages/flutter/test/painting/decoration_image_lerp_test.dart packages/flutter/test/painting/continuous_rectangle_border_test.dart dev/bots/check_tests_cross_imports.dart./bin/flutter test --no-pub packages/flutter/test/painting/continuous_rectangle_border_test.dartgit diff --checkNote:
./bin/flutter test --no-pub packages/flutter/test/painting/decoration_image_lerp_test.dart packages/flutter/test/painting/continuous_rectangle_border_test.dartstill reports local golden diffs forpainting.decoration_image.lerp.1.pngandpainting.decoration_image.lerp.2.png. Temporarily restoring the baseline Material version ofdecoration_image_lerp_test.dartproduces the same two failures locally, so they do not appear to be caused by this cleanup.