Skip to content

Conversation

@harryterkelsen
Copy link
Contributor

Adds tests for expected behavior of platform view embedding for the unified renderer frontend.

We currently skip the tests for the renderer which doesn't yet comport to the expected unified behavior. See this doc for an overview of the different behaviors and the expected behavior of the unified platform view embedder.

This adds tests for #172308, a follow-up PR will unify the platform view embedder behavior and unskip the tests for the misbehaving renderer.

Pre-launch Checklist

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

@harryterkelsen harryterkelsen requested a review from mdebbar July 17, 2025 20:33
@github-actions github-actions bot added engine flutter/engine related. See also e: labels. platform-web Web applications specifically labels Jul 17, 2025
Copy link
Contributor

@mdebbar mdebbar left a comment

Choose a reason for hiding this comment

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

The PR fixes some of the differences too!

LGTM

);

test('removes the DOM node of an unrendered platform view', () async {
test('preserves the DOM node of an unrendered platform view', () async {
Copy link
Contributor

Choose a reason for hiding this comment

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

LOL

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lol, there's another test which checks that intermediate Picture objects are disposed by checking that a debug counter for "Pictures Created" equals "Pictures Disposed" which passes by virtue of both counters being 0 and never referenced outside of the test. I was going to delete it but I think since this is behavior we want to actually test I think I should just make it actually work and test the thing it's meant to test

Copy link
Contributor

Choose a reason for hiding this comment

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

I love these tests!!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, should be satisfying to remove all the skip: lines when I unify the platform view embedder.

@harryterkelsen harryterkelsen added this pull request to the merge queue Jul 17, 2025
Merged via the queue into flutter:master with commit b2d4210 Jul 17, 2025
176 of 177 checks passed
@harryterkelsen harryterkelsen deleted the unify-renderers-test-platform-view-optimizing branch July 17, 2025 22:15
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 18, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jul 18, 2025
flutter/flutter@9c626d9...440713c

2025-07-18 [email protected] Add OS version support section to plugin docs (flutter/flutter#172316)
2025-07-18 [email protected] Roll Dart SDK from 7fcc5f48c335 to fe2232bd5b9f (2 revisions) (flutter/flutter#172339)
2025-07-18 [email protected] Refactor handling of frame waiting. (flutter/flutter#172277)
2025-07-18 [email protected] Roll pub packages (flutter/flutter#172332)
2025-07-17 [email protected] Refactor and forbid `base/exit.dart` outside of `lib/runner.dart` (flutter/flutter#171923)
2025-07-17 [email protected] Use UTC timezone for `stamp_command_test` to avoid local TZ flakes (flutter/flutter#172319)
2025-07-17 [email protected] [web] Add tests for unified platform view embedding behavior (flutter/flutter#172313)
2025-07-17 [email protected] Platform views shouldn't receive pointer events when not laid out (flutter/flutter#172043)
2025-07-17 [email protected] Fix Size.isEmpty description (flutter/flutter#172021)
2025-07-17 [email protected] feat: Add `maxCount` parameter to `Badge.count` constructor. (flutter/flutter#171054)
2025-07-17 [email protected] add `debugPaintTextLayoutBoxes` for debugging text layout (flutter/flutter#168876)
2025-07-17 [email protected] Roll Packages from 4a231ae to cb8fef6 (31 revisions) (flutter/flutter#172303)
2025-07-17 [email protected] Fix mutating Paint bug (flutter/flutter#171180)
2025-07-17 [email protected] No SystemContextMenu when readOnly is true (flutter/flutter#171242)
2025-07-17 [email protected] Add a getter to get the recorder used by painting context (flutter/flutter#170223)
2025-07-17 [email protected] [Impeller] Add missing SetPipeline call for the vertices uber pipeline in AtlasContents (flutter/flutter#172273)
2025-07-17 [email protected] Roll Dart SDK from 486f9c0663bc to 7fcc5f48c335 (1 revision) (flutter/flutter#172279)
2025-07-17 [email protected] Roll Skia from 3673a1f26a63 to 9587301e33bc (3 revisions) (flutter/flutter#172281)
2025-07-17 [email protected] Fix a race in FlutterEngineTest.CanLogToStdout (flutter/flutter#172025)

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
azatech pushed a commit to azatech/flutter that referenced this pull request Jul 28, 2025
…#172313)

Adds tests for expected behavior of platform view embedding for the
unified renderer frontend.

We currently skip the tests for the renderer which doesn't yet comport
to the expected unified behavior. See [this
doc](https://docs.google.com/document/d/1-BYZO_oAOJkS_spmELqCmnPQIEUibT3Sj2GhIL3luow/edit?tab=t.0)
for an overview of the different behaviors and the expected behavior of
the unified platform view embedder.

This adds tests for flutter#172308, a
follow-up PR will unify the platform view embedder behavior and unskip
the tests for the misbehaving renderer.

## 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].

<!-- 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
vashworth pushed a commit to vashworth/packages that referenced this pull request Jul 30, 2025
…r#9646)

flutter/flutter@9c626d9...440713c

2025-07-18 [email protected] Add OS version support section to plugin docs (flutter/flutter#172316)
2025-07-18 [email protected] Roll Dart SDK from 7fcc5f48c335 to fe2232bd5b9f (2 revisions) (flutter/flutter#172339)
2025-07-18 [email protected] Refactor handling of frame waiting. (flutter/flutter#172277)
2025-07-18 [email protected] Roll pub packages (flutter/flutter#172332)
2025-07-17 [email protected] Refactor and forbid `base/exit.dart` outside of `lib/runner.dart` (flutter/flutter#171923)
2025-07-17 [email protected] Use UTC timezone for `stamp_command_test` to avoid local TZ flakes (flutter/flutter#172319)
2025-07-17 [email protected] [web] Add tests for unified platform view embedding behavior (flutter/flutter#172313)
2025-07-17 [email protected] Platform views shouldn't receive pointer events when not laid out (flutter/flutter#172043)
2025-07-17 [email protected] Fix Size.isEmpty description (flutter/flutter#172021)
2025-07-17 [email protected] feat: Add `maxCount` parameter to `Badge.count` constructor. (flutter/flutter#171054)
2025-07-17 [email protected] add `debugPaintTextLayoutBoxes` for debugging text layout (flutter/flutter#168876)
2025-07-17 [email protected] Roll Packages from 4a231ae to cb8fef6 (31 revisions) (flutter/flutter#172303)
2025-07-17 [email protected] Fix mutating Paint bug (flutter/flutter#171180)
2025-07-17 [email protected] No SystemContextMenu when readOnly is true (flutter/flutter#171242)
2025-07-17 [email protected] Add a getter to get the recorder used by painting context (flutter/flutter#170223)
2025-07-17 [email protected] [Impeller] Add missing SetPipeline call for the vertices uber pipeline in AtlasContents (flutter/flutter#172273)
2025-07-17 [email protected] Roll Dart SDK from 486f9c0663bc to 7fcc5f48c335 (1 revision) (flutter/flutter#172279)
2025-07-17 [email protected] Roll Skia from 3673a1f26a63 to 9587301e33bc (3 revisions) (flutter/flutter#172281)
2025-07-17 [email protected] Fix a race in FlutterEngineTest.CanLogToStdout (flutter/flutter#172025)

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
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
…#172313)

Adds tests for expected behavior of platform view embedding for the
unified renderer frontend.

We currently skip the tests for the renderer which doesn't yet comport
to the expected unified behavior. See [this
doc](https://docs.google.com/document/d/1-BYZO_oAOJkS_spmELqCmnPQIEUibT3Sj2GhIL3luow/edit?tab=t.0)
for an overview of the different behaviors and the expected behavior of
the unified platform view embedder.

This adds tests for flutter#172308, a
follow-up PR will unify the platform view embedder behavior and unskip
the tests for the misbehaving renderer.

## 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].

<!-- 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
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
…#172313)

Adds tests for expected behavior of platform view embedding for the
unified renderer frontend.

We currently skip the tests for the renderer which doesn't yet comport
to the expected unified behavior. See [this
doc](https://docs.google.com/document/d/1-BYZO_oAOJkS_spmELqCmnPQIEUibT3Sj2GhIL3luow/edit?tab=t.0)
for an overview of the different behaviors and the expected behavior of
the unified platform view embedder.

This adds tests for flutter#172308, a
follow-up PR will unify the platform view embedder behavior and unskip
the tests for the misbehaving renderer.

## 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].

<!-- 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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 12, 2025
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
…#172313)

Adds tests for expected behavior of platform view embedding for the
unified renderer frontend.

We currently skip the tests for the renderer which doesn't yet comport
to the expected unified behavior. See [this
doc](https://docs.google.com/document/d/1-BYZO_oAOJkS_spmELqCmnPQIEUibT3Sj2GhIL3luow/edit?tab=t.0)
for an overview of the different behaviors and the expected behavior of
the unified platform view embedder.

This adds tests for flutter#172308, a
follow-up PR will unify the platform view embedder behavior and unskip
the tests for the misbehaving renderer.

## 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].

<!-- 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
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.

2 participants