- 09 Jan, 2018 1 commit
-
-
Ian Hickson authored
-
- 08 Dec, 2017 1 commit
-
-
Ian Hickson authored
Also: * Remove find.byIcon since it's identical to find.icon. (I sent mail to flutter-dev about this.) * Fix IconData's operator== and hashCode, which had not been updated when we added fields. * Add the byTooltip finder to the list of suggested finders. * Make the suggested Key finder prettier.
-
- 17 Nov, 2017 1 commit
-
-
Ian Hickson authored
-
- 31 Oct, 2017 1 commit
-
-
Ian Hickson authored
-
- 29 Sep, 2017 1 commit
-
-
gspencergoog authored
* Fixing docs for testWidgets. No functionality change.
-
- 21 Sep, 2017 1 commit
-
-
Alexandre Ardhuin authored
-
- 05 May, 2017 1 commit
-
-
Ian Hickson authored
-
- 02 May, 2017 1 commit
-
-
Ian Hickson authored
This splits the frame pipeline into two, beginFrame and drawFrame. As part of making this change I added some debugging hooks that helped debug the issues that came up: * I added debugPrintScheduleFrameStacks which prints a stack whenever a frame is actually scheduled, so you can see why frames are being scheduled. * I added some toString output to EditableText and RawKeyboardListener. * I added a scheduler_tester.dart library for scheduler library tests. * I changed the test framework to flush microtasks before pumping. * Some asserts that had the old string literal form were replaced by asserts with messages. I also fixed a few subtle bugs that this uncovered: * setState() now calls `ensureVisualUpdate`, rather than `scheduleFrame`. This means that calling it from an AnimationController callback does not actually schedule an extra redundant frame as it used to. * I corrected some documentation.
-
- 14 Apr, 2017 1 commit
-
-
Hans Muller authored
-
- 12 Apr, 2017 2 commits
-
-
Ian Hickson authored
* 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
-
Ian Hickson authored
* Fix tests to use Ahem, and helpful changes around that - Fix fonts that had metric-specific behaviours. - LiveTestWidgetsFlutterBinding.allowAllFrames has been renamed to LiveTestWidgetsFlutterBinding.framePolicy. - LiveTestWidgetsFlutterBinding now defaults to using a frame policy that pumps slightly more frames, to animate the pointer crosshairs. - Added "flutter run --use-test-fonts" to enable Ahem on devices. - Changed how idle() works to be more effective in live mode. - Display the test name in live mode (unless ahem fonts are enabled). - Added a toString to TextSelectionPoint. - Style nit fixes. * Roll engine to get Ahem changes. * Update tests for dartdoc changes. * Fix flutter_tools tests
-
- 05 Apr, 2017 1 commit
-
-
Ian Hickson authored
-
- 02 Apr, 2017 1 commit
-
-
Adam Barth authored
Also, fix an issue where hint text wasn't visible when the InputDecoration was collapsed. Fixes #8541
-
- 20 Mar, 2017 1 commit
-
-
Adam Barth authored
Fixes #4017
-
- 13 Mar, 2017 1 commit
-
-
Ian Hickson authored
-
- 04 Mar, 2017 1 commit
-
-
Chris Bracken authored
-
- 23 Feb, 2017 1 commit
-
-
Phil Quitslund authored
* 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.
-
- 18 Feb, 2017 1 commit
-
-
Todd Volkert authored
-
- 08 Feb, 2017 1 commit
-
-
Adam Barth authored
Tabs are now fully driven by slivers.
-
- 07 Feb, 2017 1 commit
-
-
Hans Muller authored
-
- 22 Jan, 2017 1 commit
-
-
Ian Hickson authored
-
- 12 Jan, 2017 1 commit
-
-
Adam Barth authored
Also, fix a few minor bugs found by the test.
-
- 08 Nov, 2016 1 commit
-
-
Matt Perry authored
Fixes https://github.com/flutter/flutter/issues/6603
-
- 26 Sep, 2016 1 commit
-
-
Ian Hickson authored
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.
-
- 08 Sep, 2016 1 commit
-
-
Ian Hickson authored
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
-
- 01 Sep, 2016 1 commit
-
-
Ian Hickson authored
Fixes https://github.com/flutter/flutter/issues/5234
-
- 29 Aug, 2016 1 commit
-
-
Ian Hickson authored
Fixes https://github.com/flutter/flutter/issues/5283 Other changes in this patch: Rename OffStage to Offstage. Fixes https://github.com/flutter/flutter/issues/5378 Add a lot of docs. Some minor punctuation and whitespace fixes.
-
- 11 Aug, 2016 1 commit
-
-
Ian Hickson authored
Changes in this patch: - iOS now uses a different scrollDrag constant than Android. - ScrollConfigurationDelegate now knows about target platforms. - ScrollBehaviors now know about target platforms. - RawInputLine now has to be told what platform it's targetting. - PageableList now has a concept of target platform. - make debugPrintStack filter its stack. - move debugPrintStack to `assertions.dart`. - add support for limiting the number of frames to debugPrintStack. - make defaultTargetPlatform default to android in test environments. - remove OverscrollStyle and MaterialApp's overscrollStyle argument. You can now control the overscroll style using Theme.platform. - the default scroll configuration is now private to avoid people relying on the defaultTargetPlatform getter in their subclasses (since they really should use Theme.of(context).platform). - fix some typos I noticed in some tests. - added a test for flinging scrollables, that checks that the behavior differs on the two target platforms. - made flingFrom and fling in the test API pump the frames. - added more docs to the test API. - made the TestAsyncUtils.guard() method report uncaught errors to help debug errors when using that API.
-
- 23 May, 2016 2 commits
-
-
Ian Hickson authored
-
Ian Hickson authored
Our microbenchmarks now run on real devices.
-
- 20 May, 2016 1 commit
-
-
Ian Hickson authored
-
- 18 May, 2016 1 commit
-
-
Ian Hickson authored
* Add a "build" phase to EnginePhase for completeness. * Ignore events from the device during test execution. * More dartdocs * Slightly more helpful messages about Timers in verifyInvariants. * Add widgetList, elementList, stateList, renderObjectList. * Send test events asynchronously for consistency with other APIs. * Fix a test that was depending on test events being synchronous (or rather, scheduled in a microtask that came before the microtask for the completer of the future that the tap() function returned).
-
- 16 May, 2016 1 commit
-
-
Ian Hickson authored
This makes it possible to substitute 'flutter run' for 'flutter test' and actually watch a test run on a device. For any test that depends on flutter_test: 1. Remove any import of 'package:test/test.dart'. 2. Replace `testWidgets('...', (WidgetTester tester) {` with `testWidgets('...', (WidgetTester tester) async {` 3. Add an "await" in front of calls to any of the following: * tap() * tapAt() * fling() * flingFrom() * scroll() * scrollAt() * pump() * pumpWidget() 4. Replace any calls to `tester.flushMicrotasks()` with calls to `await tester.idle()`. There's a guarding API that you can use, if you have particularly complicated tests, to get better error messages. Search for TestAsyncUtils.
-
- 04 May, 2016 1 commit
-
-
Adam Barth authored
This test hangs occationally on the bots and the bots aren't smart enough to recover, which means the whole project gets blocked. Filed #3735 about the hang.
-
- 29 Apr, 2016 1 commit
-
-
Ian Hickson authored
* 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
-
- 28 Apr, 2016 1 commit
-
-
Adam Barth authored
Related to #3608
-
- 26 Apr, 2016 1 commit
-
-
Adam Barth authored
Wait until the end of the microtask to tell gesture recognizers that they've won in the gesture arena. This lets recognizers dispose reject themselves at arbitrary times without triggering gestures in awkward call stacks. Fixes #3183
-
- 25 Apr, 2016 1 commit
-
-
Devon Carew authored
* improve text for devices * nit * tweak text
-
- 22 Apr, 2016 1 commit
-
-
Ian Hickson authored
The old names were getting silly and started stepping on valuable namespace. The new names are consistent and clear.
-
- 21 Apr, 2016 1 commit
-
-
Ian Hickson authored
This reorders some classes so that this file makes more sense, and adds a bunch of docs. It also makes the following changes: * Move allElements from Instrumentation to TestWidgets. (Instrumentation is going away.) * Remove findElements. * Rename byElement to byElementPredicate * Rename byPredicate to byWidgetPredicate * Implement _WidgetPredicateFinder so that byWidgetPredicate has good messages * Fix one use of byElementPredicate to use byWidgetPredicate.
-