Add a platform view test to android_hardware_smoke_test#187913
Conversation
… to goldens.dart via a parameter instead of an import
…view and the flutter rendering is clearer
- use a switch expression - use ?.call() - simplify some casts
- add emojis - adjust size and centering so native view text is mostly overlapped by flutter widget and text
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request implements a platform view screenshot testing strategy for Android hardware smoke tests, introducing a new test that embeds a native Android view and compares it using a pixel-exact local file comparator. The feedback recommends adding null and boundary checks for screenshot capturing and cropping on both the device and host sides, replacing a deprecated and nullable implicitView call with View.of(context), documenting the public compareGoldenOnDevice function to comply with the style guide, and removing an unused import.
There was a problem hiding this comment.
Code Review
This pull request introduces a platform view integration test (platformViewTest) to the Android hardware smoke test suite, implementing a system-level screenshot and cropping strategy to verify native Android views composited with Flutter. It adds the AndroidPlatformView widget, a native TextView factory, and a pixel-exact on-device comparator. Feedback on these changes suggests recycling native bitmaps in the Android test runner to prevent memory leaks, using safe casts in Kotlin to avoid class cast exceptions, retrieving the device pixel ratio from the build context instead of the global platform dispatcher, and wrapping image comparison logic in a try-finally block to ensure proper disposal of native graphics memory.
gaaclarke
left a comment
There was a problem hiding this comment.
Looking good, I just have a few minor notes and questions. It's kind of gnarly, but I understand why and the README.md helps. A sequence diagram would help too.
| final Uint8List list2 = bytes2.buffer.asUint8List(); | ||
|
|
||
| for (var i = 0; i < list1.length; i++) { | ||
| if (list1[i] != list2[i]) { |
There was a problem hiding this comment.
From my testing so far, no. However, I intend to reassess once I get these tests running in the device lab against different devices. When we determine that we do need fuzzy image comparison, this custom comparator will provide a good baseline for it.
| | **`advancedBlendTest`** | **Advanced Blending** | Fragment shader blending and framebuffer fetch tile-memory optimizations (e.g. Vulkan subpass inputs, `EXT_shader_framebuffer_fetch` in GLES). Uses `BlendMode.difference`. | Mirrors [animated_advanced_blend.dart](/dev/benchmarks/macrobenchmarks/lib/src/animated_advanced_blend.dart). | | ||
| | **`backdropFilterBlurTest`** | **Compositing & Blur** | Offscreen texture allocation, layer downscale/upscale passes, and multi-pass Gaussian blur filter execution. Uses `ImageFilter.blur(sigmaX: 5, sigmaY: 5)`. | Mirrors [backdrop_filter.dart](/dev/benchmarks/macrobenchmarks/lib/src/backdrop_filter.dart). | No newline at end of file | ||
| | **`backdropFilterBlurTest`** | **Compositing & Blur** | Offscreen texture allocation, layer downscale/upscale passes, and multi-pass Gaussian blur filter execution. Uses `ImageFilter.blur(sigmaX: 5, sigmaY: 5)`. | Mirrors [backdrop_filter.dart](/dev/benchmarks/macrobenchmarks/lib/src/backdrop_filter.dart). | | ||
| | **`platformViewTest`** | **Platform Views** | Embedded native Android views composition, texture layer allocation, platform/raster thread synchronization, and system compositor screenshot capture. Uses `AndroidViewSurface` under Hybrid Composition. | Mirrors [hybrid_android_views](/dev/integration_tests/hybrid_android_views) and [android_views](/dev/integration_tests/android_views) layout structures. | |
There was a problem hiding this comment.
Do we need the other platform view types? I think there are a few other ways beyond hybrid composition.
There was a problem hiding this comment.
Good question. Yes. I'll take a look at https://docs.flutter.dev/platform-integration/android/platform-views and the tests in android_engine_test and add more tests in one or more followup PRs
|
|
||
| To address this, the test suite implements a **No-Compositing System Screenshot Strategy**: | ||
|
|
||
| 1. **Wait for Render & Settle:** The Dart app renders the platform view, waits for native creation to complete, and delays execution to allow the native graphics frames to settle/rasterize on the GPU. |
There was a problem hiding this comment.
Maybe add references to the code where these steps are happening?
There was a problem hiding this comment.
Updated with a sequence diagram, updated earlier section so the sequence diagrams are consistent and the diff is obvious, and added some links for clarity
3c36309 to
e3088f4
Compare
- update README.md with a diagram for the screenshot flow, and update the existing text-based diagram for consistency and ease of understanding the diagram differences - Pull out platform view test name constants - Pull out kotlin screenshot capture to a helper method
andywolff
left a comment
There was a problem hiding this comment.
Addressed gemini review comments and @gaaclarke 's comments
| final Uint8List list2 = bytes2.buffer.asUint8List(); | ||
|
|
||
| for (var i = 0; i < list1.length; i++) { | ||
| if (list1[i] != list2[i]) { |
There was a problem hiding this comment.
From my testing so far, no. However, I intend to reassess once I get these tests running in the device lab against different devices. When we determine that we do need fuzzy image comparison, this custom comparator will provide a good baseline for it.
| | **`advancedBlendTest`** | **Advanced Blending** | Fragment shader blending and framebuffer fetch tile-memory optimizations (e.g. Vulkan subpass inputs, `EXT_shader_framebuffer_fetch` in GLES). Uses `BlendMode.difference`. | Mirrors [animated_advanced_blend.dart](/dev/benchmarks/macrobenchmarks/lib/src/animated_advanced_blend.dart). | | ||
| | **`backdropFilterBlurTest`** | **Compositing & Blur** | Offscreen texture allocation, layer downscale/upscale passes, and multi-pass Gaussian blur filter execution. Uses `ImageFilter.blur(sigmaX: 5, sigmaY: 5)`. | Mirrors [backdrop_filter.dart](/dev/benchmarks/macrobenchmarks/lib/src/backdrop_filter.dart). | No newline at end of file | ||
| | **`backdropFilterBlurTest`** | **Compositing & Blur** | Offscreen texture allocation, layer downscale/upscale passes, and multi-pass Gaussian blur filter execution. Uses `ImageFilter.blur(sigmaX: 5, sigmaY: 5)`. | Mirrors [backdrop_filter.dart](/dev/benchmarks/macrobenchmarks/lib/src/backdrop_filter.dart). | | ||
| | **`platformViewTest`** | **Platform Views** | Embedded native Android views composition, texture layer allocation, platform/raster thread synchronization, and system compositor screenshot capture. Uses `AndroidViewSurface` under Hybrid Composition. | Mirrors [hybrid_android_views](/dev/integration_tests/hybrid_android_views) and [android_views](/dev/integration_tests/android_views) layout structures. | |
There was a problem hiding this comment.
Good question. Yes. I'll take a look at https://docs.flutter.dev/platform-integration/android/platform-views and the tests in android_engine_test and add more tests in one or more followup PRs
|
reason for revert: This is turning the tree red because there is a problem getting pub dependencies after this (for example: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20tool_integration_tests_2_5/10257/overview). I'm not sure what the solution is off the top of my head, maybe updating the packages for the workspace? Setting the dependency to |
…tter#187913)" (flutter#188051) <!-- start_original_pr_link --> Reverts: flutter#187913 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: gaaclarke <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: This is turning the tree red because there is a problem getting pub dependencies after this (for example: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20tool_integration_tests_2_5/10257/overview). I'm not sure what the solution is off the top of my head, maybe updating the packages for the workspace? Setting the dependency to `any` seems like the right thing to do to me. <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: andywolff <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {gaaclarke} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: Expand test coverage to address more of flutter#182123 This adds a test with a platform view. In order to get both the flutter pixels and the native pixels fully composited, we have to initiate the screenshot from the test runner, not the app. This has a few consequences for the architecture and data flow of the tests. Details in the changes to README.md. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [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]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [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 <!-- end_revert_body --> Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
flutter/flutter@5827d5f...3a0420c 2026-06-16 Rusino@users.noreply.github.com Implement font fallback (flutter/flutter#187520) 2026-06-16 amhurtado@protonmail.com Add FlatBuffers Verifier checks to Impeller asset loading (flutter/flutter#187878) 2026-06-16 engine-flutter-autoroll@skia.org Roll Packages from aa964a3 to 8286d39 (1 revision) (flutter/flutter#188067) 2026-06-16 engine-flutter-autoroll@skia.org Roll Skia from 9c2b83788409 to d7196b0b4939 (1 revision) (flutter/flutter#188066) 2026-06-16 engine-flutter-autoroll@skia.org Roll Skia from ef17057bb776 to 9c2b83788409 (1 revision) (flutter/flutter#188061) 2026-06-16 engine-flutter-autoroll@skia.org Roll Skia from 500025456bb5 to ef17057bb776 (1 revision) (flutter/flutter#188058) 2026-06-16 engine-flutter-autoroll@skia.org Roll Skia from cb1035ff14bf to 500025456bb5 (5 revisions) (flutter/flutter#188057) 2026-06-16 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from TbB86Po_HDe1dvXvT... to VeLhhlDcod09NR4Hb... (flutter/flutter#188055) 2026-06-16 engine-flutter-autoroll@skia.org Roll Skia from 70acf6a5e7c9 to cb1035ff14bf (3 revisions) (flutter/flutter#188054) 2026-06-16 41930132+hellohuanlin@users.noreply.github.com [pv]skip non-tappable web view workaround on ios 26.4 (flutter/flutter#185424) 2026-06-16 mdebbar@google.com [web] RenderParagraph needs paint after a DPR change (flutter/flutter#186968) 2026-06-16 30870216+gaaclarke@users.noreply.github.com Adds gamma correction to windows text. (flutter/flutter#187871) 2026-06-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add a platform view test to android_hardware_smoke_test (#187913)" (flutter/flutter#188051) 2026-06-15 awolff@google.com Add a platform view test to android_hardware_smoke_test (flutter/flutter#187913) 2026-06-15 codefu@google.com feat: linux_analyze in a workflow (flutter/flutter#187889) 2026-06-15 mdebbar@google.com [web] Changes to WebParagraph configuration (flutter/flutter#187188) 2026-06-15 matt.boetger@gmail.com Fail gracefully on Android AVD lock errors during startup (flutter/flutter#187200) 2026-06-15 bkonyi@google.com [flutter_tools] Fix flakiness in widget_preview_detection_test (flutter/flutter#187938) 2026-06-15 jason-simmons@users.noreply.github.com Exclude fuchsia-sdk/sdk/.build-id from the builder cache archive (flutter/flutter#187826) 2026-06-15 engine-flutter-autoroll@skia.org Roll Skia from c8d9f80f13e4 to 70acf6a5e7c9 (4 revisions) (flutter/flutter#188020) 2026-06-15 engine-flutter-autoroll@skia.org Roll Packages from b78ad83 to aa964a3 (7 revisions) (flutter/flutter#188021) 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 bmparr@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
Expand test coverage to address more of flutter#182123 This adds a test with a platform view. In order to get both the flutter pixels and the native pixels fully composited, we have to initiate the screenshot from the test runner, not the app. This has a few consequences for the architecture and data flow of the tests. Details in the changes to README.md. PR flutter#187913 (for issue flutter#182123) added `image: any` to android_hardware_smoke_test's `pubspec.yaml`, but didn't update the `pubspec.lock` file in the workspace root. This lockfile doesn't currently contain the `image` package, so it broke CI and was reverted in flutter#188051 A package missing from the lockfile seems to cause CI fail in this misleading way. To fix it, we just need to add `image` to the lockfile. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [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. **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 [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [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
Expand test coverage to address more of flutter#182123 This adds a test with a platform view. In order to get both the flutter pixels and the native pixels fully composited, we have to initiate the screenshot from the test runner, not the app. This has a few consequences for the architecture and data flow of the tests. Details in the changes to README.md. PR flutter#187913 (for issue flutter#182123) added `image: any` to android_hardware_smoke_test's `pubspec.yaml`, but didn't update the `pubspec.lock` file in the workspace root. This lockfile doesn't currently contain the `image` package, so it broke CI and was reverted in flutter#188051 A package missing from the lockfile seems to cause CI fail in this misleading way. To fix it, we just need to add `image` to the lockfile. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [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. **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 [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [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
Expand test coverage to address more of flutter#182123 This adds a test with a platform view. In order to get both the flutter pixels and the native pixels fully composited, we have to initiate the screenshot from the test runner, not the app. This has a few consequences for the architecture and data flow of the tests. Details in the changes to README.md. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [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]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [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
…tter#187913)" (flutter#188051) <!-- start_original_pr_link --> Reverts: flutter#187913 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: gaaclarke <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: This is turning the tree red because there is a problem getting pub dependencies after this (for example: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20tool_integration_tests_2_5/10257/overview). I'm not sure what the solution is off the top of my head, maybe updating the packages for the workspace? Setting the dependency to `any` seems like the right thing to do to me. <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: andywolff <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {gaaclarke} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: Expand test coverage to address more of flutter#182123 This adds a test with a platform view. In order to get both the flutter pixels and the native pixels fully composited, we have to initiate the screenshot from the test runner, not the app. This has a few consequences for the architecture and data flow of the tests. Details in the changes to README.md. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [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]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [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 <!-- end_revert_body --> Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
Expand test coverage to address more of flutter#182123 This adds a test with a platform view. In order to get both the flutter pixels and the native pixels fully composited, we have to initiate the screenshot from the test runner, not the app. This has a few consequences for the architecture and data flow of the tests. Details in the changes to README.md. PR flutter#187913 (for issue flutter#182123) added `image: any` to android_hardware_smoke_test's `pubspec.yaml`, but didn't update the `pubspec.lock` file in the workspace root. This lockfile doesn't currently contain the `image` package, so it broke CI and was reverted in flutter#188051 A package missing from the lockfile seems to cause CI fail in this misleading way. To fix it, we just need to add `image` to the lockfile. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [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. **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 [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [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

Expand test coverage to address more of #182123
This adds a test with a platform view. In order to get both the flutter pixels and the native pixels fully composited, we have to initiate the screenshot from the test runner, not the app. This has a few consequences for the architecture and data flow of the tests. Details in the changes to README.md.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.