Tong Mu
884158a6e3
Reland 3: Make LiveTestWidgetsFlutterBinding work with setSurfaceSize and live tests ( #87239 )
...
* Revert "Revert "Reland 2: Make LiveTestWidgetsFlutterBinding work with setSurfaceSize and live tests (#86912 )" (#87233 )"
This reverts commit 5b80d32a84
.
* Record tap positions
2021-07-29 15:11:26 -07:00
Tong Mu
caf876cf40
Reland: Keyboard events ( #87174 )
2021-07-29 14:24:03 -07:00
Tong Mu
ccf6f0353a
Revert "Restores surface size in the postTest of test binding ( #87240 )" ( #87258 )
...
This reverts commit 7707f42318
.
2021-07-29 01:50:54 -07:00
Tong Mu
7707f42318
Restores surface size in the postTest of test binding ( #87240 )
2021-07-28 19:28:28 -07:00
Tong Mu
5b80d32a84
Revert "Reland 2: Make LiveTestWidgetsFlutterBinding work with setSurfaceSize and live tests ( #86912 )" ( #87233 )
...
This reverts commit b50991d683
.
2021-07-28 15:44:09 -07:00
Tong Mu
2f4f170dd2
Revert "Keyboard events ( #83752 )" ( #87171 )
...
This reverts commit 5f792ba170
.
2021-07-28 02:32:08 -07:00
Tong Mu
b50991d683
Reland 2: Make LiveTestWidgetsFlutterBinding work with setSurfaceSize and live tests ( #86912 )
2021-07-27 14:44:03 -07:00
Tong Mu
5f792ba170
Keyboard events ( #83752 )
2021-07-26 12:28:05 -07:00
Tong Mu
24ad608bd8
Revert "Reland: Make LiveTestWidgetsFlutterBinding work with setSurfaceSize and live tests ( #86739 )" ( #86823 )
...
This reverts commit cf3d9409b3
.
2021-07-21 16:13:10 -07:00
Tong Mu
cf3d9409b3
Reland: Make LiveTestWidgetsFlutterBinding work with setSurfaceSize and live tests ( #86739 )
...
This PR fixes several bugs related to live tests, adds more tests, and completes the documentation of several methods related to pointer events.
2021-07-21 12:49:26 -07:00
Kate Lovett
8802e325a0
Revert "Make LiveTestWidgetsFlutterBinding work with setSurfaceSize and live tests ( #86449 )" ( #86730 )
...
This reverts commit cd78190b0c
.
2021-07-20 14:56:50 -04:00
Tong Mu
cd78190b0c
Make LiveTestWidgetsFlutterBinding work with setSurfaceSize and live tests ( #86449 )
...
This PR fixes several bugs related to live tests, adds more tests, and completes the documentation of several methods related to pointer events.
2021-07-19 14:54:24 -07:00
Ren You
3dea9f0251
Revert "Clean up the bindings APIs ( #86438 )" ( #86484 )
...
This reverts commit d056500bfe
.
2021-07-15 09:29:16 -07:00
Ian Hickson
d056500bfe
Clean up the bindings APIs ( #86438 )
2021-07-14 14:41:24 -07:00
Zachary Anderson
7f741e9181
Revert "Clean up the bindings APIs ( #86388 )" ( #86404 )
...
This reverts commit 31de052e3f
.
2021-07-13 21:32:29 -07:00
Ian Hickson
31de052e3f
Clean up the bindings APIs ( #86388 )
2021-07-13 18:31:11 -07:00
Ian Hickson
c800b9c3e4
Revert "Clean up the bindings APIs ( #83843 )" ( #86386 )
...
This reverts commit e2490f2906
.
2021-07-13 15:47:40 -07:00
Ian Hickson
e2490f2906
Clean up the bindings APIs ( #83843 )
2021-07-13 12:41:03 -07:00
Tong Mu
e3da1bd7aa
Test WidgetTester handling test pointers ( #83337 )
...
Adds tests to the following behaviors, which have existed without tests:
- When tapping during live testing, a message is printed with widgets that contain the tap location.
- When tapping during live testing, a mark is displayed on screen on the tap location.
2021-06-02 11:50:09 -07:00
Ian Hickson
5e0cc4cba4
Migrate to ChannelBuffers.push ( #82564 )
2021-05-21 15:09:03 -07:00
Ian Hickson
2ae1e39810
Revert "Migrate to ChannelBuffers.push ( #82057 )" ( #82525 )
2021-05-14 12:09:03 -07:00
Jia Hao
08154b22ce
Revert "Init licenses for test bindings ( #81961 )" ( #82337 )
2021-05-13 21:29:03 -07:00
Ian Hickson
b86d5c0094
Migrate to ChannelBuffers.push ( #82057 )
2021-05-13 14:34:04 -07:00
Michael Goderbauer
b8a2456737
Enable library_private_types_in_public_api lint ( #81578 )
2021-05-10 16:26:16 -07:00
Jia Hao
b3f7ebe069
Init licenses for test bindings ( #81961 )
2021-05-07 17:54:02 -07:00
Ren You
7f1d1414cc
Revert "Migrate to ChannelBuffers.push ( #81235 )" ( #81829 )
...
This reverts commit 35ad43f20c
.
2021-05-04 06:17:19 -07:00
Ian Hickson
35ad43f20c
Migrate to ChannelBuffers.push ( #81235 )
2021-05-03 17:14:03 -07:00
Angjie Li
cbdd9c4787
Revert "Refactor text editing test APIs (Mark III) ( #80003 )" ( #81316 )
...
This reverts commit 285b475124
.
2021-04-27 11:34:36 -07:00
Angjie Li
b74df388e1
Revert "Migrate to ChannelBuffers.push ( #76288 )" ( #81226 )
...
This reverts commit c26ed03c8a
.
2021-04-26 12:57:17 -07:00
Ian Hickson
c26ed03c8a
Migrate to ChannelBuffers.push ( #76288 )
...
* Migrate to ChannelBuffers.push
* Move TestDefaultBinaryMessenger to its own file
* Apply deprecations and fix usages
2021-04-23 15:39:34 -07:00
Ian Hickson
285b475124
Refactor text editing test APIs (Mark III) ( #80003 )
2021-04-21 18:29:04 -07:00
Phil Quitslund
61c30c41b2
fix sort_directives violations ( #80817 )
2021-04-21 13:49:03 -07:00
Justin McCandless
0efb28d706
Revert "Fix a legacy TODO ( #77454 ) ( #79061 )" ( #79959 )
...
This reverts commit b070ed3c04
.
2021-04-07 12:24:22 -07:00
Ian Hickson
b070ed3c04
Fix a legacy TODO ( #77454 ) ( #79061 )
2021-04-02 22:39:03 -07:00
Chris Bracken
3e7e06512c
Correct misspellings throughout the codebase ( #79500 )
2021-04-01 10:04:03 -07:00
Angjie Li
6515806717
Revert "Fix a legacy TODO ( #77454 )" ( #78584 )
...
This reverts commit 5e4e530e93
.
2021-03-19 10:08:12 -07:00
Ian Hickson
5e4e530e93
Fix a legacy TODO ( #77454 )
2021-03-16 10:48:02 -07:00
Michael Goderbauer
7b251f5f37
Enable use_function_type_syntax_for_parameters lint ( #77163 )
2021-03-04 08:59:17 -08:00
Sam Rawlins
fcad4e2efe
Remove "unnecessary" imports in flutter_test ( #76157 )
2021-02-16 16:01:05 -08:00
Todd Volkert
835c7fab45
Fix FocusManager constructor ( #75894 )
...
The FocusManager constructor was registering global event handlers
on the shared RawKeyboard instance and the global pointer router.
This posed a few problems: (1) there was no way to unregister these
handlers, and (2) instantiating a second FocusManager would overwrite
the existing focus manager's RawKeyboard handler. This was manifesting
in unexpected ways, such as the fact that constructing a second
BuildOwner (for a parallel tree, for instance) was obliterating the
event handler for the main BuildOwner's focus manager, thus messing
with focus.
This change separates those global event registrations into a
dedicated method, registerGlobalHandlers(), and overrides dispose()
to properly unregister those handlers.
2021-02-12 17:19:20 -08:00
Ian Hickson
824042f9b2
Catch cases in tests where people try to tap on widgets that aren't reachable. ( #74798 )
2021-02-03 16:11:02 -08:00
Ian Hickson
37a0189773
Don't leak exceptions thrown by message channels ( #74446 )
2021-01-27 11:19:04 -08:00
Jia Hao
8a5ace25a5
Improve performance of Widget Tests ( #70730 )
2021-01-12 17:29:03 -08:00
Michael Goderbauer
cca1215939
Properly initialize RestorationManager in the TestBinding ( #70398 )
2020-11-12 13:59:05 -08:00
Greg Spencer
86f9ab511e
Revert usages of the binding's platformDispatcher to use window instead ( #70319 )
...
This reverts usages of the binding's platformDispatcher to use window again temporarily, because there isn't a TestPlatformDispatcher yet, and so some tests were failing because they mocked the TestWindow to return certain things (locales) that were returning the real values instead of the test values.
Once I've created a TestPlatformDispatcher to allow fake data to be passed to it, we can go back to using the platformDispatcher in all of these places
2020-11-12 11:17:00 -08:00
Greg Spencer
bbc0161669
Remove references to Window
, and switch usages to PlatformDispatcher
or SingletonFlutterWindow
( #69617 )
...
* Remove references to dart:ui.Window, and point usages to PlatformDispatcher or SingletonFlutterWindow, as appropriate
* remove new test platform dispatchers
* Amend documentation
2020-11-09 15:26:29 -08:00
Greg Spencer
88809aa247
Standardize dartdoc macro names ( #69445 )
2020-11-02 13:28:05 -08:00
Michael Goderbauer
42f3709a5a
Sound null safety for framework and flutter_test ( #68642 )
2020-10-21 10:09:11 -07:00
Alexandre Ardhuin
0d8d4f77aa
unnecessary null comparison ( #67525 )
2020-10-08 09:26:30 +02:00
Michael Goderbauer
8998167d0f
Make FlutterErrorDetails.exception non-nullable as documented ( #67364 )
2020-10-05 18:07:02 -07:00
Michael Goderbauer
19e07d2beb
Migrate flutter_test ( #66663 )
2020-09-30 17:03:40 -07:00
Alexandre Ardhuin
c2e43403af
apply upcoming lint cast_nullable_to_non_nullable ( #66455 )
...
* apply upcoming lint cast_nullable_to_non_nullable
* make RenderObjectElement.renderObject non-nullable
2020-09-27 21:29:42 +02:00
Tong Mu
a48e14308e
Expose GestureBinding.handlePointerEvent, replacing dispatchEvent as the preferred way to dispatch events ( #64846 )
2020-09-15 22:17:06 -07:00
Yuqian Li
e1eddb401d
Revert the revert ( #65602 )
2020-09-11 16:20:03 -07:00
Ming Lyu (CareF)
28de49e358
Revert "Reland #61998 and update complex_layout ios files ( #64885 )" ( #64990 )
...
This reverts commit df83398687
.
2020-08-31 18:47:08 -07:00
Ming Lyu (CareF)
df83398687
Reland #61998 and update complex_layout ios files ( #64885 )
2020-08-31 17:23:06 -07:00
Shi-Hao Hong
34541c3073
Revert "A benchmark test case for measuring scroll smoothness ( #61998 )" ( #64883 )
...
This reverts commit 12b7355da1
.
2020-08-30 18:42:10 +08:00
Ming Lyu (CareF)
12b7355da1
A benchmark test case for measuring scroll smoothness ( #61998 )
2020-08-29 04:28:03 -07:00
Michael Goderbauer
e5ca020d66
Make dartdoc warnings fatal for flutter_test ( #62614 )
2020-08-03 10:46:04 -07:00
Ming Lyu (CareF)
87dbfa8330
Update framePolicy docs ( #61773 )
2020-07-30 12:11:03 -07:00
Michael Goderbauer
f4e10b4fb5
Make dartdoc warnings fatal (& cleanup of warnings) ( #62367 )
2020-07-28 16:11:04 -07:00
Michael Goderbauer
175e5c9aca
Restoration Framework ( #60375 )
...
* state restoration
* added example
* typos and analyzer
* whitespace
* more typos
* remove unnecessary import
* whitespace
* fix sample code
* tests for restorationmanager and restorationid
* ++
* typo
* tests for bucket, part1
* rename tests
* more tests
* finished tests for service layer
* remove wrong todo
* ++
* review comments
* tests for Unmanaged and regular scope
* RootRestorationScope tests
* typo
* whitespace
* testing framework
* tests for properties
* last set of tests
* analyzer
* typo
* dan review
* whitespace
* ++
* refactor finalizers
* ++
* ++
* dispose guard
* ++
* ++
* dan review
* add manager assert
* ++
* analyzer
* greg review
* fix typo
* Ian & John review
* ian review
* RestorationID -> String
* revert comment
* Make primitives non-nullable in prep for NNBD
2020-07-28 10:16:36 -07:00
Ming Lyu (CareF)
3e7fe378e3
Reland "LiveTestWidgetsFlutterBinding support for non-touch event" ( #61901 )
2020-07-21 02:36:03 -07:00
Ming Lyu (CareF)
f98a00c750
Revert "LiveTestWidgetsFlutterBinding support for non-touch event ( #61872 )" ( #61900 )
...
This reverts commit aa4b4d35e1
.
2020-07-20 17:20:30 -04:00
Ming Lyu (CareF)
aa4b4d35e1
LiveTestWidgetsFlutterBinding support for non-touch event ( #61872 )
2020-07-20 17:02:59 -04:00
Ming Lyu (CareF)
54c9441723
benchmarkLive: a new LiveTestWidgetsFlutterBindingFramePolicy
for benchmark on device ( #61388 )
...
* add benchmarkLive flag and tests
* update handlePointerEventRecord doc
* using e2e 0.6.1
2020-07-17 18:56:12 -04:00
Ming Lyu (CareF)
a76b5eb79f
Add support in WidgetTester for an array of inputs ( #60796 )
...
* Add input event array support
* Add a tap test
* remove unused import
* remove extra assert
2020-07-10 17:03:12 -04:00
Ming Lyu (CareF)
a5fa083906
Add comment explain dispatchEvent override ( #60734 )
2020-07-08 18:37:33 -04:00
Ming Lyu (CareF)
78bb587c70
respect line wrapping style guide ( #61118 )
2020-07-08 16:44:59 -04:00
Ming Lyu (CareF)
61477b5949
Fix PointerAddedEvent handling in LiveTestWidgetsFlutterBinding ( #61102 )
...
* Fix PointerAddedEvent handling in tester
2020-07-08 13:28:51 -04:00
Dan Field
fb57edcc80
Revert "Revert "Fix remaining holes in stack trace demangling ( #60478 )" ( #60916 )" ( #60996 )
...
This reverts commit 2c7e5dd935
.
2020-07-07 15:30:32 -07:00
Mehmet Fidanboylu
8c67781f36
Comments around hanging tests via runAsync. ( #60136 )
2020-07-07 09:14:02 -07:00
Dan Field
2c7e5dd935
Revert "Fix remaining holes in stack trace demangling ( #60478 )" ( #60916 )
...
This reverts commit d986fdc31a
.
2020-07-06 10:07:36 -07:00
Andre
d986fdc31a
Fix remaining holes in stack trace demangling ( #60478 )
...
* Implement stack trace demangling in the framework.
2020-07-06 08:11:03 -07:00
Pierre-Louis
0bc4368233
Typo sweep ( #60693 )
2020-07-02 13:08:02 -07:00
Dan Field
868c4d8ce0
Fix issue with stack traces getting mangled ( #59900 )
2020-06-23 15:29:57 -07:00
Dan Field
68b131f313
[e2e] make test bindings friendlier to integration tests ( #58210 )
2020-05-29 11:50:12 -07:00
Dan Field
02b1080101
Functionality to check handlers set on platform channels ( #57696 )
2020-05-21 14:52:05 -07:00
cg021
1cfd792a38
remove pending timers list code out of assert message ( #57287 )
...
* move pending timers list code out of assert
* style change
Co-authored-by: Emmanuel Garcia <egarciad@google.com>
* add unit tests
* formatting
* pending timer test
* pending timer assertion test
* add setup and teardown
Co-authored-by: Emmanuel Garcia <egarciad@google.com>
2020-05-18 18:18:16 -05:00
chunhtai
d482163f59
Revert "Fix FlutterError.onError in debug mode ( #53843 )" ( #55484 )
...
This reverts commit d35671c6d1
.
2020-04-23 11:57:18 -07:00
chunhtai
d35671c6d1
Fix FlutterError.onError in debug mode ( #53843 )
...
* Fix FlutterError.onError in debug mode
* update
* fix comments
* add license header
* fix analyzer
* update
* another attempt
* fix test
* fix comment
2020-04-22 17:17:42 -07:00
Jacob MacDonald
6399be62d2
remove flutter_test quiver dep, use fake_async and clock instead ( #54125 )
...
## Description
Removes the `flutter_test` dependency on `quiver`, instead using the more targeted `clock` and `fake_async` packages.
## Related Issues
https://github.com/flutter/flutter/issues/53908
## Tests
No changes to tests
## Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (`[x]`). This will ensure a smooth and quick review process.
- [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [x] I signed the [CLA].
- [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
- [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] All existing and new tests are passing.
- [x] The analyzer (`flutter analyze --flutter-repo`) does not report any problems on my PR.
- [x] I am willing to follow-up on review comments in a timely manner.
## Breaking Change
Did any tests fail when you ran them? Please read [Handling breaking changes].
- [ ] No, no existing tests failed, so this is *not* a breaking change.
- [x] Yes, this is a breaking change. *If not, delete the remainder of this section.*
- [x] I wrote a design doc: https://docs.google.com/document/d/1EkkLbECNBwHgddBQAZqEy7iQLTIxR1rgChKzxcLwhio/edit
- [x] I got input from the developer relations team, specifically from: @RedBrogdon
- [x] I wrote a migration guide: https://github.com/flutter/website/pull/3932
<!-- Links -->
[issue database]: https://github.com/flutter/flutter/issues
[Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Test Coverage]: https://github.com/flutter/flutter/wiki/Test-coverage-for-package%3Aflutter
[Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Handling breaking changes]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
2020-04-15 12:10:26 -07:00
Michael Goderbauer
d47ad7ec0d
Reverse dependency between services and scheduler ( #54212 )
2020-04-08 09:12:03 -07:00
Yegor
5ea13b8493
fix KeySet.hashCode; enable multiple web tests ( #52861 )
...
fix KeySet.hashCode; enable multiple web tests
2020-03-20 08:49:19 -07:00
Dan Field
b2a27c109c
Be clearer about when and why we override HttpClient in tests ( #49844 )
2020-01-31 09:22:30 -08:00
Alexandre Ardhuin
4f9b6cf017
enable lint prefer_final_in_for_each ( #47724 )
2020-01-07 16:32:04 +01:00
Michael Goderbauer
1ac17c14fc
Re-land "Add option to delay rendering the first frame ( #45135 )" ( #45941 )
2019-12-03 19:48:01 -08:00
Kate Lovett
cd052a56cb
Revert "Re-land "Add option to delay rendering the first frame ( #45135 )" ( #45588 )" ( #45939 )
...
This reverts commit c59151b1cd
.
2019-12-02 15:08:35 -08:00
Michael Goderbauer
c59151b1cd
Re-land "Add option to delay rendering the first frame ( #45135 )" ( #45588 )
2019-12-02 13:33:45 -08:00
Ian Hickson
449f4a6673
License update ( #45373 )
...
* Update project.pbxproj files to say Flutter rather than Chromium
Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.
* Update the copyright notice checker to require a standard notice on all files
* Update copyrights on Dart files. (This was a mechanical commit.)
* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.
Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).
* Clean up the copyrights in non-Dart files. (Manual edits.)
Also, make sure templates don't have copyrights.
* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
chunhtai
314eb3bae3
Moving pointer event sanitizing to engine. ( #44217 )
2019-11-20 13:04:29 -08:00
Alexandre Ardhuin
4bf03c6cf8
implicit-casts:false in flutter_test ( #44996 )
2019-11-19 08:10:24 +01:00
Jonah Williams
e77c24ef91
Update package test ( #44882 )
2019-11-14 09:31:36 -08:00
Greg Spencer
0509791663
Fix mouse hover to not schedule a frame for every mouse move. ( #41014 )
...
This fixes the mouse hover code to not schedule frames with every mouse move.
Before this, it would schedule a post frame callback, and then schedule a frame immediately, even if there was nothing that needed to be updated. Now it will schedule checks for mouse position updates synchronously, unless there's a new annotation, and skip scheduling a new frame in all cases. It has to be async in the case of a new annotation (i.e. a new MouseRegion is added), since when the annotation is added, it hasn't yet painted, and it can't hit test against the new layer until after the paint, so in that case it schedules a post frame callback, but since it's already building a frame when it does that, it doesn't need to schedule a frame.
The code also used to do mouse position checks for all mice if only one mouse changed position. I fixed this part too, so that it will only check position for the mouse that changed.
2019-09-26 13:13:42 -07:00
Mehmet Fidanboylu
c19e553d64
Allow test beds to override defaultTestTimeout ( #40806 )
2019-09-24 16:53:40 -07:00
Greg Spencer
0e6cb28dbe
Add fake keyboard key generation to the testing framework ( #40706 )
...
There were four or five different implementations in various tests for sendFakeKeyEvent, which roughly all did the same thing. I was going to add yet another one, and decided that it needed to be generalized and centralized. This replaces those instances with something that just takes a LogicalKeyboardKey so that it's self-documenting, and can be used with multiple platforms.
This adds two functions to widget tester: sendKeyDownEvent and sendKeyUpEvent which simulate key up/down from a physical keyboard. It also adds global functions simulateKeyDownEvent and simulateKeyUpEvent that can be called without a widget tester. All are async functions protected by the async guard.
2019-09-24 08:14:38 -07:00
Jonah Williams
18ffb0fbc3
place conditions on same line ( #40391 )
2019-09-12 18:30:24 -07:00
Jonah Williams
8504f3ae13
Update the supported library set for Flutter for web ( #39983 )
2019-09-10 17:27:30 -07:00
chunhtai
57d714ebb8
fix widget built twice during warm up frame ( #39079 )
2019-09-06 09:46:18 -07:00
Michael Goderbauer
e2325600ea
Do not render any frames when just initializing Bindings ( #39535 )
2019-09-05 17:08:50 -07:00