Repository navigation
[web] Enable snapshot_widget_test.dart on Web - #193172
Merged
auto-submit[bot] merged 4 commits intoSep 23, 2026
Merged
auto-submit[bot] merged 4 commits into
auto-submit[bot] merged 4 commits into
Conversation
Unskips all 10 tests in `packages/flutter/test/widgets/snapshot_widget_test.dart` on Web now that the HTML renderer has been removed (flutter#106689, closed) and `SnapshotWidget` works on CanvasKit/Skwasm. - Verified both golden tests (`widgets.raster_widget.yellow.png` and `widgets.raster_widget.red.png`) produce a 100.00% exact pixel match (`0 / 480,000` differing pixels) against the upstream Linux Skia Gold baseline. - Updates `'SnapshotWidget should have same result as enabled'` to capture the `RepaintBoundary` via `RenderRepaintBoundary.toImageSync()` so that it works across both VM and Web test environments. TAG=agy CONV=2b17fd22-3b50-437d-bf9a-4077924956f1
Contributor
There was a problem hiding this comment.
Code Review
This pull request enables several tests on the web platform in 'snapshot_widget_test.dart' by removing the 'skip: kIsWeb' parameter. Additionally, it updates a test to synchronously capture a 'RenderRepaintBoundary' image using 'toImageSync', registers it for disposal with 'addTearDown', and compares the image directly instead of using a finder. There are no review comments, and I have no feedback to provide.
Removing the trailing `skip: kIsWeb` argument lets `dart format` collapse these `testWidgets(...)` calls back into the standard trailing-closure style. TAG=agy CONV=2ef6722f-0cc3-4e2c-bfe0-769079846fee
kIsWeb is no longer referenced now that the skips are gone, and the analyzer flags the import as unnecessary (unnecessary_import).
The previous formatting commit was produced with a stale Dart SDK from an older checkout. This re-formats with the SDK matching this branch's engine hash, so the diff is now limited to the unskipped tests. TAG=agy CONV=2ef6722f-0cc3-4e2c-bfe0-769079846fee
This was referenced Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unskips all 10 tests in
packages/flutter/test/widgets/snapshot_widget_test.darton the web now that the HTML renderer has been removed (#106689 — closed) andSnapshotWidgetis supported on CanvasKit/Skwasm.widgets.raster_widget.yellow.pngandwidgets.raster_widget.red.png) produce a 100.00% exact pixel match (0 / 480,000differing pixels) on Chrome against the upstream Linux Skia Gold baseline.'SnapshotWidget should have same result as enabled'to capture theRepaintBoundaryviaRenderRepaintBoundary.toImageSync()so that it works across both VM and Web test environments.Pre-launch Checklist
///).