Greg Spencer
a280346193
Add AppLifecycleListener
, with support for application exit handling ( #123274 )
...
## Description
This adds `AppLifecycleListener`, a class for listening to changes in the application lifecycle, and responding to requests to exit the application.
It depends on changes in the Engine that add new lifecycle states: https://github.com/flutter/engine/pull/42418
Here's a diagram for the lifecycle states. I'll add a similar diagram to the documentation for these classes.

## Related Issues
- https://github.com/flutter/flutter/issues/30735
## Tests
- Added tests for new lifecycle value, as well as for the `AppLifecycleListener` itself.
2023-06-08 22:57:19 +00:00
Michael Goderbauer
4cf89cc278
Remove LiveTestRenderView ( #127882 )
...
In the multi view world, `RenderViews` are created by the `View` widget and no longer owned by the binding. Prior to this change, the `LiveTestWidgetsFlutterBinding` owned and managed a special subclass of `RenderView`, the `_LiveTestRenderView`. In the new world, where `RenderView`s can be created anywhere in the widget tree where a `View` widget is used, this setup is no longer feasible. This change removes this special `_LiveTestRenderView` and instead adds debug hocks to `RenderView` to allow the `LiveTestWidgetsFlutterBinding` to draw a debug overlay on top of the content of any `RenderView`.
2023-06-02 20:41:05 +00:00
Greg Spencer
a257efc284
Fix handling of AppLifecycleState.hidden ( #127987 )
...
## Description
This fixes the parsing of `AppLifecycleState` in the services binding so that it knows what it is.
## Related Issues
- Fixes https://github.com/flutter/flutter/issues/127974
## Tests
- Added a test that causes parsing of all the different app lifecycle states.
2023-05-31 22:03:06 +00:00
Nate Bosch
2089eacc00
Switch imports from test_api to focused libaries ( #125854 )
...
Move imports of API available in `hooks.dart` or `scaffolding.dart` to use those more narrow libraries.
Move imports of APIs from `package:matcher` to import directly. The next major version of `test_api` will remove the exports of `matcher` APIs.
2023-05-04 08:01:12 +00:00
Bruno Leroux
af050d95ae
Add a channel to query the engine keyboard state ( #122885 )
...
## Description
This PR adds a new channel to query the engine keyboard state.
See https://github.com/flutter/flutter/issues/87391#issuecomment-1228975571 for motivation.
## Related Issue
Framework side implementation for https://github.com/flutter/flutter/issues/87391 .
Once approved the framework will try to query the initial keyboard state from the engine. PRs will be needed on the engine side to answer the framework query.
## Tests
Adds 1 test.
2023-04-28 21:05:20 +00:00
pdblasi-google
6839b3cbd6
Adds dart_fix
support to flutter_test
( #124347 )
...
Adds `dart_fix` support to `flutter_test`
2023-04-11 21:09:07 +00:00
Greg Price
846fcefd21
Fix surface-size state leak in material/paginated_data_table_test (framework shuffle-all 3/n) ( #123842 )
...
Fix surface-size state leak in material/paginated_data_table_test (framework shuffle-all 3/n)
2023-04-06 23:34:12 +00:00
Michael Goderbauer
25a2dfb302
Rename RenderView.window to RenderView.view ( #124060 )
2023-04-04 11:22:22 -07:00
Michael Goderbauer
48bb12dfbe
Make Element tree root generic ( #123352 )
...
Make Element tree root generic
2023-03-27 20:31:49 +00:00
Michael Goderbauer
fda9ecfef7
Remove 1745 decorative breaks ( #123259 )
...
Remove 1745 decorative breaks
2023-03-22 21:12:22 +00:00
pdblasi-google
4695fcc782
Deprecates TestWindow
( #122824 )
...
Deprecates `TestWindow`
2023-03-21 18:43:50 +00:00
Ian Hickson
245d6d45a1
Assert that runApp is called in the same zone as binding.ensureInitialized ( #122836 )
...
Assert that runApp is called in the same zone as binding.ensureInitialized
2023-03-16 22:33:09 +00:00
yaakovschectman
5bea4d9023
Revert "Assert that runApp is called in the same zone as binding.ensureInitialized ( #117113 )" ( #122830 )
...
Revert "Assert that runApp is called in the same zone as binding.ensureInitialized"
2023-03-16 20:29:13 +00:00
Ian Hickson
96f927fb0d
Assert that runApp is called in the same zone as binding.ensureInitialized ( #117113 )
...
Assert that runApp is called in the same zone as binding.ensureInitialized
2023-03-16 19:28:14 +00:00
Michael Goderbauer
a599c08c32
Remvoe last few references to window singleton ( #122644 )
...
Remove last few references to window singleton
2023-03-15 00:34:34 +00:00
pdblasi-google
7dd53fefe9
Reland (3): Removes single window assumptions from flutter_test
( #122422 )
...
Reland (3): Removes single window assumptions from `flutter_test`
2023-03-13 21:50:24 +00:00
Michael Goderbauer
b4019f9884
Reland "Remove single view assumption from TestViewConfiguration ( #122352 )" ( #122414 )
...
Reland "Remove single view assumption from TestViewConfiguration (#122352 )"
2023-03-10 19:30:34 +00:00
Casey Hillers
1f42612323
Revert PRs relating to single window assumption ( #122369 )
...
* Revert "Remove references to BindingBase.window (#122119 )"
This reverts commit c7681f00cf
.
* Revert "Remove another reference to BindingBase.window (#122341 )"
This reverts commit 6ec4445063
.
* Revert "Reland (2): Removes single window assumptions from `flutter_test` (#122233 )"
This reverts commit eb3d317ea0
.
* Revert "Remove single view assumption from TestViewConfiguration (#122352 )"
This reverts commit 927289fb4e
.
* Revert "Updates `flutter/test/cupertino` to no longer use `TestWindow` (#122325 )"
This reverts commit 67e17e45f0
.
* Revert "Updates `flutter/test/gestures` to no longer reference `TestWindow` (#122327 )"
This reverts commit c2a5111cc0
.
* Revert "Updates `flutter/test/rendering` to no longer use `TestWindow` (#122347 )"
This reverts commit 28b65e089b
.
* Revert "Updates `flutter_localizations/test` to stop using `TestWindow` (#122321 )"
This reverts commit 01367d52d7
.
2023-03-09 22:53:38 -08:00
Michael Goderbauer
927289fb4e
Remove single view assumption from TestViewConfiguration ( #122352 )
...
Remove single view assumption from TestViewConfiguration
2023-03-10 01:54:00 +00:00
pdblasi-google
eb3d317ea0
Reland (2): Removes single window assumptions from flutter_test
( #122233 )
...
Reland (2): Removes single window assumptions from `flutter_test`
2023-03-09 00:52:05 +00:00
Casey Hillers
0091601057
Revert "Reland: Removes single window assumptions from flutter_test
( #122060 )" ( #122193 )
...
Revert "Reland: Removes single window assumptions from `flutter_test`"
2023-03-08 19:42:03 +00:00
pdblasi-google
a626f4db6f
Reland: Removes single window assumptions from flutter_test
( #122060 )
...
Reland: Removes single window assumptions from `flutter_test`
2023-03-07 21:12:59 +00:00
pdblasi-google
a53105d941
Revert "Removes single window assumptions from flutter_test
( #121549 )" ( #122037 )
...
This reverts commit f2dd19d5b6
.
2023-03-06 11:49:40 -08:00
pdblasi-google
f2dd19d5b6
Removes single window assumptions from flutter_test
( #121549 )
...
Removes single window assumptions from `flutter_test`
2023-03-06 18:38:14 +00:00
Loïc Sharma
5a3957f3b9
Revert "Fix error when resetting configurations in tear down phase" ( #120739 )
...
Reverts flutter/flutter#114468 by @fzyzcjy
Example failure: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8789140722059256001/+/u/run_test.dart_for_tool_integration_tests_shard_and_subshard_1_4/test_stdout
2023-02-14 16:42:16 -08:00
fzyzcjy
577ad2ee8a
Fix error when resetting configurations in tear down phase ( #114468 )
...
* move _verifyInvariants
* fix
* fix (mimic import test_api.dart)
* fix
* Update binding.dart
* add tests
* try to move
* Revert "try to move"
This reverts commit d3c466d226
.
* Update binding.dart
2023-02-15 00:00:17 +00:00
Ian Hickson
07c548c698
Apply BindingBase.checkInstance to TestDefaultBinaryMessengerBinding ( #116937 )
2023-02-13 23:55:58 +00:00
Michael Goderbauer
83720015a4
Remove unnecessary null checks in flutter_test ( #118865 )
2023-01-20 22:01:13 +00:00
fzyzcjy
61deaef5df
Fix bug thattimeDilation
is not reset, causing subsequent test errors, and add verifications to ensure such problem does not exist in the future ( #113830 )
2022-11-01 22:50:00 +00:00
nbayati
235a3252d2
Provide test API for accessibility announcements ( #109661 )
2022-10-26 18:05:07 +00:00
Xilai Zhang
8d3c7e7da6
Revert "AutomatedTestWidgetsFlutterBinding.pump
provides wrong pump time stamp, probably because of forgetting the precision" ( #113415 )
2022-10-14 15:29:07 +00:00
fzyzcjy
1966aaf8ba
AutomatedTestWidgetsFlutterBinding.pump
provides wrong pump time stamp, probably because of forgetting the precision (#112609 )
2022-10-10 18:32:25 +00:00
fzyzcjy
c7b40a5270
Export elapseBlocking
to test binding, so slow sync work can be simulated such as a slow widget build ( #112619 )
2022-10-05 16:35:58 +00:00
gaaclarke
c33115943f
Revert "Started handling messages from background isolates." ( #111318 )
2022-09-09 23:25:17 +00:00
gaaclarke
0d19d46b44
Started handling messages from background isolates. ( #109005 )
...
Started handling messages from background isolates.
2022-09-09 15:14:21 -07:00
Kaushik Iska
d5f372bccd
Request DartPerformanceMode.latency
during transitions ( #110600 )
2022-09-07 12:54:06 -04:00
Ian Hickson
9b2668a451
Minor fix compendium ( #107874 )
2022-08-11 02:33:07 +00:00
Michael Goderbauer
e27a19e3f8
Remove outdated ignores ( #108924 )
2022-08-03 23:37:05 +00:00
Jia Hao
4d73448b52
[flutter_test] Add flag to send device pointer events to the framework ( #108430 )
2022-08-03 17:56:05 +00:00
Tong Mu
4056d3ffde
Explain the "patching" protocol in KeyMessageManager.keyMessageHandler
and add an example ( #105280 )
2022-07-26 05:42:05 +00:00
Dan Field
199cb2f5e6
Revert "Allow setting of TestWidgetsFlutterBinding.pointerEventSource ( #107976 )" ( #108038 )
...
This reverts commit 641f4e2403
.
2022-07-20 11:14:58 -07:00
Sai Sandeep Mutyala
641f4e2403
Allow setting of TestWidgetsFlutterBinding.pointerEventSource ( #107976 )
2022-07-20 09:19:17 -07:00
Xilai Zhang
d6f090d952
[g3 roll] revert #105537 Implement frameData for TestWindow ( #107168 )
...
* Revert "Reland "Clipping if only one character text overflows (#99146 )" (#102130 )"
This reverts commit 3f43d9f3d4
.
* Revert "Implement frameData for TestWindow (#105537 )"
This reverts commit 21841d7e35
.
2022-07-06 10:29:19 -07:00
Dan Field
21841d7e35
Implement frameData for TestWindow ( #105537 )
2022-06-27 20:26:08 +00:00
Bryan Oltman
6c3a0e4d21
Fix typo in flutter_test binding.dart ( #106505 )
2022-06-24 04:19:06 +00:00
Pierre-Louis
74cfc3db67
Use curly_braces_in_flow_control_structures
for non-flutter
packages ( #104629 )
...
* Use `curly_braces_in_flow_control_structures` for `packages/flutter_driver`
* Use `curly_braces_in_flow_control_structures` for `packages/flutter_goldens`
* Use `curly_braces_in_flow_control_structures` for `packages/flutter_goldens_client`
* Use `curly_braces_in_flow_control_structures` for `packages/flutter_localizations`
* Use `curly_braces_in_flow_control_structures` for `packages/flutter_test`
* Use `curly_braces_in_flow_control_structures` for `packages/flutter_web_plugins`
* fix comments
* Use `curly_braces_in_flow_control_structures` for `packages/integration_test`
* fix indentation
2022-05-25 20:01:11 +02:00
Tong Mu
23bc3d64eb
[Mouse] Remove all pointers at the end of tests ( #102694 )
2022-05-19 17:48:10 -07:00
xubaolin
b20e27e77e
Does not replace the root layer unnecessarily ( #101748 )
2022-05-05 18:44:10 -07:00
Michael Goderbauer
3e406c6781
Prepare packages
(minus tools,framework) for use_super_parameters
( #100510 )
2022-03-30 15:31:59 -07:00
Michael Goderbauer
852bfe2a73
Use BindingBase.platformDispatcher
over BindingBase.window
where possible ( #99443 )
2022-03-04 11:11:07 -08:00