Commit graph

650 commits

Author SHA1 Message Date
Josh Soref c5a5945e92 Spelling (#15229)
* spelling: accommodate

* spelling: allotted

* spelling: anonymous

* spelling: artificial

* spelling: associated

* spelling: asset

* spelling: button

* spelling: canvas

* spelling: compatibility

* spelling: coverage

* spelling: condition

* spelling: decoration

* spelling: deferring

* spelling: diameter

* spelling: direction

* spelling: displacement

* spelling: dropdown

* spelling: needing

* spelling: environment

* spelling: exited

* spelling: expansion

* spelling: explore

* spelling: families

* spelling: horizontal

* spelling: increment

* spelling: indices

* spelling: internationalization

* spelling: labrador

* spelling: localizations

* spelling: midflight

* spelling: milliseconds

* spelling: minimum

* spelling: multiple

* spelling: multiplication

* spelling: navigator

* spelling: overridden

* spelling: package

* spelling: performance

* spelling: platform

* spelling: porsche

* spelling: position

* spelling: preceded

* spelling: precede

* spelling: precedence

* spelling: print

* spelling: property

* spelling: readily

* spelling: reproducibility

* spelling: rounded

* spelling: scroll

* spelling: separate

* spelling: separator

* spelling: services

* spelling: specific

* spelling: specify

* spelling: synchronously

* spelling: through

* spelling: timeout

* spelling: triangle

* spelling: trivial

* spelling: unusual

* spelling: then

* spelling: vertically

* spelling: visible

* spelling: visited

* spelling: voice
2018-03-06 21:36:03 -08:00
Jason Simmons 7f03b9e41b
Upgrade to test package version 0.12.30+4 (#14853)
30+4 has made some changes to the remoting protocol that are incompatbile
with a test harness running 30+3 (e.g. adding a type='initial' field to the
first message)
2018-02-23 12:49:57 -08:00
Vyacheslav Egorov aa7e9637ac
Fix several Dart 2 issues in the flutter_driver. (#14749)
* All lists produced by JSON parsing are List<dynamic>. If more
speficic type is required then they need to be explicitly cast, e.g.
using castFrom helper;
* Function of type (ByText) -> Finder is not a subtype of
(SerializableFinder) -> Finder because ByText is in the contravariant
position;
* In Dart 2 typed(any) should be used instead of any in mockito based
tests.
2018-02-16 18:01:54 +01:00
Alexander Aprelev a448994543
Use the Dart SDK built from Flutter engine rather than from dartlang.org (#14610)
* Use engine-built dart sdk

* Download dart-sdk from engine

* Move up deps to fix dart sdk constraint problem

* Update update_dart_sdk.ps1 for Windows

* Fix tests so they pass analysis

* More types for tests

* Roll engine

* Update dart sdk stamp location in flutter.bat

* Add newline
2018-02-14 07:18:25 -08:00
Vyacheslav Egorov f5bbc5bb76
Upgrade packages (#14588)
We need to pull in Dart 2 compliant mockito

Fixes #14532
2018-02-09 11:16:58 +01:00
Greg Spencer df791279ab
Fix process running during package creation (#14508)
There were some problems I introduced with the last PR for this. It passed the test, but failed in practice.

This adds tests for those failure cases, adds a "--help" and fixes the test so that it doesn't try and actually download MinGit as part of the Windows test.

I added package:platform as a dependency, so I did a force upgrade on the packages.

Also, re-enabling 'create package' in the cache warming code, now that #14448 is fixed.
2018-02-07 12:21:14 -08:00
Alexandre Ardhuin 3c379aaf43
whitespace cleanup (#14458) 2018-02-05 22:20:21 +01:00
Alexandre Ardhuin c02b6a8bcf
some whitespace cleanup (#14443) 2018-02-02 23:27:29 +01:00
Vyacheslav Egorov c23509e9fd
Unpin test and upgrade packages (#14282)
* Unpin package:test and upgrade packages

* Update packages/flutter/test/foundation/stack_trace_test.dart

* Also add packages/flutter_tools/test/data/asset_test/font/.dartignore to ensure that update-packages --force-upgrade does not crash.
2018-01-26 10:40:03 -08:00
Alexandre Ardhuin 10f721c8a5
use const instead of final with const declarations (#14253) 2018-01-25 19:28:22 +01:00
Sam Rawlins 7ffcce84a2 Bump async, http, and vm_service_client packages (#14136) 2018-01-19 14:59:16 -08:00
Ian Hickson 9e42e4b88f
New release process (#14061)
Generate the "version" file from git tags.
Remove the old VERSION file and mentions of versions in pubspec.yaml files.
Replace the old update_versions.dart script with a new roll_dev.dart script.
Update "flutter channel".
Update "flutter upgrade", including making it transition from alpha to dev.
Update "flutter --version" and "flutter doctor".
2018-01-18 07:59:06 -08:00
Sam Rawlins ce939564fa Bump json_rpc_2 dependency (#14051) 2018-01-12 16:23:51 -08:00
Sam Rawlins e8b666249a Bump collection dependency to 1.14.5 (#14048) 2018-01-12 14:33:26 -08:00
Leaf Petersen ab874da7be
Roll Dart SDK to 2.0.0-dev.16.0, along with associated package updates (#13857)
Rolling the Dart SDK to 2.0, with associated package updates.  

https://groups.google.com/forum/#!topic/flutter-dev/E22RdKAYjs8
2018-01-10 14:31:28 -08:00
Michael Goderbauer 9e51a60299
Reland #13918 (#14023)
* Revert "Reverting package changes until I can figure out how to fix Windows. (#14007)"

This reverts commit 6fda8ee821.

* Make prepare_package run on Windows
2018-01-10 13:37:36 -08:00
Greg Spencer 6fda8ee821
Reverting package changes until I can figure out how to fix Windows. (#14007)
* Revert "Fixed output validation. (#14005)"

This reverts commit d84398db72.

* Revert "Update package prep script to do async process execution and emit output as it happens. (#13918)"

This reverts commit b7169c1d95.
2018-01-09 19:47:19 -08:00
Greg Spencer b7169c1d95
Update package prep script to do async process execution and emit output as it happens. (#13918)
- Switches to async process execution, which now shows output as it happens instead of in chunks when the process completes
-  Now uses ProcessManager so that it may be mocked for the test.
- Adds in the download and install of mingit on Windows.
- Updated package dependencies because of added dependency on process package.
2018-01-09 17:42:42 -08:00
Ian Hickson 9114e2afd1
The dependency script wasn't catching quite all our transitive dependencies (#13954) 2018-01-08 21:39:33 -08:00
Alexander Aprelev 50a28785bd
Update dependencies to bring updated dependency on watcher-0.9.7+6 (#13949) 2018-01-05 21:19:03 -08:00
Greg Spencer a04df5bc6b
Updates the package dependencies by running flutter update-packages --force-upgrade (#13906)
This simply updates the package dependencies by running flutter update-packages --force-upgrade.

I'm doing this with no other changes, because the last time I tried that, redness occurred. I want to isolate the problem to a "clean" update of the packages.

It looks like the plugins device_info, connectivity, and url_launcher haven't yet had their gradle configurations updated, so they fail when trying to build with the new gradle. I did not upgrade for those three packages only (in flutter_gallery) until we are ready to fix them (fixing them for master will break them for alpha users, so we need to do an alpha roll to do that).
2018-01-04 10:44:37 -08:00
Greg Spencer dd796853cc
Revert "Adding minzip to packaging steps for Windows (#13679)" (#13716)
This reverts commit 765191e7b4.
because the updated packages cause a gradle build problem.
2017-12-20 16:21:57 -08:00
Greg Spencer 765191e7b4
Adding minzip to packaging steps for Windows (#13679)
This adds our self-compiled copy of the MinGit executable (built from the flutter/git repo) to the archive when building an archive for Windows.

I also tweaked the internal API for prepare_package.dart so that there's a single entry point to build an archive.
2017-12-20 15:35:53 -08:00
Alan Russian 30720bd148 Change async stubbing to use thenAnswer. (#13521)
* Change async stubbing to use thenAnswer.

Mockito now prohibits calling thenReturn with Futures and Streams. dart-lang/mockito#79

* Update all Mockito deps to 3.0.0.

* Revert "Update all Mockito deps to 3.0.0."

This reverts commit e8ab9d37c3.

I did not correctly update the mockito dep, and there's no easy way to update to 3.0 alpha right now.

* Change thenAnswer((_) => to thenAnswer((invocation) =>

* Add Invocation type to thenAnswer lambdas
2017-12-19 13:13:57 -08:00
amirh becab558e1
flutter update-packages (#13571)
* flutter update-packages

* update plugin registrant for flutter_gallery
2017-12-14 10:07:51 -08:00
Greg Spencer 4e1643ebe0
Updating SDK and package versions (#13524)
Updating SDK and package versions now that alpha has been rolled to 0.0.20
2017-12-12 14:20:59 -08:00
Greg Spencer 8f65fec5f5
Rolling alpha to 0.0.20 (#13511) 2017-12-12 09:50:14 -08:00
Ian Hickson 44e228eb9e
Move image logic from services/ to painting/. (#13409)
This allows the scheduler library to depend on the services library
and the painting library to depend on the scheduler library without
the services library having to depend on the scheduler library.

While I was at it I also cleaned up some of the binding logic: the
licenses logic can now be overridden (and the test library does so),
and the image cache can now be overridden as well.
2017-12-07 14:53:08 -08:00
Yegor 5f7ef89675
more setTextEntryEmulation docs; isRegistered check (#13420) 2017-12-07 12:08:52 -08:00
Yegor d1e918fa10
support disabling text entry emulation (#13410) 2017-12-06 19:59:07 -08:00
Yegor e27bcd0f9d
Emulate text entry in FlutterDriver (#13373)
* Emulate text entry in FlutterDriver

* document enterText behavior

* remove the unnecessary composint TextRange
2017-12-06 17:29:37 -08:00
Collin Jackson 10a4f329c3
Finish release of 0.0.19, start dev version of 0.0.20 (#13370) 2017-12-05 17:06:16 -08:00
Collin Jackson fd7853faad
Release 0.0.19 (#13365) 2017-12-05 16:12:55 -08:00
Chris Bracken 1d6bb3ccbf
Update quiver dependency to 0.26.2 (#13299)
Updates quiver from 0.26.0 to 0.26.2 to pick up strong-mode fixes.
2017-12-01 10:28:59 -08:00
Mikkel Nygaard Ravn 19136c283e
Bump versions following alpha roll (#13284) 2017-12-01 06:20:05 +01:00
Chris Bracken cf37a4721a
Reorganise flutter driver implementation sources (#13163)
This patch reorganises flutter_driver's lib/src directory into three
subdirectories:

* driver: sources transitively imported/exported by flutter_driver.dart,
  which defines the API used by driver tests executed on the host machine.

* extension: sources transitively imported/exported by
  driver_extension.dart, which defines the API used to instrument a
  Flutter app running on the target device for use with a driver test.

* common: sources common to both driver and extension code.

This makes rolling Flutter into repositories that use Bazel (or
Bazel-like build systems) significantly more robust, due to the simpler
glob patterns involved.
2017-11-22 17:24:41 -08:00
Chris Bracken d9bdb76fd2
Eliminate unused retry.dart from flutter_driver (#13161) 2017-11-22 16:54:19 -08:00
Chris Bracken d5cb9781e1
Eliminate unused matcher_util in flutter_driver (#13159)
Use of this file was eliminated in e7657b9462.
2017-11-22 15:15:37 -08:00
Yegor 8c902ad479
clear timeline events prior to starting a new action (#12984)
* clear timeline events prior to starting a new action

* trailing commas
2017-11-22 15:08:09 -08:00
Chris Bracken 14b5cb047e
Use duration not threadDuration for frame duration (#13117)
1. We want to measure wall-clock duration for the benchmarks, as opposed
   to thread duration (e.g., waiting on a mutex should accrue time) and
   'dur' is the metric to use for that.

2. On Darwin-based systems (macOS and iOS) 'tdur' is the result of a
   mach syscall lookup to thread_info. This call returns unreliable data
   on iOS. Chromium, for example, disables thread time support entirely
   for iOS.
2017-11-20 17:37:14 -08:00
Mikkel Nygaard Ravn 9186ba0f89
Alpha pre roll (#13096) 2017-11-20 14:14:01 +01:00
Greg Spencer 0259be90b8
Fix spelling errors in all the dartdocs. (#13061)
I got tired of drive-by spelling fixes, so I figured I'd just take care of them all at once.

This only corrects errors in the dartdocs, not regular comments, and I skipped any sample code in the dartdocs. It doesn't touch any identifiers in the dartdocs either. No code changes, just comments.
2017-11-17 10:05:21 -08:00
Greg Spencer 797b39e9b2
Creates a new flutter command 'ide-config' and removes *.iml and .idea from tree. (#12958)
Creates a new (hidden) flutter command 'ide-config' that will create and/or update
existing .iml files and some files under the .idea directory, as well as
removing existing *.iml files and the .idea directory.

It also:

 * Adds *.iml to the .gitignore
 * Removes existing .iml files from the repo, and moves them to the
   packages/flutter_tools/ide_templates/intellij directory.
 * Adds a flag to ide-config ('--update-templates') that will take any new .iml
   files in the flutter tree and add them to the existing templates.
     - If --overwrite is also specified, then all existing templates will also
       be overwritten with the contents from the flutter tree, and any that have
       been deleted from the flutter tree will also be removed from the
       templates.
 * Added new run configurations for all existing app targets that will now also
   be automatically added to IntelliJ.
 * Setting up the environment also includes setting the coding style guidelines
   and the git VCS.
 * Note that after this PR lands, Flutter developers will need to run it once to
   re-create the .iml files and configuration files that have been removed.

After this PR lands, .iml files will no longer appear in the untracked files
section for git.
2017-11-13 10:55:22 -08:00
Alexandre Ardhuin 15601fe55c
Enable lint prefer asserts in initializer lists (#12903)
* enable lint prefer_asserts_in_initializer_lists

* enable --assert-initializer
2017-11-08 22:59:49 +01:00
Todd Volkert 16c363ac07
Clarify docs in FlutterDriver.requestData() (#12909) 2017-11-07 14:43:41 -08:00
Yegor 91bd9bc4f8
delay taking screenshot to allow GPU thread to render the frame (#12896)
* delay taking screenshot to allow GPU thread to render the frame

* address comments
2017-11-06 17:33:48 -08:00
Chris Bracken 83df7bdd0f
Update Dart package dependencies (#12829) 2017-11-01 15:28:46 -07:00
Yegor 154f2e5402 Reapply #12700 but keep linter pinned at 0.1.35 (#12735)
* Revert "Revert "fix --force-upgrade script; upgrade to the latest package versions (#12700)" (#12729)"

This reverts commit 7f0d4f4caa.

* keep linter pinned at 0.1.35
2017-10-26 09:55:36 -07:00
Yegor 7f0d4f4caa Revert "fix --force-upgrade script; upgrade to the latest package versions (#12700)" (#12729)
This reverts commit 5b3575006e.
2017-10-25 17:08:08 -07:00
Yegor 5b3575006e fix --force-upgrade script; upgrade to the latest package versions (#12700)
* fix updrade script; upgrade to the latest package versions

* exclude special dependencies from transitive closure

* fix stack trace handling in flutter_test due to stack_trace change

* change type on _emptyStackTrace
2017-10-25 16:12:43 -07:00
Alexandre Ardhuin 1fce14a31c enable lint prefer_single_quotes (#12665) 2017-10-22 18:11:36 +02:00
Collin Jackson d47d268719 0.0.17 dev version (#12593) 2017-10-18 16:25:36 -07:00
Collin Jackson e8aa40eddd release 0.0.17 (#12590) 2017-10-17 15:42:40 -07:00
Hans Muller c3d56b1dad flutter_localization optional package (#12410) 2017-10-11 16:01:13 -07:00
Chris Bracken 51e4e9f9a5 Rev version to 0.0.17-dev (#12489) 2017-10-10 17:41:25 -07:00
Chris Bracken 4424892c79 Version 0.0.16 (#12488) 2017-10-10 16:45:11 -07:00
Alexander Aprelev c02850b4dc Force upgrade update packages with improved update process. (#12412)
* Force upgrade update packages with improved update process.

* Update packages

* Revert "Update packages"

This reverts commit a37de26d3f.
2017-10-05 20:59:08 -07:00
Ian Hickson efb45ea788 Trivial nit fixes (#12285) 2017-09-27 16:13:48 -07:00
Ian Hickson 441b5c2031 Pin all dependencies ONCE AND FOR ALL (#12210)
* Pin all dependencies ONCE AND FOR ALL

This replaces the secret `flutter update-packages --upgrade` with a destructive `flutter update-packages --force-upgrade` that actually goes and pins every dependency and transitive dependency in every flutter package to the same version.

* Add comments.
2017-09-22 13:35:35 -07:00
Collin Jackson e830c5ebf6 Update versions after releasing alpha (#12057) 2017-09-12 15:53:29 -07:00
Collin Jackson 701d534ba9 Release 0.0.15 (#12056) 2017-09-12 14:01:51 -07:00
Yegor ba5b5e7f6f only tap on widgets reachable by hit testing (#11767)
* only tap on widgets reachable by hit testing

* use FractionalOffset

* added tests

* check finder finds correct widget

* undo unintentional changes

* address comments

* style fix

* add Directionality in test

* fix analysis warning
2017-09-11 09:46:42 -07:00
Michael Goderbauer a67d648742 Roll engine to 883f81c8448e483c51cf1d978dffb332bf47603d (#11966) 2017-09-06 16:30:13 -07:00
Collin Jackson 020029acfd Increment version after rolling alpha (#11893) 2017-09-06 15:18:15 -07:00
Chris Bracken 0244f5dd6a Revert "Roll engine to ceb6d05c2fb3bd5c31a25d4b08be9fd97b55a446 (#11933)" (#11959)
This roll caused performance regressions in benchmarks:
* complex_layout_scroll_perf
* flutter_gallery_transition_perf

This reverts commit f430a45a5b.
2017-09-06 11:39:10 -07:00
Michael Goderbauer f430a45a5b Roll engine to ceb6d05c2fb3bd5c31a25d4b08be9fd97b55a446 (#11933)
* Roll engien to 79332e5c42555875c7070c33810dab3f0012ace1

* Remove deprecated @proxy

* Roll engine to ceb6d05c2fb3bd5c31a25d4b08be9fd97b55a446
2017-09-05 21:12:46 -07:00
Collin Jackson 1c372c6803 Roll alpha (#11874) 2017-08-31 15:54:45 -07:00
Carlo Bernaschina a8aff38811 Add log to understand flakiness of commands_test (#11720)
The flakiness of commands_test is generally visible via:

```
drive:stdout:   Expected: 'log: paint'
drive:stdout:     Actual: ''
drive:stdout:      Which: is different. Both strings start the same, but the actual value is missing the following trailing characters: log: paint ...
```

By returning the name of the test we will be able to understand if
another test is running by reading the `Actual` value
2017-08-22 09:54:51 -07:00
Carlo Bernaschina 6643db0106 Add documentation to waitForServiceExtension (#11708)
Addresses
3b4687bf69 (r134325222)
2017-08-21 14:16:30 -07:00
Carlo Bernaschina 937b98e1b9 Fix flakiness of commands_test (#11705)
- Wait for full Hot Reload
- Wait for full Restart
- Fallback if checkHealth throws METHOD_NOT_FOUND.
  We try to wait for the service extensions to be registered and retry.
2017-08-21 13:21:00 -07:00
Mikkel Nygaard Ravn 3b8159564f Alpha post-roll work (#11608) 2017-08-14 20:28:34 +02:00
Mikkel Nygaard Ravn 859d8d3830 Alpha pre roll (#11560) 2017-08-09 15:52:04 +02:00
Chris Bracken cb14eb989d Update IntelliJ project files for latest plugin (#11536)
The most recent Flutter IntelliJ plugin replaces FLUTTER_MODULE with
WEB_MODULE and eliminates the exclusion of packages/ directories.
Use of the packages/ directory was turned off by default months ago, and
is replaced by the .packages file.
2017-08-07 12:19:25 -07:00
Ian Hickson db88414131 Upgrade to the most recent test package. (#11526)
Also, add tests to verify that our coverage is actually being tested!
2017-08-04 16:33:38 -07:00
Michael Goderbauer d68caaafcd post-alpha-release work (#11472) 2017-08-01 16:45:29 -07:00
Michael Goderbauer bbcfb8d51a prepare alpha release (#11464) 2017-08-01 14:50:29 -07:00
Ian Hickson ae5c3d5f89 Revert "Revert "Always evaluate the finder in driver.waitFor*()" (#11451)" (#11462)
This reverts commit 5d9db106db.
2017-08-01 14:23:44 -07:00
Ian Hickson 5d9db106db Revert "Always evaluate the finder in driver.waitFor*()" (#11451)
* Revert "Make plugins add their repos to projects in the consuming app (#11447)"

This reverts commit abe1e2520b.

* Revert "Support for custom build types on Android (#11354)"

This reverts commit 87eec719e2.

* Revert "add a profile() method (#11443)"

This reverts commit 561d17a876.

* Revert "Fix documentation based on dartdoc's warnings (#11428)"

This reverts commit 6655074b37.

* Revert "Improve some docs around WillPopScope. (#11429)"

This reverts commit 58a28a2965.

* Revert "temporarily disable broken driver test in integration_ui (#11440)"

This reverts commit 764515ec78.

* Revert "style fix"

This reverts commit 00bfc86630.

* Revert "tests for waitFor/waitForAbsent"

This reverts commit 31d2ee9c0c.

* Revert "Always evaluate the finder in `driver.waitFor()` and `driver.waitForAbsent()`"

This reverts commit 11d7c79b99.
2017-08-01 10:39:08 -07:00
Ian Hickson 6655074b37 Fix documentation based on dartdoc's warnings (#11428) 2017-07-28 15:44:38 -07:00
Todd Volkert 11d7c79b99 Always evaluate the finder in driver.waitFor() and driver.waitForAbsent()
Fixes #11327
2017-07-28 13:10:03 -07:00
Ian Hickson 8f56f6fdd1 Add documentation and clean up code. (#11330)
Mainly, this adds documentation to members that were previously
lacking documentation.

It also adds a big block of documentation about improving performance
of widgets.

This also removes some references to package:collection and adds
global setEquals and listEquals methods in foundation that we can use.
(setEquals in particular should be much faster than the
package:collection equivalent, though both should be faster as they
avoid allocating new objects.) All remaining references now qualify
the import so we know what our remaining dependencies are.

Also lots of code reordering in Flutter driver to make the code
consistent and apply the style guide more thoroughly.
2017-07-21 16:39:04 -07:00
Ian Hickson e1adc525d8 Option to enable the performance overlay from 'flutter run'. (#11288) 2017-07-19 12:57:22 -07:00
Todd Volkert 4196582708 Bump file,process,platform to newest versions (#11211) 2017-07-13 16:59:18 -07:00
Michael Goderbauer 6a05f0407e Fix build by bumping package:file (#11160) 2017-07-11 16:35:01 -07:00
Ian Hickson 9adb4a78a6 Deep linking: automatically push the route hiearchy on load. (#10894)
The main purpose of this PR is to make it so that when you set the
initial route and it's a hierarchical route (e.g. `/a/b/c`), it
implies multiple pushes, one for each step of the route (so in that
case, `/`, `/a`, `/a/b`, and `/a/b/c`, in that order). If any of those
routes don't exist, it falls back to '/'.

As part of doing that, I:

 * Changed the default for MaterialApp.initialRoute to honor the
   actual initial route.

 * Added a MaterialApp.onUnknownRoute for handling bad routes.

 * Added a feature to flutter_driver that allows the host test script
   and the device test app to communicate.

 * Added a test to make sure `flutter drive --route` works.
   (Hopefully that will also prove `flutter run --route` works, though
   this isn't testing the `flutter` tool's side of that. My main
   concern is over whether the engine side works.)

 * Fixed `flutter drive` to output the right target file name.

 * Changed how the stocks app represents its data, so that we can
   show a page for a stock before we know if it exists.

 * Made it possible to show a stock page that doesn't exist. It shows
   a progress indicator if we're loading the data, or else shows a
   message saying it doesn't exist.

 * Changed the pathing structure of routes in stocks to work more
   sanely.

 * Made search in the stocks app actually work (before it only worked
   if we happened to accidentally trigger a rebuild). Added a test.

 * Replaced some custom code in the stocks app with a BackButton.

 * Added a "color" feature to BackButton to support the stocks use case.

 * Spaced out the ErrorWidget text a bit more.

 * Added `RouteSettings.copyWith`, which I ended up not using.

 * Improved the error messages around routing.

While I was in some files I made a few formatting fixes, fixed some
code health issues, and also removed `flaky: true` from some devicelab
tests that have been stable for a while. Also added some documentation
here and there.
2017-06-23 14:58:29 -07:00
Jason Simmons 265257ab6d Increment dev version numbers (#10897) 2017-06-21 15:33:22 -07:00
Jason Simmons d36e2f6191 Update versions for an alpha release (#10896) 2017-06-21 15:09:10 -07:00
Todd Volkert 5ae6b7b970 Increment version to <x>-dev (#10794) 2017-06-16 14:21:13 -07:00
Todd Volkert aaf82b36a7 Bump version in preparation for a release of the alpha branch (#10779) 2017-06-16 10:51:25 -07:00
Michael Goderbauer 44126cd9b7 Increment versions with -dev prefix (#10715) 2017-06-14 21:19:10 -07:00
Michael Goderbauer 6f77b4a9a7 Prepare Alpha 0.0.9 (#10712) 2017-06-14 17:27:08 -07:00
Todd Volkert e5213b8e0a Bump versions to -dev to complete the release of alpha (#10692)
https://github.com/flutter/flutter/issues/10688
2017-06-14 08:10:11 -07:00
Todd Volkert 1a1bbacf0d Bump version in preparation for new tag (#10689)
https://github.com/flutter/flutter/issues/10688
2017-06-13 23:22:58 -07:00
Michael Goderbauer 8bf17192f6 Adding first semantics perf test (#10649)
* Adding first semantics perf test

* review commnts and analyzer fixes

* fix analyzer warning
2017-06-13 12:49:07 -07:00
Ian Hickson 0f1a703a6b More documentation (#10589) 2017-06-08 17:13:03 -07:00
Phil Quitslund 95544383ef Bump to Dart SDK 1.24.0-dev.6.7. (#10585)
* Bump to Dart SDK 1.24.0-dev.6.7.

* nits and fixes
2017-06-08 15:15:18 -07:00
Chris Bracken a0ca48c35c Revert use of const asserts in flutter_driver (#10568)
Fixes bot breakage resulting from commit
7d71326363 (#10540).
2017-06-07 14:31:52 -07:00
Alexandre Ardhuin 7d71326363 apply prefer_asserts_in_initializer_list lint (#10540) 2017-06-07 21:39:47 +02:00
Ian Hickson 6f824bcec9 More documentation (#10519) 2017-06-05 22:44:49 -07:00
Collin Jackson 2bb5cc9f3c Start 0.0.8-dev (#10459) 2017-06-02 12:36:09 -07:00
Collin Jackson e2f54df5ab Release SDK version 0.0.7 (#10456) 2017-06-02 10:43:54 -07:00
Chris Bracken bbe67c3f48 Rev SDK, package versions to dev versions (#10017)
VERSION: 0.0.7-dev
flutter: 0.0.27-dev
flutter_driver: 0.0.5-dev
flutter_test: 0.0.5-dev
2017-05-11 17:02:08 -07:00
Chris Bracken dc4ca8db83 Rev alpha branch version to 0.0.6, flutter 0.0.26 (#10010)
VERSION: 0.0.6
flutter: 0.0.26
flutter_driver: 0.0.4
flutter_test: 0.0.4
2017-05-11 15:33:29 -07:00
Ian Hickson 2f590eccbc Post alpha (#9980)
* Rev versions for alpha branch

* Rev versions after alpha
2017-05-10 22:08:27 -07:00
Ian Hickson cc44cc779b Rev versions for alpha branch (#9979) 2017-05-10 17:36:30 -07:00
Yegor f7d62aaa9e fix driver connection flakiness (#9968) 2017-05-10 15:16:45 -07:00
Ian Hickson 1af253e313 Update versions post-alpha roll. (#9941) 2017-05-09 17:53:41 -07:00
Ian Hickson 9f1d5ba50e Rev versions for alpha cut (#9940)
And add a script to rev the versions.
2017-05-09 17:06:52 -07:00
Ian Hickson 127545a353 More doc fixes. (#9848) 2017-05-06 15:08:14 -07:00
Yegor 7d6e5632d7 remove unused FlutterDriver methods (#9821) 2017-05-04 18:11:05 -07:00
Alexandre Ardhuin 26c7411d66 unnecessary_override (#9540) 2017-04-22 22:58:21 +02:00
Alexandre Ardhuin 35803c2297 comprehensive list of lints (#9330)
* comprehensive list of lints
* add comments to commented out lint
* fix unnecessary_this lints
* exclude prefer_final_fields
2017-04-20 09:38:57 +02:00
Phil Quitslund fc58bd7679 IntelliJ metadata cleanup (flutter-intellij#914). (#9427)
Follow-up from #9422
2017-04-17 13:42:31 -07:00
Adam Barth ea71bdca20 Start using @immutable annotations (#9152)
There are more places we can use this annotation, but this patch just gets us
started.
2017-04-14 10:38:58 -07:00
Devon Carew 9493df2da8 update the IntelliJ metadata files (#9388) 2017-04-14 08:55:26 -07:00
Yegor 75dc033613 cancel timeout when waiting for driver extension (#9354) 2017-04-13 10:04:08 -07:00
Ian Hickson bf017b79b3 Move Point to Offset (#9277)
* Manually fix every use of Point.x and Point.y

Some of these were moved to dx/dy, but not all.

* Manually convert uses of the old gradient API

* Remove old reference to Point.

* Mechanical changes

I applied the following at the root of the Flutter repository:

git ls-files -z | xargs -0 sed -i 's/\bPoint[.]origin\b/Offset.zero/g'
git ls-files -z | xargs -0 sed -i 's/\bPoint[.]lerp\b/Offset.lerp/g'
git ls-files -z | xargs -0 sed -i 's/\bnew Point\b/new Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bconst Point\b/const Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bstatic Point /static Offset /g'
git ls-files -z | xargs -0 sed -i 's/\bfinal Point /final Offset /g'
git ls-files -z | xargs -0 sed -i 's/^\( *\)Point /\1Offset /g'
git ls-files -z | xargs -0 sed -i 's/ui[.]Point\b/ui.Offset/g'
git ls-files -z | xargs -0 sed -i 's/(Point\b/(Offset/g'
git ls-files -z | xargs -0 sed -i 's/\([[{,]\) Point\b/\1 Offset/g'
git ls-files -z | xargs -0 sed -i 's/@required Point\b/@required Offset/g'
git ls-files -z | xargs -0 sed -i 's/<Point>/<Offset>/g'
git ls-files -z | xargs -0 sed -i 's/[.]toOffset()//g'
git ls-files -z | xargs -0 sed -i 's/[.]toPoint()//g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point, /show /g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point;/show Offset;/g'

* Mechanical changes - dartdocs

I applied the following at the root of the Flutter repository:

git ls-files -z | xargs -0 sed -i 's/\ba \[Point\]/an [Offset]/g'
git ls-files -z | xargs -0 sed -i 's/\[Point\]/[Offset]/g'

* Further improvements and a test

* Fix minor errors from rebasing...

* Roll engine
2017-04-12 15:06:12 -07:00
xster 89a7fdfc56 Rename State.config to widget everywhere (#9273)
Rename State.config to State.widget
Rename State.didUpdateConfig to State.didUpdateWidget
Renamed all State subclasses' local variables named config to something else
2017-04-10 18:32:24 -07:00
Yegor 03f5793cda increase driver timeouts; also unify the values (#9228) 2017-04-05 14:01:33 -07:00
Alexandre Ardhuin 189028a958 Separate the 'if' expression from its statement (#9177) 2017-04-04 21:45:50 +02:00
Adam Barth ae8994860e Rationalize text input widgets (#9119)
After this patch, there are three major text input widgets:

 * EditableText. This widget is a low-level editing control that
   interacts with the IME and displays a blinking cursor.

 * TextField. This widget is a Material Design text field, with all the
   bells and whistles. It is highly configurable and can be reduced down
   to a fairly simple control by setting its `decoration` property to
   null.

 * TextFormField. This widget is a FormField that wraps a TextField.

This patch also replaces the InputValue data model for these widgets
with a Listenable TextEditingController, which is much more flexible.

Fixes #7031
2017-04-01 17:30:21 -07:00
Todd Volkert ff61962144 Update devfs_test to use MemoryFileSystem (#8811) 2017-03-27 12:55:19 -07:00
Alexandre Ardhuin 32d09a3a11 use_rethrow_when_possible (#8985) 2017-03-23 22:06:08 +01:00
Alexandre Ardhuin 2166ea5b7f apply partially the upcoming unnecessary_lambdas (#8810) 2017-03-15 23:09:58 +01:00
Todd Volkert f9ad230f15 Bump file to 2.3.1 (#8807) 2017-03-15 14:11:13 -07:00
Alexandre Ardhuin a9ba0e2f88 prefer_initializing_formals (#8797) 2017-03-15 18:30:55 +01:00
Todd Volkert 5d29737a04 Bump mockito to version 2.0.2 (#8713) 2017-03-10 13:53:22 -08:00
Yegor d09591bf7d consistently accept timeout in driver API (#8667) 2017-03-09 16:31:48 -08:00
Chris Bracken cdeb83cf59 Declare locals as final where not reassigned (flutter_driver) (#8567) 2017-03-03 18:31:21 -08:00
Alexandre Ardhuin 69b6bb87d1 prefer_is_empty and prefer_is_not_empty (#8474) 2017-03-01 22:17:30 -08:00
Yegor 5ce67b084a driver: remove obsolete TODO (#8494)
This TODO was fixed by the transition to `Finder` objects.
2017-03-01 10:10:39 -08:00
Yegor bfef36f710 add waitUntilNoTransientCallbacks to driver API (#8475) 2017-02-28 15:58:28 -08:00
Todd Volkert f60410fa9d Add --bug-report flag (#8435)
This adds support for a `--bug-report` flag, which is a recording
that:
  - includes the arguments that were passed to the command runner
  - is zipped up for easy attachment in Guthub issues
2017-02-27 15:38:47 -08:00
Phil Quitslund a002e72022 Bump to test 0.12.20. (#8349)
* Bump to test `0.12.20`.

Some test `0.12.20` highlights:
  * introduces `expectLater()`  that returns a `Future` that completes when the matcher has finished running
  * deprecates the `verbose` parameter to `expect()` and the `formatFailure()` (to be removed in `0.13.0`)

Otherwise:
  * to keep up w/ the deprecation of `verbose`, removes `widget_tester` API to pass `verbose` flag (alternatively we could suppress the warning for now)

* Update stack manipulation.

* Fix framecount.
2017-02-23 15:08:25 -08:00
Alexandre Ardhuin 8c043d06de fix lints for directives_ordering rule (#8382) 2017-02-23 13:37:26 -08:00
Todd Volkert 73e079fe63 Update to file 2.1.0 (#8305) 2017-02-21 11:17:35 -08:00
Todd Volkert c233f38291 Update package:test dependencies to 0.12.18+2 (#8247) 2017-02-17 17:35:11 -08:00
Adam Barth e0b12ca17e Two becomes one (#8253)
Rename all the "2" classes related to scrolling to remove the "2". Now that the
old scrolling code is gone, we don't need to use the suffix.
2017-02-17 14:06:15 -08:00
Phil Quitslund c458fb9d2c Bump Dart SDK to 1.23.0-dev.0.0 (#8222)
* ups pinned `test` to `0.12.15+9` (to play nice w/ the latest analyzer)
* integrates `analyzer` with analysis driver defaulting to ON
2017-02-16 16:50:35 -08:00
Adam Barth 90574b0478 Remove Scrollable1 (#8225)
All the clients have migrated to Scrollable2.
2017-02-16 16:41:24 -08:00
Adam Barth be86554479 Switch benchmarks to thread duration (#8113)
For measuring the Dart thread, we care about thread duration (tdur) rather than
wall duration (dur) because we don't want to count the time when the Dart
thread is descheduled (e.g., in preference to the raster thread).

Prior to this change, these benchmarks were mostly measuring whether the OS
decided to finish the Dart thread's time slice or hand over the CPU to the
raster thread to complete the visual part of the frame. Now we actually measure
the work done on the Dart thread.
2017-02-13 16:07:07 -08:00
Todd Volkert 3b52c87da6 Bump deps on package:file and package:process (#8097) 2017-02-13 09:55:54 -08:00
Alexandre Ardhuin f16dea290b prefer const contructors in packages/flutter_driver (#8056) 2017-02-10 00:49:46 -08:00
Ian Hickson 36c63e7024 Align the flutter_gallery test to the middle for better results (#8015) 2017-02-08 19:45:41 -08:00
Michael Goderbauer 723489de02 Make dev/bots/test.dart pass on Windows (#7998)
* disables all `flutter test` and `flutter drive` tests on Windows as those two commands are not fully implemented on Windows yet
* fixes other failures on Windows
2017-02-08 15:57:31 -08:00
Adam Barth d29a94c379 Deploy Scrollable2.ensureVisible (#7951)
Also, switch Stepper over to using sliver-based scrolling.
2017-02-07 22:18:25 -08:00
Jacob Richman 53fc96da9e Small Flutter strong mode cleanup fixes. (#7825)
* Small Flutter strong mode cleanup fixes.

These are cases where strong mode down cast composite errors
generally indicated cases that would performance or correctness
issues if Flutter code was run in a strong mode VM.

* Fix Command API so that it is always in terms of Map<String,String>.

* Fix typedef
2017-02-06 08:55:09 -08:00
Jason Simmons 8f7d0a45c8 Remove unnecessary type parameter (#7751) 2017-01-30 17:49:31 -08:00
Jason Simmons 8ef17e0a6a Create flutter_driver key finders using parameterized ValueKey types (#7749)
The finder will only match the widget's ValueKey if both have identical
runtime types
2017-01-30 16:52:59 -08:00
Ian Hickson 21434fcf1a Refactor 'flutter drive' to get the observatory port from the logs (#7695)
This remove a very brittle aspect of flutter drive, whereby it would
assume a known port instead of explicitly finding out what it was.

Fixes #7692 and hopefully fixes the devicelab tests.
2017-01-27 01:37:28 -08:00
Ian Hickson 15a7eb3b6c Move to real generic method syntax (#7235) 2017-01-21 20:58:44 -08:00
Adam Barth 40e305dc2d Fix analyzer warnings (#7523)
I see these errors in Atom on my Mac. I'm not sure why they're not being
picked up by the bots.
2017-01-18 13:18:09 -08:00
Michael Goderbauer ecc4972676 Add communication logging to Flutter Driver (#7485)
This is handy for debugging a test. Communication is logged to:
* `flutter_driver_commands_{x}.log`, where {x} is an integer, and
* (if requested by user) to stdout

fixes #7473
2017-01-17 10:57:44 -08:00
Michael Goderbauer fea7496546 Add frameSync mechanism to flutter_driver. (#7471)
With frameSync enabled, flutter_driver actions will only be performed
when there are no pending frames in the app under test. This helps with
reducing flakiness.
2017-01-13 10:26:59 -08:00
Michael Goderbauer 394a736984 Roll engine to b3ed79122edd7172327ce415688ef674d6a7fa5d (#7476)
fixes #7433
2017-01-12 18:56:43 -08:00
Michael Goderbauer 528d507a53 Workaround for #7433 in flutter_driver (#7447) 2017-01-11 13:57:53 -08:00
Michael Goderbauer 5a9063f55c Remove waitForElement-specific timeout. (#7442)
It is now handled at a higher level for all commands.
2017-01-11 10:36:37 -08:00
Michael Goderbauer 7c9f9be363 Add a timeout to every command (enforced on device and host) (#7391) 2017-01-09 14:57:25 -08:00
Todd Volkert 8bb270342e Update flutter_tools to use package:file throughout (#7385)
This removes direct file access from within flutter_tools
in favor of using `package:file` via a `FileSystem` that's
accessed via the `ApplicationContext`.

This lays the groundwork for us to be able to easily swap
out the underlying file system when running Flutter tools,
which will be used to provide a record/replay file system,
analogous to what we have for process invocations.
2017-01-06 16:51:44 -08:00
Michael Goderbauer fd3e0b7e13 Add option to get Dart VM flags from flutter_driver. (#7378) 2017-01-06 10:56:09 -08:00
Todd Volkert 1c43c4e24d Bump package:file version to 1.0.0 (#7371) 2017-01-05 18:42:57 -08:00
Todd Volkert 29a88cf817 Bump path to 1.4.0 and meta to 1.0.4 (#7369) 2017-01-05 16:44:27 -08:00
Adam Barth cd09370c13 Update quiver (#7349) 2017-01-05 12:45:10 -08:00
Yegor 2aead430a7 add GPU traces to timeline summary (#7190) 2016-12-09 16:15:31 -08:00
Chris Bracken c4afe9589b Add getRenderTree() to Flutter Driver (#7007)
Returns a dump of the application's render tree.
2016-11-28 11:11:03 -08:00
Adam Barth 7c795d5fdd Update iml files (#7025)
These now match what 2016.3 expects.
2016-11-27 07:46:54 -08:00
Ian Hickson 06ca1b3326 Revert "Revert "update vm_service_client to 0.2.2+4"" (#6919) 2016-11-23 08:50:55 -08:00
Chris Bracken c370b7de36 Add testOutputsDirectory (#6987)
Declares a top-level getter that returns the outputs directory to which
Flutter Driver tests can write any output files. Timeline data defaults
to this directory.
2016-11-22 12:26:32 -08:00
Adam Barth 49fa3f4933 Revert "update vm_service_client to 0.2.2+4" (#6918) 2016-11-17 19:54:53 -08:00
Yegor 05fdc2910b update vm_service_client to 0.2.2+4 (#6917) 2016-11-17 17:50:47 -08:00
Hans Muller 861492d6f4 Changed vm_service_client version back to 0.2.2+2 (#6909) 2016-11-17 15:33:45 -08:00
Dan Rubel 34e466f1fd Refactor flutter command exit code - part 3 of 3 (#6838)
* Remove the workaround that pinned args to v0.13.6
This reverts most of the changes in commit 6331b6c8b5
* throw exception if exit code is not an integer
* rework command infrastructure to throw ToolExit when non-zero exitCode
* convert commands to return Future<Null>
* cleanup remaining commands to use throwToolExit for non-zero exit code
* remove isUnusual exception message
* add type annotations for updated args package
2016-11-14 14:21:30 -05:00
Yegor d63430773c add driver failure test (#6776) 2016-11-09 15:28:30 -08:00
Yegor 0cd69826f5 100% doc coverage in package:flutter_driver (#6738) 2016-11-08 15:30:31 -08:00
Dan Rubel 6331b6c8b5 revert args to 0.13.6 (#6765) 2016-11-08 17:15:11 -05:00
Adam Barth 67f591000f Mentions flutter packages get rather than pub get (#6625)
Fixes #6417
2016-11-01 13:27:06 -07:00
Yegor 33c6526462 fix frame info extraction logic; track frames in gallery test (#6505) 2016-10-25 11:02:18 -07:00
Chris Bracken 8b197bddce Fix common typos in doc comments (#6520) 2016-10-25 10:06:42 -07:00
Chris Bracken 441a62a402 Support an environment-specified VM service URL (#6497)
If a URL is not explicitly specified by the test author, check for an
environment-specified URL before falling back to the default value.
2016-10-24 12:36:48 -07:00
Yegor 995fcdc92b add description to by-predicate finders (#6362)
Add an option to provide a custom description to predicate
finders. Without a custom description we default to printing the
predicate function's signature, which is not all that useful.

Use this new option in the driver extension to print the text of the
sought after tooltip.
2016-10-17 17:16:22 -07:00
Adam Barth 9cab64a72c More automated edits of iml files 2016-10-14 21:57:28 -07:00
Adam Barth 9ae7f4903e Update IML files 2016-10-14 09:58:48 -07:00
Adam Barth a6b5293df9 Update iml files (#6300)
These changes were generated by IntelliJ.
2016-10-12 23:33:17 -07:00
Devon Carew 4c8b7b5d44 commit intellij project metadata (#6232)
* commit intellij project metadata

* move metadata to the top level

* delete dev/intellij
2016-10-06 17:43:52 -07:00
Jason Simmons 4d8f4f421a Screenshot API for flutter driver (#6175) 2016-10-03 12:26:30 -07:00
Adam Barth c1a2967430 Use SDK sources to refer to our own packages (#6001)
Switch our pubspec.yamls to using SDK sources so that we can have consistent
source types when we depend on these packages from external packages using SDK
sources.
2016-09-22 20:39:35 -07:00
Dan Rubel 3c467a899a cleanup unawaited futures lints (#5946) 2016-09-20 07:33:35 -04:00
Yegor 721cf95300 fix a race in tap gesture in the driver extension (#5853) 2016-09-13 14:54:12 -07:00
Adam Barth 157ffaac35 Update Dart package dependencies (#5832) 2016-09-12 16:00:12 -07:00
Yegor b5a47d71cb driver: fix covariant closures; make them private (#5782) 2016-09-09 10:34:55 -07:00
Phil Quitslund d2fda677e1 Update to Dart 1.20.0-dev.1.0. (#5689)
* Udpate to Dart `1.20.0-dev.1.0`.

Udpate to Dart `1.20.0-dev.1.0` and corresponding `analyzer` package.

* Added `--no-packages-dir`.

* Revert extension to master.

* Added ignores.

* Review nits.

* More nits.
2016-09-08 13:14:08 -07:00
pq 13c3f9d946 Update Dart (1.19.0-dev.0.0) and analyzer (0.27.4-alpha.19). 2016-07-27 10:44:44 -07:00
YoungSeok Yoon a10cd03b05 Flutter driver commands for controlling the Input widget (#4913)
* Driver commands for controlling the Input widget

This commit introduces two new driver commands for controlling the
material Input widget.

* setInputText(SerializableFinder finder, String text)
* submitInputText(SerializableFinder finder)

Since it is not possible to directly modify the Input widget text,
these driver commands invokes the handler functions of the Input
widget: onChanged and onSubmitted, respectively. The `submitInputText`
command returns the submitted String as a result.

* Make input command handler methods private

Addressing comments from @yjbanov.
2016-07-14 13:29:49 -07:00
Kaiyuan Wang ccf87bd083 Fix the issue that flutter driver does not close _peer (#4755)
* Fix the issue that flutter driver does not close _peer when
driver.close() is invoked.  The problem introduces the following
unexpected behavior:

  1. Launch an app using "flutter run ..." command
  2. Run the flutter driver test using "dart flutter_test.dart"

The test will not exit after running.  The problem will be solved
if _peer is closed.

* Fix formatting issue
2016-06-25 12:58:46 -07:00
Devon Carew 415324f2f0 bump our dep on the test package (#4625)
* bump out dep on the test package

* add other pubspecs
2016-06-19 08:10:03 -07:00
Devon Carew 49affc4098 make the drive output prettier (#4260) 2016-05-27 22:36:07 -07:00
Adam Barth fde55a6f6a Update vector_math (#4201)
The new version has an API change. Also, up our SDK requirements to be a
bit more realistic.
2016-05-26 09:49:09 -07:00
Adam Barth c69cff9428 Update test package (#4198) 2016-05-25 17:45:23 -07:00
Hans Muller 770f8f1d0c rename TracingCategory to TimelineStream (#3822) 2016-05-09 17:00:49 -07:00
pq bcede8dffb Literals get type annotations.
As per the recent fix to the `always_specify_types` lint (https://github.com/dart-lang/linter/issues/199), literal maps and lists are now expected to be explicitly typed.

Running that lint on the repo identifies quite a few spots to update.  This focuses on `flutter_driver` and `flutter_sprites` (somewhat arbitrarily) but the changes are fairly representative.

Note there are a number of places where I made a quick judgement on how specific to make the types.  Feedback on those is welcome.  (Especially as we move forward with more.)
2016-05-04 09:18:31 -07:00
Hans Muller a9b965cb9b Gallery demo start-time performance test (#3655)
*  Gallery demo start-time performance test
2016-05-03 17:37:10 -07:00
Ian Hickson 4b401a3e75 Track the worst frame in perf tests (#3642)
* Track the worst frame in perf tests

* Use backticks in "/// Returns `null` if"
2016-05-03 14:00:10 -07:00
Devon Carew c9010c91f6 fix analysis errors (#3677)
* fix analysis errors

* review comments; fix test

* re-add an export for debugPrint
2016-05-03 09:09:00 -07:00
Ian Hickson 91dd969966 Refactor the test framework (#3622)
* Refactor widget test framework

Instead of:

```dart
  test("Card Collection smoke test", () {
    testWidgets((WidgetTester tester) {
```

...you now say:

```dart
  testWidgets("Card Collection smoke test", (WidgetTester tester) {
```

Instead of:

```dart
  expect(tester, hasWidget(find.text('hello')));
```

...you now say:

```dart
  expect(find.text('hello'), findsOneWidget);
```

Instead of the previous API (exists, widgets, widget, stateOf,
elementOf, etc), you now have the following comprehensive API. All these
are functions that take a Finder, except the all* properties.

* `any()` - true if anything matches, c.f. `Iterable.any`
* `allWidgets` - all the widgets in the tree
* `widget()` - the one and only widget that matches the finder
* `firstWidget()` - the first widget that matches the finder
* `allElements` - all the elements in the tree
* `element()` - the one and only element that matches the finder
* `firstElement()` - the first element that matches the finder
* `allStates` - all the `State`s in the tree
* `state()` - the one and only state that matches the finder
* `firstState()` - the first state that matches the finder
* `allRenderObjects` - all the render objects in the tree
* `renderObject()` - the one and only render object that matches the finder
* `firstRenderObject()` - the first render object that matches the finder

There's also `layers' which returns the list of current layers.

`tap`, `fling`, getCenter, getSize, etc, take Finders, like the APIs
above, and expect there to only be one matching widget.

The finders are:

 * `find.text(String text)`
 * `find.widgetWithText(Type widgetType, String text)`
 * `find.byKey(Key key)`
 * `find.byType(Type type)`
 * `find.byElementType(Type type)`
 * `find.byConfig(Widget config)`
 * `find.byWidgetPredicate(WidgetPredicate predicate)`
 * `find.byElementPredicate(ElementPredicate predicate)`

The matchers (for `expect`) are:

 * `findsNothing`
 * `findsWidgets`
 * `findsOneWidget`
 * `findsNWidgets(n)`
 * `isOnStage`
 * `isOffStage`
 * `isInCard`
 * `isNotInCard`

Benchmarks now use benchmarkWidgets instead of testWidgets.

Also, for those of you using mockers, `serviceMocker` now automatically
handles the binding initialization.

This patch also:

* changes how tests are run so that we can more easily swap the logic
  out for a "real" mode instead of FakeAsync.

* introduces CachingIterable.

* changes how flutter_driver interacts with the widget tree to use the
  aforementioned new API rather than ElementTreeTester, which is gone.

* removes ElementTreeTester.

* changes the semantics of a test for scrollables because we couldn't
  convince ourselves that the old semantics made sense; it only worked
  before because flushing the microtasks after every event was broken.

* fixes the flushing of microtasks after every event.

* Reindent the tests

* Fix review comments
2016-04-29 13:23:27 -07:00
Devon Carew 50b1b16db6 rev test to 0.12.13+1 to support 1.17.0-dev dart sdks (#3613) 2016-04-28 12:56:55 -07:00
Ian Hickson e968d91ca4 Rename binding abstract classes (#3482)
The old names were getting silly and started stepping on valuable namespace.

The new names are consistent and clear.
2016-04-21 17:18:46 -07:00
Ian Hickson 0e11b0e6e3 Make the widgets binding reusable. (#3479)
Previously the widgets layer only provided a concrete binding, which
makes it awkward to extend it compared to other bindings. This moves
widgets to the same style as the other layers.

In a subsequent patch I'll use this to make the tests layer saner.
2016-04-21 16:06:51 -07:00
Ian Hickson b7af64ee50 Refactor TestGesture (#3461)
Moves TestGesture into test_pointer.dart and makes it more
self-contained.

This is part of a general refactoring of flutter_test.

Depends on https://github.com/flutter/flutter/pull/3459
2016-04-21 13:18:02 -07:00
Yegor 7fe7de3f12 [driver] fix a race in finder logic (#3444) 2016-04-20 15:26:09 -07:00
Ian Hickson 261923e5c6 Refactor service extensions (#3397)
Bindings now have a debugRegisterServiceExtensions() method that is
invoked in debug mode (only). (Once we have a profile mode, there'll be
a registerProfileServiceExtensions() method that gets called in that
mode only to register extensions that apply then.)

The BindingBase class provides convenience methods for registering
service extensions that do the equivalent of:

```dart
void extension() { ... }
bool extension([bool enabled]) { ... }
double extension([double extension])  { ... }
Map<String, String> extension([Map<String, String> parameters]) { ... }
```

The BindingBase class also itself registers ext.flutter.reassemble,
which it has call a function on the binding called
reassembleApplication().

The Scheduler binding now exposes the preexisting
ext.flutter.timeDilation.

The Renderer binding now exposes the preexisting ext.flutter.debugPaint.

The Renderer binding hooks reassembleApplication to trigger the
rendering tree to be reprocessed (in particular, to fix up the
optimisation closures).

All the logic from rendering/debug.dart about service extensions is
replaced by the above.

I moved basic_types to foundation.

The FlutterWidgets binding hooks reassembleApplication to trigger the
widget tree to be entirely rebuilt.

Flutter Driver now uses ext.flutter.driver instead of
ext.flutter_driver, and is hooked using the same binding mechanism.
Eventually we'll probably move the logic into the Flutter library so
that you just get it without having to invoke a special method first.
2016-04-19 10:53:58 -07:00
Yegor e7657b9462 [driver] "waitFor" command in place of broken "exists" (#3373)
* [driver] "waitFor" command in place of broken "exits"

* [driver] wait using frame callback
2016-04-19 09:49:22 -07:00
Yegor 9ce995f65e [driver] refactor API to finder objects (#3365) 2016-04-15 16:57:35 -07:00
Yegor 0e9737e4cc [driver] upgrade to the latest version of vm_service_client (#3348) 2016-04-14 23:23:45 -07:00
Yegor 86597cd10d [driver] lock vm_service_client
until we have a fix for the breaking changes
2016-04-14 16:26:17 -07:00
Yegor d5d4e7c054 [driver] output per-frame build times in the timeline summary (#3334) 2016-04-14 11:28:16 -07:00
Eric Seidel 341bd47624 Move flutter drive to use 8183 to not conflict with diagnostic server
When @jason-simons added the diagnostic server on Android this
happened to conflict with flutter drive's usage of 8182.

We really should fix both of these port users to be dynamic
but this fixes https://github.com/flutter/flutter/issues/3291
for now.

@yjbanov
2016-04-13 11:22:38 -07:00
Seth Ladd f43e1dfaff Fix instruction when app is missing enableFlutterDriverExtension (#3239) 2016-04-11 09:17:51 -07:00
Seth Ladd 3e661965c2 de-dupe API docs in flutter_driver (#3240) 2016-04-11 09:11:32 -07:00
Yegor 99e916d0e2 [driver] fix analyzer warnings in the extension (#3205) 2016-04-07 17:33:17 -07:00
Yegor f697f58ccd [driver] fix match state hand-off in matcher_util.dart (#3103)
Fixes https://github.com/flutter/flutter/issues/3094
2016-04-07 10:08:14 -07:00
Yegor 19e624ccfe [driver] give the timeline data some structure
Fixes https://github.com/flutter/flutter/issues/2713
2016-04-04 17:07:16 -07:00
Yegor 055fd00dc1 Merge pull request #3058 from yjbanov/timeline-summary
[driver] utility for extracting and saving timeline summary
2016-04-01 17:48:25 -07:00
Devon Carew 18d29583d0 pubspec normalization; remove den 2016-04-01 08:33:22 -07:00
Yegor Jbanov 18aed70e1c [driver] switch to different pause event workaround 2016-03-30 22:41:31 -07:00
Devon Carew d5cccf5cd6 rev mockito; remove deprecated uses 2016-03-30 09:10:50 -07:00
Devon Carew 89143313cb Merge pull request #2981 from devoncarew/no_symlinks
run pub with --no-package-symlinks
2016-03-29 19:25:04 -07:00
Devon Carew fe37825fd5 run pub with --no-package-symlinks 2016-03-29 19:02:14 -07:00
Yegor Jbanov bfa16b2b5d [driver] fix observatory port # and timeline data extraction
The way we pick observatory port # has changed and we have broken
logic that handles port 8181. To fix the buildbot, switch to port
8182. We can later figure out what we want to do when we clean up
port handling.

The old VM extention for extracting the timeline data is gone.
Switch to the new '_getVMTimeline' API.
2016-03-29 13:53:40 -07:00
Yegor Jbanov 8aac1c996c [driver] actually start the timer when connecting 2016-03-18 14:38:34 -07:00
yjbanov 26c4177360 [driver] API for getting performance traces 2016-03-14 16:15:18 -07:00
Hixie 797e27edd3 Add @override annotations to flutter framework 2016-03-14 14:02:26 -07:00
Ian Hickson 62f3124e66 Fix generic method syntax. 2016-03-14 10:33:01 -07:00
Ian Hickson d745e20853 Even more types 2016-03-14 09:41:54 -07:00
Hixie 6795efacab Enable always_specify_types lint
And fix the zillion issues that uncovered.
2016-03-12 00:37:31 -08:00
Ian Hickson 43b0104114 Revert "Merge pull request #2639 from Hixie/always_specify_types"
This reverts commit f41b3411da, reversing
changes made to e33d8d9621.

This was a bad check-in due to my mangling uploading a new version of the branch from a different machine.

This reverts https://github.com/flutter/flutter/pull/2639 and will be replaced by https://github.com/flutter/flutter/pull/2640
2016-03-12 00:34:37 -08:00
Hixie d162d98c79 Enable always_specify_types lint
And fix the zillion issues that uncovered.
2016-03-11 18:27:32 -08:00
Ian Hickson 1b9cd52081 Enable ALL THE LINTS
Well, all the easy ones, anyway.

For some reason `// ignore:` isn't working for me so I've disabled
lints that need that. Also disabled those that require a ton of work
(which I'm doing, but not in this PR, to keep it reviewable).

This adds:
- avoid_init_to_null
- library_names
- package_api_docs
- package_names
- package_prefixed_library_names
- prefer_is_not_empty
- sort_constructors_first
- sort_unnamed_constructors_first
- unnecessary_getters_setters
2016-03-10 23:15:31 -08:00
Hixie c7339de6bc Enable always_declare_return_types lint
And fix a zillion omissions this uncovered.
2016-03-09 17:57:39 -08:00
yjbanov 008785be8f [driver] serialize commands to plain strings
Turns out VM service only accepts flat parameter name/value pairs. It
only worked this far because vm_service_client (mistakenly) uses JSON
encoder to encode parameters.

This change separates the Command type hierarchy from that of Result and
tightens type constraints on Command object parameters.
2016-03-02 18:01:16 -08:00
yjbanov ee184a7821 driver.scroll action; scroll perf test for Stocks 2016-03-02 17:13:49 -08:00
Yegor Jbanov 44d7a577e0 [driver] wait for the isolate to enter pause on start 2016-03-02 15:58:01 -08:00
Yegor Jbanov 6d35481cfa add smoke driver test; find by tooltip; retry predicate 2016-02-29 16:50:47 -08:00
yjbanov 6a1f47a532 factor out enum indexing into reusable EnumIndex 2016-02-29 16:50:47 -08:00
Hixie e5087d4dd4 Remove some prints in tests. 2016-02-26 11:07:55 -08:00
yjbanov d2c94990fa deflake retry_test.dart (using FakeAsync) 2016-02-24 13:58:59 -08:00
Chinmay Garde 54daeaa252 Disable flaky retry_test 2016-02-24 13:40:31 -08:00
yjbanov 7f39703759 support waiting for things to happen in Flutter Driver 2016-02-24 10:01:00 -08:00
yjbanov a2b1bd4673 "flutter drive" command
Runs a test app and a driver test simultaneously, then stops the app.

Usage:

```
flutter drive --target=/path/to/test/app.dart
```

This command will look for `/path/to/test/app_test.dart` by
convention. We will expand into other ways of discovering tests in the
future.
2016-02-19 18:11:53 -08:00
yjbanov 439aadf4e4 move to pub version of vm_service_client 2016-02-17 18:02:18 -08:00
Yegor Jbanov b0e4559459 add flutter_driver package
This commit contains:

- FlutterDriver API for e2e tests usable in conjunction with package:test
- FlutterDriverExtension to be enabled by the application in order to
  allow an external agent to connect to it and drive user interactions and
  probe into the element tree
- initial implementations of tap, findByValueKey and getText commands (to
  be expanded in future PRs)
2016-02-17 18:02:18 -08:00