Commit graph

161 commits

Author SHA1 Message Date
Ian Hickson e2b169ebd3 Apply void_checks lint. (#48267) 2020-01-13 10:03:01 -08:00
Alexandre Ardhuin 82262d8896 format operator== according to flutter style guide (#48449) 2020-01-09 08:23:02 -08:00
Alexandre Ardhuin 4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Greg Spencer 19b9206add
Add variant testing to testWidgets (#45646)
This adds the ability to define variants of tests with different environmental values for a particular testWidgets test.

This allows you to run the same test multiple times with a different test environment. One test variant has been implemented that allows running a test with different settings of the TargetPlatform.
2019-12-20 15:00:16 -08:00
Kate Lovett c281369356 Fix subdirectory output (#47256) 2019-12-18 16:33:01 -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
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
LongCatIsLooong 4ac2daf337
CupertinoTheme & CupertinoTextTheme dark mode updates (#41859) 2019-10-28 15:50:08 -07:00
Albertus Angga Raharja b31ca1aaca
Add more structure to errors (continuation of #34684) (#42640)
* Add structured errors in Animations, TabView, ChangeNotifier

* Add structured error on MaterialPageRoute, BoxBorder, DecorationImagePainter, TextSpan

* Add structured errors in Debug

* Fix test errors

* Add structured errors in Scaffold and Stepper

* Add structured errors in part of Rendering Layer

* Fix failing test due to FloatingPoint precision

* Fix failing tests due to precision error and not using final

* Fix failing test due to floating precision error with RegEx instead

* Add structured error in CustomLayout and increase test coverage

* Add structured error & its test in ListBody

* Add structured error in ProxyBox and increase test coverage

* Add structured error message in Viewport

* Fix styles and add more assertions on ErrorHint and DiagnosticProperty

* Add structured error in scheduler/binding and scheduler/ticker

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured error in AssetBundle and TextInput

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured errors in several widgets #1

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Remove unused import

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add assertions on hint messages

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Fix catch spacing

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured error in several widgets part 2 and increase code coverage

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured error in flutter_test/widget_tester

* Fix floating precision accuracy by using RegExp

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Remove todo to add tests in Scaffold showBottomSheet

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Fix reviews by indenting lines and fixing the assertion orders

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Fix failing tests due to renaming class

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Try skipping the NetworkBundleTest

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Remove leading space in material/debug error hint

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>
2019-10-28 11:00:49 -07:00
Greg Spencer 89d6c8d90b
Enables setting of semantics focused and focusable attributes within Focus widgets. (#41814)
This adds a Semantics node to the Focus and FocusScope widgets, setting the focused and focusable attributes so that the accessibility subsystem can be told when a control has the input focus.

Includes an engine roll to flutter/engine@77252d2, and the following 8 engine changes:

flutter/engine@77252d2 Greg Spencer Add missing focusable testing info (flutter/engine#13013)
flutter/engine@0e42a29 skia-flutter-.. Roll src/third_party/skia 54548626a977..e27a503a0a21 (1 commits) (flutter/engine#13024)
flutter/engine@6b56ed7 gaaclarke Refactor: FlutterDartProject (flutter/engine#13006)
flutter/engine@393480c skia-flutter-.. Roll src/third_party/skia 77dde599c98a..54548626a977 (1 commits) (flutter/engine#13023)
flutter/engine@080b89d skia-flutter-.. Roll src/third_party/skia 2b1a25a4d324..77dde599c98a (1 commits) (flutter/engine#13021)
flutter/engine@90b0f30 Ben Konyi Roll src/third_party/dart f4a72bfc64..bb04f145b2 (18 commits) (flutter/engine#13020)
flutter/engine@049fb89 skia-flutter-.. Roll fuchsia/sdk/core/linux-amd64 from q_uYX... to cknsi... (flutter/engine#13019)
flutter/engine@6925b2a skia-flutter-.. Roll fuchsia/sdk/core/mac-amd64 from wuAtw... to u0JpE... (flutter/engine#13018)

Related Issues
Addresses #40101

Landing on red in order to fix the build: it's red because of the needed engine roll.
2019-10-09 14:45:42 -07:00
Kate Lovett 1ec44a0c36
Incorporating Link Semantics (#41327) 2019-10-08 18:16:11 -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
Michael Goderbauer 4373a31971
Reapply "Revert "Propagate textfield character limits to semantics (#40468)" (#40767) 2019-09-18 14:55:37 -07:00
Michael Goderbauer b4324aed59
Revert "Propagate textfield character limits to semantics (#40468)" (#40714)
This reverts commit 6ad88bd5c0.
2019-09-17 16:37:11 -07:00
Michael Goderbauer 6ad88bd5c0
Propagate textfield character limits to semantics (#40468) 2019-09-17 14:39:50 -07:00
Kate Lovett e62c68c243
Fix for broken LocalFileComparator output (#40399)
* Fixing LocalFileComparator output

* Fixing path separators for windows failures

* Windows path issues

* Testing

* ++

* ++

* Fixing base directory - windows

* Clean up
2019-09-16 13:14:46 -07:00
Jonah Williams 7bc4074ff3
use dpr and window size from binding (#39577) 2019-09-01 23:57:32 -07:00
Phil Quitslund 37846b032f
migrate from slow async io calls (#39515)
* migrate from slow async io calls
2019-08-29 16:47:10 -07:00
Kate Lovett 6ff212b328
Comparing pixels instead of bytes with GoldenFileComparator (#38473) 2019-08-19 09:06:22 -07:00
Kate Lovett cac8fa5da0
Re-land 'Adding physicalDepth to MediaQueryData & TestWindow' (#38546) 2019-08-16 13:34:23 -07:00
Kate Lovett f3dbefd3ce
Revert "Adding physicalDepth to MediaQueryData & TestWindow (#37718)" (#37938)
This reverts commit 3a2d30813a.
2019-08-09 12:58:59 -07:00
Kate Lovett 3a2d30813a
Adding physicalDepth to MediaQueryData & TestWindow (#37718) 2019-08-07 13:52:16 -07:00
Dan Field 84fe2adedb
Nosuchmethod window (#37417) 2019-08-01 20:04:49 -07:00
Kate Lovett 616794fca7
Re-land "Part 1: Skia Gold Testing" (#36103) 2019-07-28 12:26:06 -07:00
Mouad Debbar 9c9b71a0fb
Add multi-line flag to semantics (#36297) 2019-07-18 10:36:22 -07:00
Kate Lovett 8809f698cb
Revert "Part 1: Skia Gold Testing (#33688)" (#36094)
This reverts commit eb0b179028.
Skia Gold post-submit test were failing due to the service account not being found on Cirrus.
2019-07-12 13:35:36 -07:00
Kate Lovett eb0b179028
Part 1: Skia Gold Testing (#33688)
* Fresh PR for Gold integration.

* Nits

* WIP

* Artifacts from merge

* Changed some platform dependencies for web, added library prefix notation for Skia Gold test names.

* Updating for CI implementation

* Write out service account

* Writing to skip out

* WIP

* ++

* Fixing depot tools deps

* Windows depot_tools

* Fixing setup scripts

* ++

* depot tools

* ++

* WIP

* Tracing depot_tools clone

* WIP

* ++

* analyzer

* WIP

* chrome typo

* copy artifact

* Working on tests

* Code cleanup

* ++

* Code cleanup, updated tests

* ++ review feedback

* Review

* Analyzer

* Review feedback

* Nits from review

* PRogress

* ++

* Fixing tests

* ++

* Testing repo route

* Just needing documention around new structures.

* cleanup

* Analyzer

* Documentation updates

* Documentation updates

* Cirrus updates

* cirrus nit

* Review feedback

* Review feedback

* Fixing skip comparator

* Fix base directory for Skia Gold case

* ++

* Feedback

* ++

* Fixed uri assertion

* Made GoldensClient abstract, altered SkiaGoldClient constructor

* Analyzer
2019-07-12 12:23:04 -07:00
Dan Field 3eb40925e5
Always test semantics (#35110)
Default `semanticsEnabled` to true for `testWidgets` and fix associated bugs
2019-06-28 12:40:23 -07:00
David Shuckerow df6e4d4872
Make it possible to override the FLUTTER_TEST env variable (#34301)
* Make it possible to override the FLUTTER_TEST env variable without unsetting it.

* Switch to using platform instead of Platform.

* Document the bindings, and introduce tests that initialize multiple WidgetsBindings with different environments.

* Add tests for the flutter platform test.

* Add license headers

* Fix lints

* Remove trailing whitespace

* Respond to Jonahs comments

* Respond to Ians comments

* Mock out the HttpServer in flutter_platform_test

* Mock out the HttpServer in flutter_platform_test

* Explain why we mock out the HttpServer in flutter_platform_test
2019-06-28 10:37:27 -07:00
chunhtai c8c20fbc1f
add read only semantics flag (#34683) 2019-06-19 14:41:44 -07:00
Kate Lovett 7d95e8e0c1
Splitting golden file versioning out as an argument of matchesGoldenFile (#33880)
* Splitting golden file versioning out as an argument of matchesGoldenFile

* Fixing description implementation.

* Removing unused imports

* Removing unused import

* Review feedback
2019-06-18 11:32:13 -07:00
Sam Rawlins c2a93bd545 Fix missing return statements on function literals (#33058) 2019-05-20 12:51:57 -07:00
Tong Mu 20299a2c17
Add buttons customization to WidgetController and related testing classes (#31095)
* Add buttons to WidgetController and TestPointer

* Add more buttons

* Let TestPointer handle default device

* Use getter only buttons
2019-05-15 15:42:03 -07:00
Kate Lovett 829bdeb426
Fixing accidental merge from WIP branch. (#32520)
Revert "Merge branch 'master' into master"

This reverts commit e3a03c04c4, reversing
changes made to 6474982649.
2019-05-10 15:53:41 -07:00
Kate Lovett e3a03c04c4
Merge branch 'master' into master 2019-05-10 15:16:40 -07:00
Ian Hickson f61a2c3907 Clean up flutter_test/test/controller_test.dart (#31333)
Instead of using a custom WidgetController, which is very brittle, we just use the usual infrastructure.

Also, use structured data instead of an array.

This adds offsetMoreOrLessEquals to handle small floating point errors in offsets.
2019-05-06 14:36:30 -07:00
Jonah Williams dd5d0d6c36
rename foreground and background to light and dark (#32070) 2019-05-06 08:02:08 -07:00
Kate Lovett 4676c66b9a
Merge branch 'gold' into master 2019-05-02 15:01:35 -07:00
Jacob Richman 63aa5b3647
Refactor core uses of FlutterError. (#30983)
Make FlutterError objects more structured so they can be displayed better in debugging tools such as Dart DevTools.
2019-05-01 11:20:12 -07:00
Dan Field fe9512fa72
Re-enable const (#31600)
* Re-enable const
2019-04-29 16:02:42 -07:00
Dan Field 06e1f8fc15
Roll engine to 3e47b4bb39bb4993f03a278ea7b1c11ee6459b06 (#31569)
* Manual roll with updated test
2019-04-24 17:20:02 -07:00
Dan Field 37bc48f26e
rectMoreOrLess equals, prep for 64bit rects (#30942)
* rectMoreOrLess equals, prep for 64bit rects
2019-04-22 09:40:19 -07:00
Kate Lovett 9e3e44ee3d Committing test progress. 2019-04-19 11:32:16 -07:00
Jonah Williams 715cb5132e
Fix bugs in contrast guideline and improve heuristic (#31000) 2019-04-15 09:01:09 -07:00
Alexandre Ardhuin bfa1d25bf9
some formatting of map, parameters and spaces (#29760) 2019-03-23 00:02:21 +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
Michael Goderbauer 816ae4b193
Include platformViewId in semantics tree (#28953) 2019-03-12 07:44:39 -07:00