7163 Commits

Author SHA1 Message Date
Ian Hickson
9ece6daff6 Add more asserts and docs to ChangeNotifier. (#7513)
It took me a while to figure out what was going on (I was removing a
listener after disposal). These asserts helped.
2017-01-17 14:17:00 -08:00
Ian Hickson
b72fa88f10 Make it easier to run local engine tests using the Travis test script. (#7512)
Our test script is getting complicated enough that doing your own
testing with a custom engine has become tedious. Now you can just do:

```bash
(cd ~/dev/flutter/; FLUTTER_TEST_ARGS=--local-engine=host_debug_unopt dev/bots/test.sh)
```

...to run all your tests (assuming your flutter repo is in
`~/dev/flutter` and your engine in `~/dev/engine`).
2017-01-17 13:50:54 -08:00
Adam Barth
2b742289d4 Fix several minor bugs and add many tests (#7506)
* MultiTapGestureRecognizer previously would assert if there was no
   competition.
 * GestureArenaTeam would always select the first recongizer as the
   winner even if a later recognizer actually accepted the pointer
   sequence.
 * debugPrintStack would fail a type check if maxFrames was non-null.
 * FractionalOffset.lerp would throw a null-pointer exception if its
   second argument was null.

Also, add a number of tests for previously untested lines of code.
2017-01-17 11:00:10 -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
Phil Quitslund
41251d2450 Update to Dart SDK 1.22.0-dev.8.0. (#7461)
* Update to Dart SDK `1.22.0-dev.6.0`.

* Update SDK summary generation to create spec and strong summaries.

* Updated to dev.8.0.

* Fixed console out.
2017-01-17 09:50:52 -08:00
Reagan Middlebrook
fcc9df719f Clarifying allowed Divider use (#7486)
Clarifying that Dividers aren't restricted to usage in lists and Drawers. Maybe no one else is confused about this but I didn't realize it until I found them used in the calculator demo (8ca4caa440/examples/flutter_gallery/lib/demo/calculator/home.dart)
2017-01-14 11:48:55 -08:00
Adam Barth
ad27fcd3dc Add SimpleDialogOption (#7494)
The demo of the SimpleDialog had some useful code that should really be part of
the framework. This patch extracts it into a SimpleDialogOption widget.

Remove debugCheckHasScaffold because it is unused.

Also, add tests for InkWell, SimpleDialog, and other widgets.
2017-01-13 23:26:05 -08:00
Jason Simmons
3b702448fd Do not paint a RenderFittedBox with an empty size (#7489)
If the size is empty, then _updatePaintData will produce an invalid transform
that yields a NaN canvas bounds rectangle

Fixes https://github.com/flutter/flutter/issues/7431
2017-01-13 15:12:30 -08:00
Adam Barth
113fd6cb52 Don't analyze dev/missing_dependency_test (#7478)
That test intentionally has analysis errors to check how the tools react
to that situation.
2017-01-13 15:04:43 -08:00
Adam Barth
0139c69c84 Add GestureArenaTeam (#7481)
Previously, the Slider used a drag gesture recognizer to move the head
of the slider, but when the slider was in a vertical scroller, the
recognizer would wait until the user moved the pointer by enough pixels
to disambiguate between sliding the slider and scrolling the scroller.

That worked fine for actual drags, but the slider should also move when
the user taps the track. This patch introduces a tap recognizer to
handle that behavior.

To avoid the slider's drag and tap recognizers from competing with each
other in the arena, this patch introduces the notion of a
GestureArenaTeam, which lets several recognizers combine to form one
entry in the arena.  If that entry wins, the team picks the first of its
recognizers as the winner, avoiding latency.

Fixes #7454
2017-01-13 14:44:59 -08:00
Adam Barth
4955eef8a7 Refactor IconThemeData.fallback (#7490)
Now IconThemeData.fallback is a factory constructor and IconThemeData.of() does
the work of computing the fallback for its clients.

Also, add tests for ImageIcon and ListItems.
2017-01-13 14:44:47 -08:00
Adam Barth
3150e3fbd4 Ticker.stop should work when muted (#7487)
Previously, the ticker would not stop when it was muted because it thought it
was already not ticking.
2017-01-13 12:46:13 -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
Adam Barth
f5bd8976de Expose some text metrics on RenderParagraph (#7456)
The underlying TextPainter is not exposed, so this patch exposes some
useful metrics that clients might want to read.
2017-01-12 23:13:31 -08:00
Michael Goderbauer
394a736984 Roll engine to b3ed79122edd7172327ce415688ef674d6a7fa5d (#7476)
fixes #7433
2017-01-12 18:56:43 -08:00
Todd Volkert
55beaef743 Ignore only ENOTTY when setting stdin.lineMode (#7472) 2017-01-12 16:14:37 -08:00
Adam Barth
3c33bb4697 Add some more framework.dart tests (#7469) 2017-01-12 15:08:16 -08:00
Devon Carew
6737712067 relax timeouts for some service protocol calls (#7468)
* relax timeouts for some service protocol calls

* remove 'note that' text
2017-01-12 14:03:04 -08:00
Todd Volkert
4f9e5c8dc7 Fix race condition in coverage collection (#7455)
Previously, it was possible for the test harness to bail
and the test runner to complete before the platform plugin
triggered the collection of coverage data. This fixes the
race condition such that the pending coverage collection
task is recorded immediately after starting the process.
2017-01-12 13:58:19 -08:00
Michael Thomsen
7a0ab2437a Add missing IntelliJ metadata for hello_services (#7463)
* Add missing IJ metadata

* Updates

* Add modules metadata
2017-01-12 22:53:24 +01:00
Michael Thomsen
b71f89a194 Add a workspace file to the template to trigger main.dart to open in the code editor (#7464) 2017-01-12 22:50:17 +01:00
Adam Barth
474e473a50 Remove Mimic (#7467)
This widget isn't tested and isn't used by Fuchsia or internally by Google. The
Hero widget is a better way of generating hero animations.
2017-01-12 13:14:24 -08:00
Adam Barth
709cc0034e Improve test coverage again (#7458)
This patch adds tests for radio buttons, the date picker, as well as a
number of other classes.
2017-01-12 13:14:09 -08:00
Adam Barth
d0cd545818 Merge the two dartdoc smoke tests (#7443)
We were checking similar things in two places. Now we check everything in one
place.
2017-01-12 09:47:50 -08:00
Todd Volkert
719712b74c Add test for AppContext (#7465) 2017-01-12 09:31:27 -08:00
Adam Barth
8f708bfbc1 Test AboutDrawerItem (#7453)
Also, fix a few minor bugs found by the test.
2017-01-11 18:38:03 -08:00
Phil Quitslund
a8cd212575 Add example IntelliJ metadata (flutter-intellij#607). (#7428)
* Add example IntelliJ metadata (flutter-intellij#607).

Ensures example projects open cleanly out-of-the-box w/ the Flutter Plugin.

See: https://github.com/flutter/flutter-intellij/issues/607.

* Fixed IML files.
2017-01-11 17:37:30 -08:00
Chris Bracken
bd1f9cdcab Roll engine to fc421489b154c6ceb1b8a063541d5a5d4372db6b (#7451) 2017-01-11 15:01:11 -08:00
Adam Barth
5dc96f2069 markNeedsBuild should handle case where the element is in the dirty list (#7448)
Previously we asserted that the element was not in the dirty list, but there
are scenarios where the element can be in the dirty list already. This patch
makes markNeedsBuild handle those cases by simply resorting the dirty list.

Fixes #6119
2017-01-11 14:37:40 -08:00
Jason Simmons
e3cdd4542c Calculate the caret position based on the next or previous rune (#7432)
The indexes passed to paragraph.getBoxesForRange are based on UTF-16 code
units.  If the caret is at a character that is encoded as multiple code units,
then the start and end indexes should be adjusted accordingly.
2017-01-11 14:32:13 -08:00
Yegor
0c7a9da98f microbenchmarks: single-line JSON; consolidate #7433 workaround (#7450)
- output single-line JSON because iOS 9.x cannot output more than one line
- move the workaround for #7433 into LiveTestWidgetsFlutterBinding so that it works in all cases (e.g. animation_bench.dart on iOS)
2017-01-11 14:29:21 -08:00
Hans Muller
a27192fe67 Navigator tutorial dartdoc (#7445) 2017-01-11 14:13:48 -08:00
Michael Goderbauer
528d507a53 Workaround for #7433 in flutter_driver (#7447) 2017-01-11 13:57:53 -08:00
Devon Carew
7f2915d331 ignore exceptions from stdin.lineMode (#7439)
* ignore exceptions from stdin.lineMode

* only catch IOException
2017-01-11 10:54:42 -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
Adam Barth
6d84e4aacc Update Flutter to use the latest dartdoc (#7438)
Now that dart-lang/dartdoc#1236 is fixed.
2017-01-11 09:00:10 -08:00
Adam Barth
8f6aefa2c8 Remove HostMessages (#7436)
This API was deprecated. Clients should use PlatformMessages instead.
2017-01-11 08:59:43 -08:00
Todd Volkert
a0666f330e Update Process.exitCode setter to not use @override (#7434)
As of Dart SDK 1.22.0-dev.5.0, `Process.exitCode` is no longer
mutable (that SDK version picks up e5a16b1ca5).
This change allows the tools code to pass analysis in sdk versions both
before and after that change, to allow for analysis against both the host and
target sdks.
2017-01-10 21:33:04 -08:00
Adam Barth
2ee04c92bf Improve test coverage (#7430)
Also, make the exception handling for global key listeners slightly more
robust.
2017-01-10 20:41:42 -08:00
Yegor
42ccffca36 fix microbenchmarks on iOS (#7429) 2017-01-10 18:16:00 -08:00
Yegor
7a10ed9315 Revert "Bump to Dart SDK 1.22.0-dev.5.0 (#7382)" (#7435)
This reverts commit ef25a2033781a9ab3195bddd8572e9a449d1c7e4 to unbreak the build.
2017-01-10 18:14:58 -08:00
Todd Volkert
bba6bff66b Move forbidden dart:io import test from Bash to Dart (#7427) 2017-01-10 16:08:51 -08:00
Phil Quitslund
ef25a20337 Bump to Dart SDK 1.22.0-dev.5.0 (#7382)
* Bump Dart SDK to 1.22.0-dev.5.0.

* Suppress spurious `FutureOr` type warning.

* Fixed linter dep post merge.

* Formatting tweaks.
2017-01-10 14:55:31 -08:00
Todd Volkert
1ccbf8f00d Use FileSystem.pathSeparator instead of Platform.pathSeparator (#7417) 2017-01-10 13:17:20 -08:00
Adam Barth
03d1980733 Change Flexible's default FlexFit (#7404)
Change `Flexible`'s default `FlexFit`

Previously, `Flexible` defaulted to `FlexFit.tight`, which forced the child to
expand to fill the available space. Now, `Flexible` defaults to
`FlexFit.loose`, which does not force the child to expand to fill the available
space.

If you want the child to expand to fill the available space, consider using
`Expanded` instead.

Fixes #5169
2017-01-10 13:12:04 -08:00
Yegor
b6ac86435a export missed transition count to the dashboard (#7426) 2017-01-10 13:09:43 -08:00
Jason Simmons
90d18fa808 Fix the type of the default project root path (#7422) 2017-01-10 12:08:33 -08:00
Adam Barth
b9f49a40f7 Handle missing flutter_test dependency cleanly (#7421)
We now produce a more reasonable error message when we're missing the
flutter_test dependency in a test. Also, remove the flutter_tools stack traces
when the engine dies.

Fixes #6187
2017-01-10 11:31:24 -08:00
Hans Muller
2155fb74b6 Tweak the Navigator class doc (#7415) 2017-01-10 11:19:09 -08:00
Todd Volkert
e2847c7221 Fix type passed to printError() (#7416)
Fixes #7413
2017-01-10 10:38:12 -08:00