Commit graph

451 commits

Author SHA1 Message Date
Alexandre Ardhuin 32f1b810ae shorter nullable list duplications (#30305) 2019-04-05 10:23:35 -07:00
Alexandre Ardhuin bfa1d25bf9
some formatting of map, parameters and spaces (#29760) 2019-03-23 00:02:21 +01:00
Alexandre Ardhuin a6af422874
some spaces formatting (#29452)
* some space formattings

* always use blocks in if-else if a block is used

* format spaces in for and while

* allow multiline if conditions

* fix missing space
2019-03-20 23:23:31 +01:00
Dan Field 5e27ebbe8d
Add semantic label finders (#29342)
* Add semantic label finders
2019-03-18 20:32:03 -07:00
Dan Field 8e14c227eb
Make it easier to ensure semantics in widgetTests (#29387)
* Make it easier to ensure semantics
2019-03-18 10:08:23 -07:00
Jonah Williams 275769b89d
Add skip to group in test_compat (#29236) 2019-03-13 10:13:51 -07:00
Michael Goderbauer 816ae4b193
Include platformViewId in semantics tree (#28953) 2019-03-12 07:44:39 -07:00
stuartmorgan 5922a40e6a
Add support for scrollwheels (#22762)
Adds support for discrete scroll events, such as those sent by a scroll wheel.

Includes the plumbing to convert, dispatch, and handle these events, as well as
Scrollable support for consuming them.
2019-03-11 10:08:12 -07:00
Alexandre Ardhuin a0d1f93b07
fix block formatting (#29051) 2019-03-09 09:03:11 +01:00
Gary Qian 8f1a430557
Initialize the lifecycle state with initial state in window. Roll engine (19 commits) (#28688)
git log --oneline --no-merges f4951df193a7966f9ed4da43d555eee0913d84d1..a48cd16e077778a7aa5908e4faa4da07714260f2
a48cd16e0 Update a11y word forward/back enum names (https://github.com/flutter/engine/pull/8073)
b5f59ed89 Delay the vsync callback till the frame start time specified by embedder. (https://github.com/flutter/engine/pull/8072)
7426305f5 Mark const extern (https://github.com/flutter/engine/pull/8077)
d3f6d7a21 only partial rule revert (https://github.com/flutter/engine/pull/8078)
d71bfe58d Only build a full Dart SDK when building for the host system (https://github.com/flutter/engine/pull/8071)
de90dbff7 Refactor web configuration/ Add dartdevc (https://github.com/flutter/engine/pull/7978)
ff46dd38f Roll src/third_party/skia 4c1ea43a79b5..88b8d1124b72 (8 commits) (https://github.com/flutter/engine/pull/8070)
80c6dd286 Roll src/third_party/skia 692122e3ef23..4c1ea43a79b5 (3 commits) (https://github.com/flutter/engine/pull/8069)
68ed654ea Roll src/third_party/skia 3c957d575c58..692122e3ef23 (6 commits) (https://github.com/flutter/engine/pull/8067)
ca0bac4fb Revert "add signal to pointer kinds" (https://github.com/flutter/engine/pull/8066)
3fb627f2c add signal to pointer kinds (https://github.com/flutter/engine/pull/8065)
5a06afa2a Roll src/third_party/skia 801a9c16d81e..3c957d575c58 (19 commits) (https://github.com/flutter/engine/pull/8063)
a93d99db9 A11y callback (https://github.com/flutter/engine/pull/8005)
3661d5e43 Re-land "Buffer lifecycle in WindowData" (https://github.com/flutter/engine/pull/8032)
471a2c89a Send scroll events from the macOS shell (https://github.com/flutter/engine/pull/8056)
2fe9c9b5f Roll src/third_party/skia 72542816cadb..801a9c16d81e (46 commits) (https://github.com/flutter/engine/pull/8060)
3335764ae Skip skp files in license check (https://github.com/flutter/engine/pull/8050)
7f16789b2 Remove redundant thread checker in FML. (https://github.com/flutter/engine/pull/8053)
840c5233a Correct URL for Cirrus CI build status badge (https://github.com/flutter/engine/pull/8054)
57c120a29 remove extra source files (https://github.com/flutter/engine/pull/8052)
4773375c6 Used named conditionals for platform specific dependencies and suppress Android and Windows hooks on Mac. (https://github.com/flutter/engine/pull/8051)
70a18b515 Add clang static analysis support to gn wrapper (https://github.com/flutter/engine/pull/8047)
b30f9897b Improve elevation bounds for physical shape layers (https://github.com/flutter/engine/pull/8044)
e37bd27b4 Fix weak pointer use violations in shell and platform view. (https://github.com/flutter/engine/pull/8046)
dd80fc9ff Add engine support for scrollwheel events (https://github.com/flutter/engine/pull/7494)
2019-03-07 20:05:42 -08:00
Alexandre Ardhuin 440ce8fde6
Fix indentations of statements in BlockFunctionBody (#28933)
* fix indentof statements in BlockFunctionBody

* fix indentof statements in BlockFunctionBody in tests
2019-03-07 21:09:28 +01:00
TruongSinh Tran-Nguyen 0c7fe40e37 fix #19175 How should addTime be used from a test? (#25202) 2019-03-06 15:32:33 -08:00
Phil Quitslund 802eca29d2
set literal conversions (#27811) 2019-03-06 11:05:16 -08:00
Alexandre Ardhuin 4c1f4d14e1
fix some formatting issues (#28809)
* fix some formatting issues

* address review comments

* fix indent
2019-03-06 09:37:32 +01:00
Danny Tuppeny 740fb2a8bb
Fix the test annotation used for test groups (#28638) 2019-03-02 13:19:49 +00:00
Mouad Debbar b94bf87c70
Text selection via mouse (#28290) 2019-03-01 13:57:10 -08:00
Alexandre Ardhuin 387f885481
Add missing trailing commas (#28673)
* add trailing commas on list/map/parameters

* add trailing commas on Invocation with nb of arg>1

* add commas for widget containing widgets

* add trailing commas if instantiation contains trailing comma

* revert bad change
2019-03-01 08:17:55 +01:00
Anthony 338581b866
add await to fix analyzer (#28157) 2019-02-28 19:17:18 -05:00
jslavitz 47724f97fa
Breaks the moveBy call from drag and dragFrom into two separate calls and changes the default behavior of DragStartBehavior to DragStartBehavior.start (#26438)
* Breaking change which sets the default DragStartBehavior to DragStartBehavior.start and changes WidgetTester.drag and WidgetTester.dragFrom by breaking the moveBy function call into multiple pieces.
2019-02-25 14:15:31 -08:00
Alexandre Ardhuin 5169ab5974
format parameter list (#27261) 2019-02-21 09:27:07 +01:00
jslavitz 2c558fdb21
Adds fix for NAN value and pressure values outside of device reported min and max (#26659)
* Fix for nan pressure values and values outside min and max pressure ranges
2019-02-20 16:15:53 -08:00
Jonah Williams 3205736fcf
add ui.Window fallback to TestViewConfiguration (#27987) 2019-02-14 22:49:49 -08:00
Todd Volkert f1a8eed083
Revert "Clean up matters related to "offstageness". (#27425)" (#27915)
This reverts commit 1d93e924b7.
2019-02-13 20:58:41 -05:00
Ian Hickson 1d93e924b7
Clean up matters related to "offstageness". (#27425)
In particular, make debugVisitOnstageChildren only work in debug mode, and add documentation.
2019-02-13 15:36:47 -08:00
Matt Carroll a13fdbcf32
Implemented Dark Mode for Android (#25525) (#26605) 2019-02-06 16:52:47 -08:00
Matt Carroll 914f77f88f
Bugfix: Add platformBrightness to TestWindow. (#27569)
* Bugfix: Add platformBrightness to TestWindow.

* Manual engine roll:

cc27cafb8 Implemented Dark Mode for Android (#25525) ([flutter/engine#7488](https://github.com/flutter/engine/pull/7488))
9c05cbcfb Roll src/third_party/dart b53dceadaa..5823be65af (5 commits) 5823be65af [vm/compiler] Continued graph checker development (reland) 8231cdb7a3 [gardening] Update status for issue 35854 db7f848632 [vm] Remove dead BigInt code. 35ab1755f4 Support more type propagation for code-as-ui features 569ee07f91 [vm] Cleanup class finalization checks
ec5e6f6ef Ensure dart2js and kernel worker snapshots are copied out of gen dir ([flutter/engine#7692](https://github.com/flutter/engine/pull/7692))
8b5fa65c4 Roll src/third_party/skia 50ea3c06b80f..2d35a1c87553 (6 commits) ([flutter/engine#7693](https://github.com/flutter/engine/pull/7693))
2019-02-05 15:52:22 -08:00
Danny Tuppeny 7e445a1732
Add @isTest to Flutter's wrappers over group/test (#27532)
Fixes https://github.com/Dart-Code/Dart-Code/issues/1421.
2019-02-05 15:43:33 +00:00
Matt Carroll 92125ed38f
Enable dependency injection of Window instead of using static property (#27389) 2019-02-04 16:46:04 -08:00
Konstantin Scheglov 39289b83ac
Update additionalTime in TestWidgetsFlutterBinding.runAsync() to 1000. (#27256) 2019-01-30 07:31:00 -08:00
Alexandre Ardhuin ef276ffea5
format initializer list of constructors (#27111) 2019-01-29 21:47:16 +01:00
Konstantin Scheglov 4fe41abfcc
Add default values for optional parameters. (#27197) 2019-01-29 11:49:57 -08:00
Greg Spencer 1811d57445
Implement hover support for mouse pointers. (#24830)
This implements support for hovering mouse pointers, so that mice connected to Android devices, and ChromeOS devices running Android apps will work properly.

It teaches flutter_test about hover events, which required changing how they are created and used.

Also modifies AnnotatedRegion to allow a region that can be located someplace other than just the origin.

Along with tests for all of the above.

Fixes #5504
2019-01-29 11:34:26 -08:00
Dan Field bb5663d2d8
Add docs and sample for takeException (#27140)
* Add docs and sample for takeException

* fix sample
2019-01-27 09:43:09 -08:00
sjindel-google 4881777203
Fix behavior of handleDrawFrame() in benchmark mode. (#25049) 2019-01-22 11:46:14 +01:00
Michael Goderbauer e4c8f1b993
3D SemanticsTree (#25670) 2019-01-16 10:29:00 -08:00
Alexandre Ardhuin 868ff42821
fix doc-comment snippets (#25579) 2019-01-07 21:44:16 +01:00
jslavitz 3d8aec2b99
Adds force press gesture detector and recognizer (#24554)
* adds Force Press gesture detector and recognizer
2018-12-19 20:09:07 -08:00
Jonah Williams f30029bae1
Run flutter tests through mini test engine when run directly (flutter run -t test_file) (#24930) 2018-12-12 12:51:16 -08:00
Gary Qian dfd0229560
New locale resolution algorithm to use full preferred locale list, include scriptCode in Locale. (#23583) 2018-11-09 11:33:42 -08:00
Jonah Williams 9ecb4ce9a6
remove deprecated testing members (#24115) 2018-11-09 10:05:11 -08:00
Jonah Williams ab2d0323a7
cleanup accessibility test skips in gallery (#23977) 2018-11-06 13:29:23 -08:00
Jonah Williams a43e3a4a2f
Retry remove package:test from flutter (#24007) 2018-11-06 10:48:34 -08:00
Jonah Williams 23a7535a39
Revert "Remove package:test dependency from flutter_test (#23755)" (#24004)
This reverts commit 71e9bd6f25.
2018-11-06 09:12:48 -08:00
Jonah Williams 71e9bd6f25
Remove package:test dependency from flutter_test (#23755) 2018-11-06 08:39:27 -08:00
Alexandre Ardhuin 344ebe02ff
avoid returning null for Future (#23784) 2018-11-05 16:38:23 +01:00
Dinesh Ahuja 7fbb5b9f32 Create WidgetTester.ensureVisible(Finder) (#22620)
This is just a shorthand for
Scrollable.ensureVisible(tester.element(finder))

Fixes #8185
2018-10-18 12:17:47 -07:00
Alexandre Ardhuin 7ce28d1277
use Duration.zero (#23218) 2018-10-18 13:57:52 +02:00
Yegor 3fbd140e77
Use new mixin syntax for super-mixins (#22870)
This re-lands 3c56e6c on top of a new Dart SDK that contains new mixin syntax fixes.
2018-10-17 13:10:05 -07:00
Alexandre Ardhuin 8b0de38ef8
fix upcoming lint avoid_returning_null_for_void (#23190) 2018-10-17 11:01:37 +02:00
Alexandre Ardhuin 936dea28da
enable lint prefer_void_to_null (#23174)
* enable lint prefer_void_to_null

* replace last Null by void
2018-10-17 08:09:29 +02:00
Alexandre Ardhuin 0fb84e96c7
Prefer void to null (#22977)
* Future<void> main

* Future<void>.delayed

* prefer_void_to_Null

* address review comments
2018-10-16 22:03:06 +02:00
Jonah Williams 313059cdb6
Add labeled tappable target guideline and gallery tests (#22824) 2018-10-11 15:05:10 -07:00
Alexandre Ardhuin 0e76cb4c10
prefer_void_to_null in flutter_test (#22847)
* prefer_void_to_null in flutter_test

* fix CI
2018-10-11 18:00:46 +02:00
Jonah Williams cdf1cec902
add ability to match child semantics data (#22001) 2018-10-05 17:44:26 -07:00
Yegor 3184b7cb66
Revert "Use mixin syntax for Flutter's super-mixins (#22435)" (#22748)
This reverts commit 3c56e6c77d.

It breaks the AOT build.
2018-10-05 15:09:38 -07:00
Yegor 3c56e6c77d
Use mixin syntax for Flutter's super-mixins (#22435)
* first pass

* revert WidgetsBindingObserver

* disable prefer_mixin

* docs and more mixins

* newer engine; binding fixes

* upgrade dependencies

* fix test binding

* remove whitespace

* remove the obsolete `enableSuperMixins: true`

* upgrade dartdoc to 0.22.0

* temporarily use git version of dartdoc

* fix pub global activate syntax

* use dartdoc 0.23.0
2018-10-05 14:54:41 -07:00
Alexandre Ardhuin f62afdcf57
add missing type parameter on methods (#22096) 2018-10-01 21:29:08 +02:00
Jonah Williams 8e70421913
Revert "Add RichText support to find.text" (#22046) 2018-09-19 13:51:35 -07:00
Jonah Williams ff1f8dd143
Add RichText support to find.text (#21964) 2018-09-19 10:01:34 -07:00
Jacob Richman ccd070a5b4
Add back screenshot extension that was temporarily disabled. (#21828)
Add back screenshot extension that was temporarily disabled.

Add matchesReferenceImage matcher to test that the screenshot extension
generates equivalent images to InspectorService.instance.screenshot.
2018-09-18 09:32:39 -04:00
Alexandre Ardhuin e2d0b062d9
remove unnecessary ignore prefer_const_constructors (#21934) 2018-09-18 05:54:03 +02:00
Alexandre Ardhuin a07d3719a1
enable lint prefer_generic_function_type_aliases (#21680) 2018-09-14 21:06:19 +02:00
Alexandre Ardhuin d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
Jonah Williams fa0a857d02
Add material tap target size and text contrast test to gallery (#21581) 2018-09-11 08:27:32 -07:00
Jacob Richman a2acc6a3e5
Revert "Revert "Enable taking screenshots of arbitrary RenderObjects from a running a… (#20637)" (#21395)" (#21448)
This reverts commit 5b5a5b8228.
2018-09-07 10:02:05 -07:00
Jonah Williams 908de76c17
Remove value listener from semantics bindings (#21296) 2018-09-07 09:24:08 -07:00
Jonah Williams 5b5a5b8228
Revert "Enable taking screenshots of arbitrary RenderObjects from a running a… (#20637)" (#21395)
This reverts commit 3306fc1042.
2018-09-04 12:40:40 -07:00
Jacob Richman 3306fc1042
Enable taking screenshots of arbitrary RenderObjects from a running a… (#20637)
Enable taking screenshots of arbitrary RenderObjects from a running application from within the inspector.

Key functionality is in the added _ScreenshotPaintingContext class.
2018-09-04 10:50:04 -07:00
Jonah Williams 0e9cfe7df1
Address follow up to https://github.com/flutter/flutter/pull/20354 (#21181) 2018-08-29 16:48:23 -07:00
Ian Hickson 53b635817c
Re-enable missing_return (#20844) 2018-08-28 11:22:57 -07:00
xster c418b2f328
Auto populate nav bar title and previous from page route (#19637) 2018-08-23 18:24:30 -07:00
Jonah Williams e235ccd76f
Support disabled animations (#20354) 2018-08-23 11:50:04 -07:00
Ian Hickson 8c79f40d71
Fixes resulting from audit of issues links (#20772)
* Fixes resulting from audit of issues links

I looked at every link to GitHub in our repo. For cases where we had a TODO that was waiting for a bug to be fixed, and the bug has now been fixed, I applied the pending change. For cases where the link was out of date, I updated the link.

* Update run_test.dart

skip this test again since it failed on linux and macos bots
2018-08-18 16:44:39 -07:00
Jonah Williams 09542fe311
fix dart analysis error (#20698) 2018-08-17 12:59:41 -07:00
xster 0f4ea504bc
Correctly chain finders to ancestor/descendant finders (#20601) 2018-08-15 17:24:03 -07:00
matthew-carroll 21bc9f1b02
iOS Dialog blur, brightness, and layout (#18381)
Rewrote CupertinoAlertDialog to look nearly identical to an alert dialog in iOS. This includes considerations for blur, translucent white background color, button sizing, gap dividers between buttons, and text scaling layout behavior. (#18381)
2018-08-15 12:59:40 -07:00
Jonah Williams d3e482eca3
Add tests/matchers for automatic accessibility testing (#20462)
\
2018-08-15 12:13:10 -07:00
Ian Hickson 686d8f8a22 Shim package:test to avoid matcher issues (#20602)
* Upgrade everything except matcher.
* Roll matcher (and test)
* Adjust tests that depend on flutter:test directly to depend on a shim
* Require use of package:test shim and remove other references to package:test
2018-08-14 20:33:58 -07:00
Jonah Williams 33c4cd0f39
Add semantics to cupertino slider (#20476) 2018-08-13 23:43:49 -07:00
Ian Hickson ef71d9d956
Increase timeouts because some CI systems are REALLY SLOW. (#20396) 2018-08-12 00:16:43 -07:00
liyuqian 13bfa7353e
Set default clipBehavior to Clip.none and update tests (#20205)
This fixes https://github.com/flutter/flutter/issues/18057
2018-08-09 16:38:08 -07:00
liyuqian 57d8930d5b
Roll engine to 7f083e54fe75 (#20310)
* Roll engine to 7f083e54fe75

7f083e54f Don't implicitly fall through in switch statement (flutter/engine#5964)
c7ce6dd69 Apply translation to accessibility tree when in landscape (flutter/engine#5950)
aef94b73d Reland "Updated background execution implementation for Android" (flutter/engine#5954)
3421bca7a Roll src/third_party/skia 36216fb0acbc..177742435e52 (15 commits) (flutter/engine#5963)
9d1e67399 Temporarily add travis/analyze.sh back for Chrome bot (flutter/engine#5961)
4386afdaa Roll src/third_party/skia e6d0618f677c..36216fb0acbc (11 commits) (flutter/engine#5960)
7cef3da03 Roll src/third_party/skia 01d9a344b575..e6d0618f677c (1 commits) (flutter/engine#5958)
ad82cb154 Roll src/third_party/skia fdf05f4ff4e9..01d9a344b575 (1 commits) (flutter/engine#5957)
6ea410cfe Revert "Roll Dart to 17b54c76ce9b945c6f013ad08c19268409c0694a (flutter/engine#5955)" (#5956)
f20c58f65 Roll Dart to 17b54c76ce9b945c6f013ad08c19268409c0694a (flutter/engine#5955)
ed1938e99 Roll src/third_party/skia 641ac7daa81c..fdf05f4ff4e9 (3 commits) (flutter/engine#5953)
5f04e00d7 Remove travis directory (flutter/engine#5935)
5442c0a7d Revert "Updated background execution implementation for Android" (flutter/engine#5949)
a5215ce50 Add hasImplicitScrolling SemanticFlag and support in Android bridge (flutter/engine#5941)
4681351af Roll src/third_party/skia 6e487e67a3f3..641ac7daa81c (16 commits) (flutter/engine#5948)
bc885f319 Updated background execution implementation for Android
5770cbd2a Roll src/third_party/skia 12fb9cfeee07..6e487e67a3f3 (8 commits) (flutter/engine#5946)
f4464a8d9 Roll src/third_party/skia 2e77f54f46e8..12fb9cfeee07 (1 commits) (flutter/engine#5945)
c6baaaf75 Replace acquire+release thread annotation with excludes (flutter/engine#5944)
63ede2e35 Roll src/third_party/skia 59aabbcf3b0d..2e77f54f46e8 (1 commits) (flutter/engine#5943)
97aea093e Roll src/third_party/skia 71fe8baccc01..59aabbcf3b0d (1 commits) (flutter/engine#5942)
aaf4a9a24 Roll src/third_party/skia 4c3b63e289c5..71fe8baccc01 (3 commits) (flutter/engine#5940)

* Sync framework changes
2018-08-07 16:10:29 -07:00
Greg Spencer e60087a1a7
Remove Travis configuration from flutter/flutter (#20288)
This removes the final traces of Travis and Appveyor from the Flutter tree.

I've updated the documentation and fixed a couple of places where scripts look for Travis, and eliminated the dart tools runningOnTravis function (which was unused anyhow).

There are places in the flutter script that used to look for the environment variable TRAVIS. We actually do want to continue to detect that we're running on Travis there, since in the plugins repo we still use Travis (for the moment). In any case, it's OK, because the CI environment variable is set on all of the CI bots (Cirrus, Travis, and Appveyor).

FastLane doesn't have a setup_cirrus equivalent to setup_travis, but it actually doesn't matter there either, since it doesn't do Travis-specific things, and it also looks for the CI environment variable.
2018-08-07 13:41:33 -07:00
Jonah Williams 4a7b4a4dde
increase size of user account drawer headers to 48 by 48 (#20266) 2018-08-06 13:56:15 -07:00
Ian Hickson 872e88cec7
Reduce noise on the memory benchmarks (#19630) (#20163)
- Check memory usage in release builds, not profile.
- Use multiple runs and average the results.
2018-08-06 12:46:51 -07:00
Ian Hickson a2ca14d71e
Revert "Reduce noise on the memory benchmarks" (#20158)
* Revert "Add pub cache, artifacts, pkgs to Cirrus cache (#20080)"

This reverts commit 07e93b385c.

* Revert "Reduce noise on the memory benchmarks (#19630)"

This reverts commit 8eb5cb7dc0.
2018-08-02 13:56:44 -07:00
Ian Hickson 8eb5cb7dc0
Reduce noise on the memory benchmarks (#19630)
- Check memory usage in release builds, not profile.
- Use multiple runs and average the results.
2018-08-02 12:22:15 -07:00
Jonah Williams 55c7e6e3f8
Support customizing standard accessibility action hints on Android. (#19665) 2018-08-02 10:20:47 -07:00
Alexandre Ardhuin eda03e2586
re-re-enable lint unnecessary_const (#20103) 2018-08-02 12:02:32 +02:00
Jonah Williams 7ba2a84af1
roll engine to 91ff524e63298a2d0e15c2a0d47e0a005524c51c (#20055) 2018-07-31 18:15:37 -07:00
Todd Volkert 00aac68e2d
Revert flutter/flutter#19592 (#19861)
It was causing problems rolling Flutter into Fuchsia
2018-07-27 08:44:39 -07:00
Alexandre Ardhuin 27018359d2
re-enable lint unnecessary_const (#19592)
* re-enable lint unnecessary_const

* remove trailling whitespaces

* remove unnecessary const (after merge)
2018-07-23 08:31:48 +02:00
Jonah Williams e154298e0b
Roll engine to 96f5f5b96c7220ffc8c4ce22ed895616a15ad3a0 (#19615) 2018-07-21 00:45:16 -07:00
Ian Hickson 35346b4966
Increase verbosity on bots during setup and other minor cleanup (#19526)
The verbosity change is to help track down timeouts that currently look like:

```
C:\Windows\Temp\flutter sdk>call bin\flutter.bat config --no-analytics
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine c5a63d28bf3735569c8187753bc490d8351a8363...
Unzipping Dart SDK...
Updating flutter tool...
```
2018-07-20 11:01:45 -07:00
Greg Spencer 1cc036519c
Removes trailing whitespace from source files. (#19329) 2018-07-19 23:03:58 -07:00
Ian Hickson f630f90d6d
Revert "enable lint unnecessary_const (#19342)" (#19423)
This reverts commit cc1cf13eec.
2018-07-16 13:30:27 -07:00
Alexandre Ardhuin cc1cf13eec
enable lint unnecessary_const (#19342) 2018-07-16 21:43:48 +02:00
Jonah Williams 8359d99e48
have text finder convert Text.rich to plain text for comparison (#19270) 2018-07-13 13:00:58 -07:00
Jonah Williams 579d2fba99
Roll engine to c5a63d (#19288) 2018-07-13 10:35:23 -07:00
Alexander Aprelev 7ebf2728dc
Revert "Revert "Roll engine to fed2ea458ed49088d33eddabc546ba56d600c717 (includes dart roll) again (#19277)" (#19295)" (#19322)
This reverts commit cc122f1672.
2018-07-12 14:59:22 -07:00
Alexander Aprelev cc122f1672
Revert "Roll engine to fed2ea458ed49088d33eddabc546ba56d600c717 (includes dart roll) again (#19277)" (#19295)
This reverts commit 700cb767c9 as it
breaks Windows tests.
2018-07-11 19:52:28 -07:00
Alexander Aprelev 700cb767c9
Roll engine to fed2ea458ed49088d33eddabc546ba56d600c717 (includes dart roll) again (#19277)
* Revert "Revert "Roll engine to fed2ea458ed49088d33eddabc546ba56d600c717 (includes dart roll) (#19044)" (#19276)"

This reverts commit cf932490b7 as it also
includes fix for type error that broke tests.

* Add type cast for dart2 type checks.

* Move up to latest goldens

* Make inDirectory() type-parameterized.

* Add typecasting to transitions_perf_test.dart and microbenchmarks.

* Add boolean flag initialization in save_catalog_screenshots.dart

* Add type conversion to gallery transition test
2018-07-11 19:26:33 -07:00
Alexander Aprelev cf932490b7
Revert "Roll engine to fed2ea458ed49088d33eddabc546ba56d600c717 (includes dart roll) (#19044)" (#19276)
This reverts commit f4a038da63 as it breaks microbenchmark tests.
2018-07-11 12:48:55 -07:00
Alexander Aprelev f4a038da63
Roll engine to fed2ea458ed49088d33eddabc546ba56d600c717 (includes dart roll) (#19044)
* Roll engine to rolled dart
Add connectionTimeout property to class that extends HttpOverrides.
Upgrade packages.
Add more type fixes.
Update goldens hash.
Add more type fixes.
Upgrade packages.
Fix tests.
Remove strong-mode from analysis options yaml file.
Increase dev/devicelab timeout from 2 to 10 seconds.
Added getVM to waitForViews. Fix type errors in compileExpression.

* Pick up engine revision with fix for microbenchmarks regression.
Increase default timeout from 20/30 to 60s.
2018-07-11 12:13:28 -07:00
Michael Goderbauer 36e16e7544
Do not assert when semantics are on and app draws on 0x0 surface (#19059)
Instead, if the surface is 0x0 semantics will just generate one root semantics node with size of 0x0. The node will have no children because all children are invisible and (except for the root node with this change) invisible children are dropped.
2018-07-11 09:46:24 -07:00
Jonah Williams 41646c9579
Add new matcher and utility methods for testing semanics (#19046) 2018-07-09 15:21:46 -07:00
matthew-carroll 2a65505e8a
Support all keyboard actions. (#11344) (#18855)
* Support all keyboard actions. (#11344)
2018-07-02 06:58:35 +00:00
Ian Hickson b44784b429
Clear the keyboard state in the test framework when keyboard is closed. (#18615) 2018-06-26 15:11:37 -07:00
Ian Hickson 6599271bf5
Revert matcher package (#18614)
The new matcher package deprecates isInstanceOf which seems eggregious.
2018-06-19 17:22:56 -07:00
Greg Spencer 08d1ec36de Roll engine to 0c119932c0d6cb30dafd75ec717d1eda76fd7651 (#18575) 2018-06-19 09:58:20 +02:00
Greg Spencer efa2a474ea
Adding HSLColor and color 'within' matchers for HSVColor and HSLColor (#18294)
This adds an HSLColor class which uses a perceptual color space based upon human perception of colored light (as opposed to HSV, which is based on pigment colors).

You can see the difference in the color spaces here: https://en.wikipedia.org/wiki/HSL_and_HSV

I also added a "within" matcher for both HSLColor and HSVColor that will check if the (floating point) color components are within a certain error.

And tests.
2018-06-18 17:11:42 -07:00
Florian Loitsch bd4cf62821
Roll sync async engine (#18454)
* Roll the engine.

This engine includes a VM that defaults to sync-async.

flutter/engine@c8eeee4 Roll the Dart VM.
2018-06-18 15:17:02 +02:00
Chris Bracken 2ae48845a8
Revert elimination of Dart 1 (#18460)
fuchsia_tester.dart still assumes Dart 1. Previously, it ran tests directly
from source, flutter_platform.dart automatically runs a kernel compile when
operating in Dart 2 mode, but this assumes a functional Dart SDK is available
in the artifacts directly, and fuchsia_tester.dart mocks out the artifacts
directory with an empty temp dir.

Remaining work is:
1. Get the frontend server building as a dependency on Fuchsia.
2. Patch fuchsia_tester.dart to use a valid Dart SDK and frontend server.

This also reverts migration to Dart 2 typedef syntax.

This reverts commit 6c56bb2. (#18362)
This reverts commit 3daebd0. (#18316)
2018-06-13 12:46:39 -07:00
Ian Hickson dac2ebf0c0
More flexible timeout logic in flutter_test (#18256)
This should reduce the number of flakes without actually increasing
the timeout, so we'll still find out quickly if a test is hanging.

The numbers here might need tweaking. Maybe the default two seconds is
too short for CI bots.
2018-06-11 16:28:01 -07:00
Greg Spencer 6c56bb2420
Update typedef syntax to use Function notation and turn on lint for old notation. (#18362)
Now that Dart 1 is turned off, reapplying my change to turn on the prefer_generic_function_type_aliases analysis option, and fix all the typedefs to Dart 2 preferred syntax.

Also eliminated the unused analysis_options_repo.yaml file and turned on public_member_api_docs in analysys_options.yaml.

No logic changes, just changing the typedef syntax for all typedefs, and updating analysis options.
2018-06-11 15:51:45 -07:00
Michael Goderbauer 12eeb94c89
Compare SemanticsHandler# at end of test to value at beginning of test (#18183) 2018-06-05 12:24:56 -07:00
Ian Hickson 25c4bc32b8
Try to make the test framework a little more resilient to timeouts (#18180) 2018-06-05 09:51:19 -07:00
Alexandre Ardhuin 09276bea25
enable lint prefer_equal_for_default_values (#18156) 2018-06-05 08:50:40 +02:00
Ian Hickson b83749cab0
Golden file tests for clip (#18056)
Also, fixes "flutter run" for golden tests, and some docs.
2018-06-01 00:23:26 -07:00
Greg Spencer b921fdc58e
Revert "Update typedef syntax to use Function notation and turn on lint for old notation. (#18035)" (#18041)
This reverts commit 3258602073.
2018-05-30 13:51:14 -07:00
Greg Spencer 3258602073
Update typedef syntax to use Function notation and turn on lint for old notation. (#18035)
Fixes #18028

Just changes typedef declarations, no logic changes.
2018-05-30 12:13:58 -07:00
Mikkel Nygaard Ravn c7ea3ca377
Revert sync async (#18002) 2018-05-29 21:07:33 +02:00
Danny Tuppeny 514701fe46
Remove test group in favour of addTearDown (#17962) 2018-05-28 21:45:56 +01:00
Florian Loitsch 3ced55a7dc
Sync async2 (#17964)
Enable --sync-async in Flutter.
Fixes #16801
2018-05-28 16:21:05 +02:00
Mikkel Nygaard Ravn d875ebe2e4
Revert "Enable --sync-async in Flutter. (#17866)" (#17878)
This reverts commit 39d7f22a96.
2018-05-24 20:09:27 +02:00
Florian Loitsch 39d7f22a96 Enable --sync-async in Flutter. (#17866) 2018-05-24 19:26:44 +02:00
Konstantin Scheglov eba194f776
Mark testWidgets() and testUsingContext() with @isTest. (#17772) 2018-05-21 11:11:23 -07:00
Todd Volkert 1808ac338c
Add support for custom test error reporters (#17727)
This allows test environments other than `flutter test` to have a hook
into the test exception reporting. Some test environments, for example,
don't just dump error details to the console, but rather require them
to be reported to a separate server.
2018-05-18 13:58:08 -07:00
Todd Volkert 5a24840cf0
Make some matchers in flutter_test final (#17725)
There's no reason for them to read/write.
2018-05-18 12:00:52 -07:00
Greg Spencer 3c5a7a3005
Make non-global constants have consistent naming (with just _ instead of _k) (#17584)
Our style guide says the k's are not necessary, and it seems like a good idea to make all the code be consistent on this.

Only naming changes to private vars: no logic changes.
2018-05-17 23:04:41 -07:00
Ian Hickson ca94bfdfc6 Factor our common Paint-building code used with BoxShadow (#17363) 2018-05-09 22:42:38 -07:00
Todd Volkert 2ba0deb77a
Make runAsync() run in child zone, not root zone (#17359)
Some APIs (such as the ones in package:test) assume you're running
in a child zone of the test zone by attempting to extract information
from the zone values. When we run runAsync() in the root zone, those
zone values are lost, and such API methods don't work.

The solution is to run in a child zone, but with a specification that
says to use the Root zone for task scheduling (both timers and
microtakss).
2018-05-07 18:33:44 -07:00
Todd Volkert 52e4605677
Golden file fixes (#17299)
1. Make goldenFileComparator getter return `null` if it's set to the
   uninitialized comparator, which matches the behavior of the setter
   (it sets it to the uninitialized comparator if the caller specifies
   `null`).
2. Make the uninitialized comparator return trivial success (and print
   a message) when asked to compare as opposed to throwing. This ensures
   that the comparator will play nicely with live widget bindings
3. Augment documentation
4. Add assert that test doesn't modify the value of `autoUpdateGoldenFiles`
2018-05-07 11:33:41 -07:00
Michael Goderbauer 7984f6e043
Implicit a11y scrolling for iOS (and caching in Viewports) (#17021) 2018-05-04 10:48:06 -07:00
Todd Volkert be09a200ee
Expose generateTestBootstrap() as public API in test harness (#17290)
This will allow external tools that wrap our test harness to share the
code that generates the test bootstrap.

This change exposed an issue whereby the LocalGoldenFileComparator
was being too strict in its URI handling, so this changes relaxes
that constraint as well (and adds associated tests).
2018-05-04 10:31:53 -07:00
Todd Volkert c8908ff0e2
Follow-on work to goldens (#17267)
* Exclude flutter_goldens package from dartdoc because it's for internal
  use only
* Document why flutter_tools doesn' tneed to be excluded from the list of
  packages to document
* Performance optimization in the flutter comparator, and associated
  test updates.
2018-05-03 17:47:50 -07:00
Todd Volkert 65079ad5f2
Add Flutter-repo-specific golden comparator (#17205)
In order to avoid checking binaries into flutter/flutter,
this comparator can be used to retrieve golden files from
a sibling flutter/goldens repository.

https://github.com/flutter/flutter/issues/16859
2018-05-03 07:39:41 -07:00
Todd Volkert 28c1973340
Add support for flutter_test_config.dart (#17141)
This enables support for a `flutter_test_config.dart` configuration file,
which will be discovered and handed the responsibility of running the
test file (thus allowing it to run pre-test setup on a project level).

https://github.com/flutter/flutter/issues/16859
2018-05-01 12:36:22 -07:00
Todd Volkert b2c67e88d4
Make Layer.toImage() accept bounds rather than size (#17129)
It allows callers to account for things like shadows that paint
outside the bounds of the widget.

https://github.com/flutter/flutter/issues/16859
2018-04-30 15:26:17 -07:00
Todd Volkert e19db89a0e
Add basic support for golden image file testing (#17094)
* Add a `matchesGoldenFile()` async matcher that will match
  a finder's widget's rasterized image against a golden file.
* Add support for pluggable image comparison backends
* Add a default backend that does simplistic PNG byte
  comparison on locally stored golden files.
* Add support for `flutter test --update-goldens`, which will
  treat the rasterized image bytes produced during the test
  as the new golden bytes and update the golden file accordingly

Still TODO:

* Add support for the `flutter_test_config.dart` test config hook
* Utilize `flutter_test_config.dart` in `packages/flutter/test`
  to install a backend that retrieves golden files from a dedicated
  `flutter/goldens` repo

https://github.com/flutter/flutter/issues/16859
2018-04-30 10:35:56 -07:00
Todd Volkert dedd180f9f
Fix expectLater to not wrap the delegate in a guard (#17085)
Follow-up to https://github.com/flutter/flutter/pull/17063

https://github.com/flutter/flutter/issues/16859
2018-04-30 10:05:04 -07:00
Todd Volkert 8860627b63
Add WidgetTester.runAsync() (#17029)
This will allow callers to run real async code within a widget test.

https://github.com/flutter/flutter/issues/16859
2018-04-28 15:14:46 -07:00
Todd Volkert 8b99d1d83c
Add expectLater to flutter_test (#17063)
* Wrap `expectLater()` in flutter_tester so that callers can
  wait for the matcher to complete in their tests

https://github.com/flutter/flutter/issues/16859
2018-04-28 13:54:08 -07:00
Jonah Williams 88cc977384
Remove package:http from Flutter (#15416)
* use HttpOverrides and dart:io HttpClient in flutter

* add missing package:http dependency

* update flutter packages and remove comment about createHttpClient from flutter_test

* move byte loading logic to common class, move string parsing logic to base class

* addAll doesn't work for a Uint8List

* use bytes.setRange

* undo addition to hello_world

* add newline to end of binding.dart

* and a newline for hello world

* refactor to function and add tests

* address comments on unknown length case

* alignment

* sort alaphabetically

* rename convertResponse to consolidateClientHttpClientResponseBytes.  Add header

* fix alignment in test
2018-03-22 08:21:01 -07:00
xster d8f360717f
Add a way to generically go back on both Material and Cupertino scaffold pages (#15602)
* Add a way to generically go back on both Material and Cupertino scaffold pages

* review

* lint

* review

* Fix text assert text
2018-03-19 16:57:05 -07:00
Yegor 9c49255f3e
a11y: remove SemanticsSortOrder; sort locally only; semanticsOwner post-test check (#15537)
* a11y: remove SemanticsSortOrder; sort locally only; semanticsOwner post-test check

* update accessibility test framework

- default nextNodeId/previousNodeId to -1
- stop treating null as opt-out from value testing
- add `id`, `TestSemantics.root`, and `tags` to the suggested code in the TestSemantics failure message
- fix a small bug with raw string escaping
- update all tests accordingly

* fix sortKey doc

* prefer const over final
2018-03-18 22:18:52 -07:00
Alexander Aprelev 2f8474f9aa
Roll engine to b6df7a637498ca9beda1fa9cd7210e3202ea599f. (#15444)
* Roll engine to b6df7a637498ca9beda1fa9cd7210e3202ea599f.

Changes since last roll:
```
b6df7a637 Roll dart to 290c576264faa096a0b3206c71b2435309d9f904. (#4771)
a6764dbd5 Add sources for Fuchsia target. (#4763)
2d5900615 [fuchsia] Remove unused header file. (#4769)
9717063b7 Revert "Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (#4767)" (#4768)
9a9814312 Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (#4767)
e74e8b35c [async] Update includes of async headers to new path (#4760)
e2c4b2760 Use Dart 2 camel case constants in the engine Dart libraries (#4766)
9c1e48434 Updates for Fuchsia roll. (#4765)
14c940e27 Switch from fxl::Mutex to std::mutex (#4764)
debf82c0b Roll Garnet (#4759)
5bffdefbb Use weak pointers to the accesibility bridge from objects vended to the UIKit accessibility framework. (#4761)
```
2018-03-12 15:44:25 -07:00
Yegor 973742fe96
[flutter_test] more docs, tests for within; simpler _sizeDistance (#15084)
Document missing value types supported by `within`. Add missing tests. Simplify _sizeDistance implementation.
2018-03-02 15:44:58 -08:00
Jason Simmons 44592238bb
Roll engine to 33b88173f3820690169348859bbdc29133179e0b (#14832)
libtxt is now the default text renderer
2018-02-26 11:39:48 -08:00
amirh 0da6bad656
add a matcher for area covered by paths (#14469) 2018-02-06 09:13:51 -08:00