Commit graph

148 commits

Author SHA1 Message Date
Hans Muller af587a154f Support for tests that respond to text input (#7915) 2017-02-07 14:54:18 -08:00
zhenqiu1101 47666af54c Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant. (#7944)
* Add find.descendant API to support find descendants of an element by passing the current element and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
2017-02-07 14:46:29 -08:00
Ian Hickson be7be2b8b6 Test service extensions (#7849)
...and fix bugs that the tests uncovered.

WRITE TEST FIND BUG
2017-02-03 13:55:07 -08:00
Ian Hickson 5928d221d4 ShrinkWrap Viewport (#7790) 2017-02-02 14:50:04 -08:00
Michael Goderbauer 40aab7f553 Bump Dart SDK to 1.22.0-dev.10.3 (#7791) 2017-02-01 16:33:27 -08:00
Adam Barth 134096022c Test PaginatedDataTable (#7594)
This patch contains some basic tests for PaginatedDataTable.
2017-01-23 21:36:42 -08:00
Ian Hickson 63aa1397a3 Increase the strictness of our requiring explicit types (#7585)
...now that we have generic methods, their types need to be specified too.
2017-01-23 01:04:31 -08:00
Ian Hickson 15a7eb3b6c Move to real generic method syntax (#7235) 2017-01-21 20:58:44 -08:00
Michael Goderbauer 394a736984 Roll engine to b3ed79122edd7172327ce415688ef674d6a7fa5d (#7476)
fixes #7433
2017-01-12 18:56:43 -08:00
Adam Barth 3c33bb4697 Add some more framework.dart tests (#7469) 2017-01-12 15:08:16 -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
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
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
Ian Hickson 79c8e5c7c7 Add a toString to Simulation (#7364)
Also, make hasOneLineDescription more discerning.
Also, add a test for hasOneLineDescription.
Also, add a test for GravitySimulation, to test the toString.
2017-01-05 16:33:40 -08:00
Ian Hickson e08c3c3bdc moreOrLessEquals matcher for floating point numbers (#7358)
```dart
expect(x, moreOrLessEquals(0.0));
```

...for those cases where `x` might be 1e-11 or whatever.

Also, be more resilient when dumping the tree from inside the test framework.
Also, add an assert that helped me debug something the other day.
2017-01-05 14:51:01 -08:00
Adam Barth cd09370c13 Update quiver (#7349) 2017-01-05 12:45:10 -08:00
Adam Barth 86e5fce61a Tooltip update can cause assert (#7338)
We were trying to update the tooltip overlay entry, but that cannot work
because the overlay entry might have already built. Instead, we keep the
old value.

Fixes #7151
2017-01-04 16:08:29 -08:00
Hans Muller 440ddef69e Regression tests should verify that debug are not set (#7090) 2016-11-29 15:17:51 -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 9c1a24fa72 Reexport meta from foundation. (#6938) 2016-11-18 21:22:32 -08:00
Adam Barth a4a783b64f Add support for pointer hover (#6884) 2016-11-15 21:13:37 -08:00
Ian Hickson bf2c46e263 Fix the ignore identifiers (#6876)
I used the wrong identifiers here.
2016-11-15 16:52:58 -08:00
Ian Hickson 9cfde14762 Silence more new analyzer warnings (#6874)
See #6861
2016-11-15 14:24:01 -08:00
Ian Hickson 2b84d1ff1b Silence new analyzer warnings (#6866)
See https://github.com/flutter/flutter/pull/6861

This silences all but two of the warnings from https://travis-ci.org/flutter/flutter/builds/176055550

One of the silenced warnings was a genuine code error.

Some of the others were correct but there was no way for the analyzer to know, and I worked around them.

The remainder are problems with the analyzer, specifically https://github.com/dart-lang/sdk/issues/27827 and https://github.com/dart-lang/sdk/issues/27504.
2016-11-15 12:35:50 -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
Andrew Wilson fa18423ccb Add BUILD.gn for flutter_test. (#6823) 2016-11-11 14:16:12 -08:00
Dan Rubel 6331b6c8b5 revert args to 0.13.6 (#6765) 2016-11-08 17:15:11 -05:00
Matt Perry b9bff6a912 Only show the keyboard when the user explicitly focuses an Input. (#6713)
Fixes https://github.com/flutter/flutter/issues/6603
2016-11-08 14:14:15 -05:00
Adam Barth 67f591000f Mentions flutter packages get rather than pub get (#6625)
Fixes #6417
2016-11-01 13:27:06 -07:00
Adam Barth 6d99acfdde Remove dependency on package:mojo (#6413)
Fixes #5843
2016-10-20 00:15:35 -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
Adam Barth 2c21d795a4 Deploy @checked (#6244)
This patch adds `@checked` everywhere is needed to remove the
`strong_mode_invalid_method_override` strong mode error.
2016-10-07 11:27:54 -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
Ian Hickson 63e0fb1026 Prevent infinite loop in expect(). (#6203)
The only change here is that if we run off the end of the loop in a way
that previously would have just hung, we return silently.
2016-10-06 12:29:59 -07:00
Hans Muller b329894b4d Added byTooltip() to CommonFinders (#6178) 2016-10-03 12:52:06 -07:00
Ian Hickson 9e673853e5 Turn off AnimationControllers when not in use (#5902)
This requires all AnimationController objects to be given a
TickerProvider, a class that can create the Ticker.

It also provides some nice mixins for people who want to have their
State provide a TickerProvider. And a schedulerTickerProvider for those
cases where you just want to see your battery burn.

Also, we now enforce destruction order for elements.
2016-09-26 10:57:10 -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
Devon Carew 8755e569ca suppress pub override warning; decouple the analyzer versions (#5991)
* suppress warning; decouple the analyzer versions

* also pass in --no-packages-dir
2016-09-22 07:40:38 -07:00
Chinmay Garde 400585cb96 Update flutter/http.dart to use dart:io. (#5940) 2016-09-20 14:17:33 -07:00
Phil Quitslund 2d4d171338 Roll to Dart SDK 1.20.0-dev.5.0. (#5911)
* Roll to Dart SDK `1.20.0-dev.5.0`.

* bumps to `1.20.0-dev.5.0`.
* updates `analyzer` API use.

* Add explicit types.
2016-09-16 16:30:34 -07:00
Phil Quitslund fffde14f64 Update tools to use analyzer from vended Dart SDK. (#5900)
* Update tools to use `analyzer` from vended Dart SDK.

* updates `flutter_tools` and `flutter_test` to use the SDK-vended `analyzer` package
* tweaks dependency tracking logic to only record the SDK-vended `analyzer` so as not to crash on spurious conflicts (due to transitive dependencies)

* Review fixes.
2016-09-16 11:06:17 -07:00
Adam Barth 179ea4a0a6 Update framework to account from engine API changes (#5887)
The engine now reports coordinates in physical pixels.
2016-09-15 13:13:42 -07:00
Ian Hickson 5bc8888e7d Make tests more realistic (#5762)
Previously, pumpWidget() would do a partial pump (it didn't trigger
Ticker callbacks or post-frame callbacks), and pump() would do a full
pump. This patch brings them closer together. It also makes runApp run a
full actual frame, rather than skipping the transient callback part of
the frame logic. Having "half-frames" in the system was confusing and
could lead to bugs where code expecting to run before the next layout
pass didn't because a "half-frame" ran first.

Also, make Tickers start ticking in the frame that they were started in,
if they were started during a frame. This means we no longer spin a
frame for t=0, we jump straight to the first actual frame.

Other changes in this patch:

* rename WidgetsBinding._runApp to WidgetsBinding.attachRootWidget, so
  that tests can use it to more accurately mock out runApp.

* allow loadStructuredData to return synchronously.

* make handleBeginFrame handle not being given a time stamp.

* make DataPipeImageProvider.loadAsync protected (rather than private),
  and document it. There wasn't really a reason for it to be private.

* fix ImageConfiguration.toString.

* introduce debugPrintBuildScope and debugPrintScheduleBuildForStacks,
  which can help debug problems with widgets getting marked as dirty but
  not cleaned.

* make debugPrintRebuildDirtyWidgets say "Building" the first time and
  "Rebuilding" the second, to make it clearer when a widget is first
  created. This makes debugging widget lifecycle issues much easier.

* make debugDumpApp more resilient.

* debugPrintStack now takes a label that is printed before the stack.

* improve the banner shown for debugPrintBeginFrameBanner.

* various and sundry documentation fixes
2016-09-08 13:54:21 -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
Ian Hickson 99a9bbbe7c Add a test for 5630 (#5768)
This issue got fixed by a recent check-in, but I had a test specifically
for this incarnation so we should probably keep it just in case.

Closes https://github.com/flutter/flutter/issues/5630
2016-09-08 12:14:24 -07:00
Ian Hickson 1f15e06e45 Handle stateful widgets in layout builders. (#5752)
Previously, if a StatefulWidget was marked dirty, then removed from the
build, then reinserted using the exact same widget under a widget under
a LayoutBuilder, it wouldn't rebuild.

This fixes that.

It also introduces an assert that's supposed to catch SizeObserver-like
behaviour. Rather than make this patch even bigger, I papered over two
pre-existing bugs which this assert uncovered (and fixed the other
problems it found):

   https://github.com/flutter/flutter/issues/5751
   https://github.com/flutter/flutter/issues/5749

We should fix those before 1.0 though.
2016-09-07 14:45:19 -07:00
Ian Hickson 1152fd60f6 Adds tester.pumpUntilNoTransientCallbacks (#5696)
Fixes https://github.com/flutter/flutter/issues/5234
2016-09-01 12:42:38 -07:00