Skip to content

fix(web_ui): use static whitelist for image codec tests#182648

Merged
auto-submit[bot] merged 3 commits into
flutter:masterfrom
harryterkelsen:whitelist-image-test-images
Feb 21, 2026
Merged

fix(web_ui): use static whitelist for image codec tests#182648
auto-submit[bot] merged 3 commits into
flutter:masterfrom
harryterkelsen:whitelist-image-test-images

Conversation

@harryterkelsen

Copy link
Copy Markdown
Contributor

The codecs_test.dart previously fetched all images from /test_images/ dynamically. This caused flakiness when Skia added new images that were purposely undecodable or problematic for the Flutter web engine.

This change introduces a static whitelist of verified test images and removes the dynamic fetching logic. It also cleans up obsolete skip conditions for images that are no longer in the whitelist.

Fixes #182629

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

The `codecs_test.dart` previously fetched all images from `/test_images/`
dynamically. This caused flakiness when Skia added new images that were
purposely undecodable or problematic for the Flutter web engine.

This change introduces a static whitelist of 187 verified test images
and removes the dynamic fetching logic. It also cleans up obsolete
skip conditions for images that are no longer in the whitelist.

Verified by running the tests on Chrome via `felt`.
@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-web Web applications specifically labels Feb 20, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request correctly transitions the image codec tests to use a static whitelist instead of dynamic discovery, which should significantly reduce flakiness caused by unexpected changes in the test image directory. The changes include the addition of a comprehensive _kTestImages list, removal of unused imports, and cleanup of obsolete logic. One minor oversight was found where a skip condition for an image not present in the new whitelist was retained.

Comment thread engine/src/flutter/lib/web_ui/test/ui/codecs_test.dart

@mdebbar mdebbar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread engine/src/flutter/lib/web_ui/test/ui/codecs_test.dart Outdated
@harryterkelsen harryterkelsen added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 20, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 20, 2026
@auto-submit

auto-submit Bot commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

auto label is removed for flutter/flutter/182648, Failed to enqueue flutter/flutter/182648 with HTTP 400: GraphQL mutate failed.

@harryterkelsen harryterkelsen added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 20, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 20, 2026
@auto-submit

auto-submit Bot commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/182648, because - The status or check suite Windows tool_integration_tests_4_9 has failed. Please fix the issues identified (or deflake) before re-applying this label.

@harryterkelsen harryterkelsen added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 20, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Feb 20, 2026
Merged via the queue into flutter:master with commit 6d42ae5 Feb 21, 2026
184 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 21, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Feb 23, 2026
flutter/flutter@91b2d41...dad6f9d

2026-02-23 engine-flutter-autoroll@skia.org Roll Packages from 9da22bf to 12b43a1 (19 revisions) (flutter/flutter#182758)
2026-02-23 engine-flutter-autoroll@skia.org Roll Skia from 55fae1660572 to 9a5a3c92c336 (7 revisions) (flutter/flutter#182749)
2026-02-23 engine-flutter-autoroll@skia.org Roll Skia from 256e2b47b303 to 55fae1660572 (1 revision) (flutter/flutter#182741)
2026-02-22 engine-flutter-autoroll@skia.org Roll Skia from 141ed451f007 to 256e2b47b303 (1 revision) (flutter/flutter#182732)
2026-02-22 engine-flutter-autoroll@skia.org Roll Skia from e59de8a12e7e to 141ed451f007 (1 revision) (flutter/flutter#182729)
2026-02-22 engine-flutter-autoroll@skia.org Roll Skia from f6ea7ef42d14 to e59de8a12e7e (1 revision) (flutter/flutter#182726)
2026-02-22 engine-flutter-autoroll@skia.org Roll Skia from 34fa7b2373f3 to f6ea7ef42d14 (1 revision) (flutter/flutter#182721)
2026-02-21 engine-flutter-autoroll@skia.org Roll Skia from 3ca547c8b816 to 34fa7b2373f3 (2 revisions) (flutter/flutter#182711)
2026-02-21 engine-flutter-autoroll@skia.org Roll Skia from c91ad88e89f8 to 3ca547c8b816 (9 revisions) (flutter/flutter#182696)
2026-02-21 victorsanniay@gmail.com Shortcircuit if Tooltip message and richMessage are empty (flutter/flutter#182524)
2026-02-21 50643541+Mairramer@users.noreply.github.com Add fields getter to FormState (flutter/flutter#180815)
2026-02-20 1961493+harryterkelsen@users.noreply.github.com fix(web_ui): use static whitelist for image codec tests (flutter/flutter#182648)
2026-02-20 victorsanniay@gmail.com Add cupertino docimports for CupertinoPageTransitionsBuilder and fix typos (flutter/flutter#182685)
2026-02-20 katelovett@google.com Fix Chat invite link (flutter/flutter#182675)
2026-02-20 engine-flutter-autoroll@skia.org Roll Skia from ce5854495a3a to c91ad88e89f8 (58 revisions) (flutter/flutter#182678)
2026-02-20 30870216+gaaclarke@users.noreply.github.com Manual dart sdk flutter 174bcc79 25ff 4267 8e26 d0e902f18681 1771486449 (flutter/flutter#182624)
2026-02-20 97480502+b-luk@users.noreply.github.com Don't compile shaders to SkSL unless --sksl arg is present (flutter/flutter#182519)
2026-02-20 katelovett@google.com Correct PerformanceOverlay optionsMask checks and add tests (flutter/flutter#182309)
2026-02-20 jason-simmons@users.noreply.github.com [Impeller] libImpeller: Dispose thread local caches on each Vulkan frame (flutter/flutter#182402)
2026-02-20 31859944+LongCatIsLooong@users.noreply.github.com Update CHANGELOG for 3.41.2 stable hotfix (flutter/flutter#182647)

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 louisehsu@google.com,stuartmorgan@google.com 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
ahmedsameha1 pushed a commit to ahmedsameha1/flutter that referenced this pull request Feb 27, 2026
The `codecs_test.dart` previously fetched all images from
`/test_images/` dynamically. This caused flakiness when Skia added new
images that were purposely undecodable or problematic for the Flutter
web engine.

This change introduces a static whitelist of verified test images and
removes the dynamic fetching logic. It also cleans up obsolete skip
conditions for images that are no longer in the whitelist.

Fixes flutter#182629

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
okorohelijah pushed a commit to okorohelijah/packages that referenced this pull request Mar 26, 2026
…r#11102)

flutter/flutter@91b2d41...dad6f9d

2026-02-23 engine-flutter-autoroll@skia.org Roll Packages from 9da22bf to 12b43a1 (19 revisions) (flutter/flutter#182758)
2026-02-23 engine-flutter-autoroll@skia.org Roll Skia from 55fae1660572 to 9a5a3c92c336 (7 revisions) (flutter/flutter#182749)
2026-02-23 engine-flutter-autoroll@skia.org Roll Skia from 256e2b47b303 to 55fae1660572 (1 revision) (flutter/flutter#182741)
2026-02-22 engine-flutter-autoroll@skia.org Roll Skia from 141ed451f007 to 256e2b47b303 (1 revision) (flutter/flutter#182732)
2026-02-22 engine-flutter-autoroll@skia.org Roll Skia from e59de8a12e7e to 141ed451f007 (1 revision) (flutter/flutter#182729)
2026-02-22 engine-flutter-autoroll@skia.org Roll Skia from f6ea7ef42d14 to e59de8a12e7e (1 revision) (flutter/flutter#182726)
2026-02-22 engine-flutter-autoroll@skia.org Roll Skia from 34fa7b2373f3 to f6ea7ef42d14 (1 revision) (flutter/flutter#182721)
2026-02-21 engine-flutter-autoroll@skia.org Roll Skia from 3ca547c8b816 to 34fa7b2373f3 (2 revisions) (flutter/flutter#182711)
2026-02-21 engine-flutter-autoroll@skia.org Roll Skia from c91ad88e89f8 to 3ca547c8b816 (9 revisions) (flutter/flutter#182696)
2026-02-21 victorsanniay@gmail.com Shortcircuit if Tooltip message and richMessage are empty (flutter/flutter#182524)
2026-02-21 50643541+Mairramer@users.noreply.github.com Add fields getter to FormState (flutter/flutter#180815)
2026-02-20 1961493+harryterkelsen@users.noreply.github.com fix(web_ui): use static whitelist for image codec tests (flutter/flutter#182648)
2026-02-20 victorsanniay@gmail.com Add cupertino docimports for CupertinoPageTransitionsBuilder and fix typos (flutter/flutter#182685)
2026-02-20 katelovett@google.com Fix Chat invite link (flutter/flutter#182675)
2026-02-20 engine-flutter-autoroll@skia.org Roll Skia from ce5854495a3a to c91ad88e89f8 (58 revisions) (flutter/flutter#182678)
2026-02-20 30870216+gaaclarke@users.noreply.github.com Manual dart sdk flutter 174bcc79 25ff 4267 8e26 d0e902f18681 1771486449 (flutter/flutter#182624)
2026-02-20 97480502+b-luk@users.noreply.github.com Don't compile shaders to SkSL unless --sksl arg is present (flutter/flutter#182519)
2026-02-20 katelovett@google.com Correct PerformanceOverlay optionsMask checks and add tests (flutter/flutter#182309)
2026-02-20 jason-simmons@users.noreply.github.com [Impeller] libImpeller: Dispose thread local caches on each Vulkan frame (flutter/flutter#182402)
2026-02-20 31859944+LongCatIsLooong@users.noreply.github.com Update CHANGELOG for 3.41.2 stable hotfix (flutter/flutter#182647)

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 louisehsu@google.com,stuartmorgan@google.com 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
mboetger pushed a commit to mboetger/flutter that referenced this pull request Mar 26, 2026
The `codecs_test.dart` previously fetched all images from
`/test_images/` dynamically. This caused flakiness when Skia added new
images that were purposely undecodable or problematic for the Flutter
web engine.

This change introduces a static whitelist of verified test images and
removes the dynamic fetching logic. It also cleans up obsolete skip
conditions for images that are no longer in the whitelist.

Fixes flutter#182629

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…r#11102)

flutter/flutter@91b2d41...dad6f9d

2026-02-23 engine-flutter-autoroll@skia.org Roll Packages from 9da22bf to 12b43a1 (19 revisions) (flutter/flutter#182758)
2026-02-23 engine-flutter-autoroll@skia.org Roll Skia from 55fae1660572 to 9a5a3c92c336 (7 revisions) (flutter/flutter#182749)
2026-02-23 engine-flutter-autoroll@skia.org Roll Skia from 256e2b47b303 to 55fae1660572 (1 revision) (flutter/flutter#182741)
2026-02-22 engine-flutter-autoroll@skia.org Roll Skia from 141ed451f007 to 256e2b47b303 (1 revision) (flutter/flutter#182732)
2026-02-22 engine-flutter-autoroll@skia.org Roll Skia from e59de8a12e7e to 141ed451f007 (1 revision) (flutter/flutter#182729)
2026-02-22 engine-flutter-autoroll@skia.org Roll Skia from f6ea7ef42d14 to e59de8a12e7e (1 revision) (flutter/flutter#182726)
2026-02-22 engine-flutter-autoroll@skia.org Roll Skia from 34fa7b2373f3 to f6ea7ef42d14 (1 revision) (flutter/flutter#182721)
2026-02-21 engine-flutter-autoroll@skia.org Roll Skia from 3ca547c8b816 to 34fa7b2373f3 (2 revisions) (flutter/flutter#182711)
2026-02-21 engine-flutter-autoroll@skia.org Roll Skia from c91ad88e89f8 to 3ca547c8b816 (9 revisions) (flutter/flutter#182696)
2026-02-21 victorsanniay@gmail.com Shortcircuit if Tooltip message and richMessage are empty (flutter/flutter#182524)
2026-02-21 50643541+Mairramer@users.noreply.github.com Add fields getter to FormState (flutter/flutter#180815)
2026-02-20 1961493+harryterkelsen@users.noreply.github.com fix(web_ui): use static whitelist for image codec tests (flutter/flutter#182648)
2026-02-20 victorsanniay@gmail.com Add cupertino docimports for CupertinoPageTransitionsBuilder and fix typos (flutter/flutter#182685)
2026-02-20 katelovett@google.com Fix Chat invite link (flutter/flutter#182675)
2026-02-20 engine-flutter-autoroll@skia.org Roll Skia from ce5854495a3a to c91ad88e89f8 (58 revisions) (flutter/flutter#182678)
2026-02-20 30870216+gaaclarke@users.noreply.github.com Manual dart sdk flutter 174bcc79 25ff 4267 8e26 d0e902f18681 1771486449 (flutter/flutter#182624)
2026-02-20 97480502+b-luk@users.noreply.github.com Don't compile shaders to SkSL unless --sksl arg is present (flutter/flutter#182519)
2026-02-20 katelovett@google.com Correct PerformanceOverlay optionsMask checks and add tests (flutter/flutter#182309)
2026-02-20 jason-simmons@users.noreply.github.com [Impeller] libImpeller: Dispose thread local caches on each Vulkan frame (flutter/flutter#182402)
2026-02-20 31859944+LongCatIsLooong@users.noreply.github.com Update CHANGELOG for 3.41.2 stable hotfix (flutter/flutter#182647)

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 louisehsu@google.com,stuartmorgan@google.com 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine flutter/engine related. See also e: labels. platform-web Web applications specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More systemically separate Flutter's image testing from Skia's images directory

2 participants