Skip to content

Conversation

@mattkae
Copy link
Contributor

@mattkae mattkae commented Sep 30, 2025

What's new?

  • Update Runner.rc to not include the icon file, as this is what the other integration tests do
  • Await change notifications on the controller when necessary

Pre-launch Checklist

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

…expected + commenting our erroneous icon in Runner.rc for win32
@github-actions github-actions bot added the a: desktop Running on desktop label Sep 30, 2025
Copy link
Contributor

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

Choose a reason for hiding this comment

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

Code Review

This pull request improves the reliability of windowing integration tests by introducing an awaitNotification helper to wait for asynchronous window state changes to complete before proceeding. This is applied to several window manipulation commands. The PR also includes a fix to an activation test and a configuration change for the Windows runner. My review focuses on improving the exception safety and robustness of the new helper function.

Comment on lines 43 to 53
Future<void> awaitNotification(VoidCallback act) async {
final Completer<void> notificationReceived = Completer();
void notificationHandler() {
notificationReceived.complete();
}

controller.addListener(notificationHandler);
act();
await notificationReceived.future;
controller.removeListener(notificationHandler);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The awaitNotification helper could leak a listener if the act() callback throws an exception, as the removeListener call would be skipped. To make this more robust, you should use a try...finally block to ensure the listener is always removed, regardless of whether an error occurs.

      Future<void> awaitNotification(VoidCallback act) async {
        final Completer<void> notificationReceived = Completer();
        void notificationHandler() {
          notificationReceived.complete();
        }

        controller.addListener(notificationHandler);
        try {
          act();
          await notificationReceived.future;
        } finally {
          controller.removeListener(notificationHandler);
        }
      }

Copy link
Contributor

@robert-ancell robert-ancell left a comment

Choose a reason for hiding this comment

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

LGTM

@mattkae mattkae enabled auto-merge October 2, 2025 15:32
@mattkae mattkae added this pull request to the merge queue Oct 2, 2025
Merged via the queue into flutter:master with commit de64eed Oct 2, 2025
153 checks passed
@mattkae mattkae deleted the windowing_integration_test_fixes branch October 2, 2025 16:22
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 3, 2025
…hanges is expected + commenting our erroneous icon in Runner.rc for win32 (flutter/flutter#176312)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 3, 2025
…hanges is expected + commenting our erroneous icon in Runner.rc for win32 (flutter/flutter#176312)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 3, 2025
…hanges is expected + commenting our erroneous icon in Runner.rc for win32 (flutter/flutter#176312)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 3, 2025
…hanges is expected + commenting our erroneous icon in Runner.rc for win32 (flutter/flutter#176312)
bufffun pushed a commit to bufffun/flutter that referenced this pull request Oct 3, 2025
…expected + commenting our erroneous icon in Runner.rc for win32 (flutter#176312)

## What's new?
- Update `Runner.rc` to not include the icon file, as this is what the
other integration tests do
- Await change notifications on the controller when necessary

## 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.
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Oct 3, 2025
…10170)

Manual roll requested by [email protected]

flutter/flutter@65aca36...5c0c9e9

2025-10-03 [email protected] Roll Packages from 5fd5f74 to e401aeb (4 revisions) (flutter/flutter#176466)
2025-10-03 [email protected] Roll Dart SDK from fdd90f38d6a0 to 0009748aed50 (3 revisions) (flutter/flutter#176461)
2025-10-03 [email protected] Roll Skia from f86ae4113254 to b842026480e0 (3 revisions) (flutter/flutter#176458)
2025-10-03 [email protected] Roll Skia from 1720a85a507e to f86ae4113254 (1 revision) (flutter/flutter#176443)
2025-10-03 [email protected] Roll Fuchsia Linux SDK from Vnoygds8HtDUvGLCK... to HUhTcRn-LUXa2Salu... (flutter/flutter#176442)
2025-10-03 [email protected] Roll Skia from cf339ab390c2 to 1720a85a507e (4 revisions) (flutter/flutter#176439)
2025-10-03 [email protected] Roll Dart SDK from 4f90a06328cb to fdd90f38d6a0 (7 revisions) (flutter/flutter#176431)
2025-10-02 [email protected] Roll Skia from 05c1f5803415 to cf339ab390c2 (11 revisions) (flutter/flutter#176426)
2025-10-02 [email protected] Add deeplinking for UIScene migration (flutter/flutter#176303)
2025-10-02 [email protected] Upgrade packages (flutter/flutter#176411)
2025-10-02 [email protected] Update localization from translation console (flutter/flutter#176324)
2025-10-02 [email protected] Update Framework CI to Use NDK r28c (flutter/flutter#176214)
2025-10-02 [email protected] Remove references to dart:js_util (flutter/flutter#176323)
2025-10-02 [email protected] Roll Packages from 321a584 to 5fd5f74 (6 revisions) (flutter/flutter#176409)
2025-10-02 [email protected] Windowing integration tests now await change futures if a changes is expected + commenting our erroneous icon in Runner.rc for win32 (flutter/flutter#176312)
2025-10-02 [email protected] Fix platform specific semantics for time picker buttons (flutter/flutter#176373)

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
mboetger pushed a commit to mboetger/flutter that referenced this pull request Oct 7, 2025
…expected + commenting our erroneous icon in Runner.rc for win32 (flutter#176312)

## What's new?
- Update `Runner.rc` to not include the icon file, as this is what the
other integration tests do
- Await change notifications on the controller when necessary

## 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.
okorohelijah pushed a commit to okorohelijah/flutter that referenced this pull request Oct 7, 2025
…expected + commenting our erroneous icon in Runner.rc for win32 (flutter#176312)

## What's new?
- Update `Runner.rc` to not include the icon file, as this is what the
other integration tests do
- Await change notifications on the controller when necessary

## 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.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 12, 2025
…hanges is expected + commenting our erroneous icon in Runner.rc for win32 (flutter/flutter#176312)
reidbaker pushed a commit to AbdeMohlbi/flutter that referenced this pull request Dec 10, 2025
…expected + commenting our erroneous icon in Runner.rc for win32 (flutter#176312)

## What's new?
- Update `Runner.rc` to not include the icon file, as this is what the
other integration tests do
- Await change notifications on the controller when necessary

## 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants