flutter/dev/integration_tests/ui
Loïc Sharma ce61eda70c
[Windows] Ensure window is shown (#127046)
## Background

The Windows runner has a race at startup:

1. **Platform thread**: creates a hidden window
2. **Platform thread**: launches the Flutter engine
3. **UI/Raster threads**: renders the first frame
4. **Platform thread**: Registers a callback to show the window once the next frame has been rendered.

Steps 3 and 4 happen in parallel and it is possible for step 3 to complete before step 4 starts. In this scenario, the next frame callback is never called and the window is never shown.

As a result the `windows_startup_test`'s test, which [verifies that the "show window" callback is called](1f09a8662d/dev/integration_tests/windows_startup_test/windows/runner/flutter_window.cpp (L60-L64)), can flake if the first frame is rendered before the show window callback has been registered.

## Solution

This change makes the runner schedule a frame after it registers the next frame callback. If step 3 hasn't completed yet, this no-ops as a frame is already scheduled. If step 3 has already completed, a new frame will be rendered, which will call the next frame callback and show the window.

Part of https://github.com/flutter/flutter/issues/119415

See this thread for alternatives that were considered: https://github.com/flutter/engine/pull/42061#issuecomment-1550080722
2023-05-19 22:25:55 +00:00
..
android Revert "[integration_test] upgrade androidx test to 1.4.0" (#124644) 2023-04-11 18:54:59 -07:00
assets [framework] work around to load self packages from packages/ (#111350) 2022-09-12 18:30:00 +00:00
integration_test Add a flutter app that can resize itself as integration test app. (#112297) 2022-09-26 17:45:19 +00:00
ios Migrate Xcode projects last version checks to Xcode 14.3 (#125827) 2023-05-02 00:06:33 +00:00
lib Make Flex,Row,Column const for real (#119673) 2023-02-02 19:33:57 +00:00
linux Check cc files (#123704) 2023-03-29 18:40:58 +00:00
macos Migrate Xcode projects last version checks to Xcode 14.3 (#125827) 2023-05-02 00:06:33 +00:00
test Revert "Speed up first asset load by using the binary-formatted asset manifest for image resolution (#118782)" (#121220) 2023-02-23 00:13:33 +00:00
test_driver [flutter_tools] Remove package:image (#115848) 2022-11-22 21:49:57 +00:00
web [flutter_tools] ensure track-widget-creation can be disabled on Android/macOS (#56203) 2020-05-04 11:22:15 -07:00
windows [Windows] Ensure window is shown (#127046) 2023-05-19 22:25:55 +00:00
pubspec.yaml Upgrade leak_tracker to 5.0.0 (#126367) 2023-05-16 04:39:26 +00:00
README.md Deep linking: automatically push the route hiearchy on load. (#10894) 2017-06-23 14:58:29 -07:00

Flutter UI integration tests

This project contains a collection of non-plugin-dependent UI integration tests. The device code is in the lib/ directory, the driver code is in the test_driver/ directory. They work together. Normally they are run via the devicelab.

keyboard_resize

Verifies that showing and hiding the keyboard resizes the content.

routing

Verifies that flutter drive --route works correctly.