Commit graph

1182 commits

Author SHA1 Message Date
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
Hixie 5810cd80bd Avoid 'as' keyword
It has performance implications in release mode.

We'll enable the lint once https://github.com/dart-lang/linter/issues/195 is fixed.
2016-03-09 15:00:55 -08:00
Adam Barth 0d7b0f9ec1 Test harness should check for running Timers and AnimationControllers
After running a widget test, we now clear out the widget tree and check that we
didn't leak any timers or animations.

Also, fix several bugs that this addtional check revealed.

Fixes #2481
2016-03-09 13:37:24 -08:00
Ian Hickson 826b13bde3 Include more details in the Red Box of Doom 2016-03-06 23:00:03 -08:00
krisgiesing 1655ca800a Merge pull request #2405 from krisgiesing/scaling_test
Add tests for AssetVendor and resolution-dependent image loading
2016-03-03 20:48:12 -08:00
Kris Giesing 390fcd9931 Fix code style 2016-03-03 17:07:14 -08:00
Kris Giesing fca41bc2c5 Add tests for AssetVendor and resolution-dependent image loading
Fixes #2198
2016-03-03 16:51:42 -08:00
Adam Barth 41cdd600df Remove test dependency from package:flutter
The mojo_sdk has cleaned up its dependencies, so we no longer need to depend on
package:test from package:flutter.
2016-03-03 12:26:58 -08:00
Adam Barth 932b09c33a Merge pull request #2048 from abarth/test2
Switch from hack_load_vm_file_hook to PlatformPlugin
2016-03-03 12:11:53 -08:00
Adam Barth 96ec5316b8 Switch from hack_load_vm_file_hook to PlatformPlugin
This patch switches us from using our previous hacking approach to integrating
with package:test to using the new PlatformPlugin interface.
2016-03-03 11:23:36 -08:00
Adam Barth 00a00deffc Add a test for icon opacity crash
Fixes #2361
2016-03-03 10:33:57 -08:00
Hixie f808055756 Remove size observers from scrollables.
Also:
 - add operator==/hashCode/toString to ViewportDimensions
 - add toString to BindingBase
 - add toString and debugFillDescription to ScrollBehavior
 - fix a bug in the RawGestureDetectorState's replaceGestureRecognizers
 - rename MixedViewport's onExtentsUpdate to onExtentChanged
 - replace ExtentsUpdateCallback with ValueChanged<double>
 - remove a microtask for dispatching scroll start, since it
   did not appear to have any purpose
 - added dartdocs to Instrumentation until I understood it
 - made all event dispatch in Instrumentation drain microtasks
2016-02-25 10:55:12 -08:00
Adam Barth 1484add104 Add TestGesture
This helper makes it easier to write correct tests that involve
gestures.

Fixes #1855
2016-02-21 14:32:58 -08:00
Ian Hickson 3eb1b412e0 Fix color of icons in drawers in dark theme.
This makes it match the material spec more.
https://www.google.com/design/spec/style/icons.html

Fixes https://github.com/flutter/flutter/issues/1357
2016-02-13 17:10:10 -08:00
Ian Hickson a94999ba50 Clean up imports and exports.
Each layer is supposed to reexport the parts of the previous layer
that are part of its API.

- In painting.dart, export from dart:ui all the Canvas-related APIs
  that make sense to be used at higher levels, e.g. PaintingStyle.

- Delete painting/shadows.dart. It was dead code.

- In rendering/object.dart, export all of painting.dart.

- In widgets/basic.dart, export all of painting.dart and
  animation.dart. Some classes in animation/ are renamed to make this
  less disruptive and confusing to the namespace.

- Split out Stocks back into an import model rather than a part model,
  so that it's easier to manage its dependencies on a per-file basis.

- Move Ticker to scheduler library.

- Remove as many redundant imports as possible now.

- Some minor nit picking cleanup in various files.
2016-02-11 00:06:23 -08:00
Adam Barth b303e3db48 Move ServiceMocker into flutter_test
People writing their own tests will want to mock services as well.
2016-02-03 10:46:19 -08:00
Hans Muller 5ae1b41ca4 Added TwoLevelList 2016-01-21 16:27:18 -08:00
Eric Seidel 1bde1e7939 Generate docs for more of our packages
I also stopped pushing docs to domokit.org I presume we
were doing that to not break old links.  @abarth

@sethladd
2015-12-18 08:52:05 -08:00
Hixie 7a12d70df2 Fix build breakage 2015-12-14 14:31:56 -08:00
Eric Seidel 3053c0ad72 Split out Instrumentation logic from WidgetTester
This will allow writing tests/benchmark which want to use
the engine's default beginFrame and normal passage of time.

@Hixie
2015-12-14 13:54:15 -08:00
Ian Hickson ade93651ac Refactor bindings. 2015-12-13 23:34:41 -08:00
Jason Simmons cb6eef70e8 Upgrade the test package (needed by the latest mojo roll) 2015-12-10 16:25:12 -08:00
Eric Seidel 09894ec50b Add a test to stocks for changing the locale
I had to add a setLocale method to WidgetTester and
split the code in FlutterBinding which handled locale
changes to allow me to dispatch a locale change w/o actually
changing what the c++ code reports as the locale.

Also added the test to Travis.

@abarth @jason-simmons
2015-12-08 16:16:24 -08:00
Ian Hickson f162555648 PointerInput refactor
Instead of PointerInputEvent having a "type" field, we now have a
different class for each pointer type.

This has ripple effects throughout the system.

I also did code cleanup in affected files while I was there.
2015-12-04 22:42:38 -08:00
Hixie df07a69b12 Let MaterialApp.onGenerateRoute return a Route
Also:
 - minor code reindents in places.
 - reset the widget tree between tests.
 - once you generate a route, don't let its builder change
   (previously it would keep changing as the routes table changed).
 - revert the stocks app toolbar-fading-on-forward-transition thing.
2015-12-03 14:21:38 -08:00
Florian Loitsch 728211526a Rename some of the functions from the scheduler.
The names are probably less familiar, but more consistent:
- FrameCallback: a callback that is relative to the frame and wants the
  frame offset (a duration) as argument.
- addXFrameCallback: adds the given callback to the internal lists/maps.
- scheduleXFrameCallback (currently only X = ""): add the callback, but
  also trigger a new frame.
- handleX: the method that is invoked when the event-loop or the frame
  calls into the scheduler.
- ensureXYZ: ensure that the callback happens.
  Unfortunately there is the ambiguity between a "callback": it can be a
  closure, or the action of doing a callback, so we end up with:
  ensureBeginFrameCallback, and ensureEventLoopCallback, where
  "callback" means the action of being called back.
2015-12-02 15:37:11 -08:00
Florian Loitsch 018bcbf2d9 Remove animation scheduler. 2015-12-01 20:36:52 -08:00
Adam Barth f41869f639 Update package:test to the latest version 2015-11-30 18:41:10 -08:00
Adam Barth 58f056da68 Pin package:test to an exact revision
We use a number of non-public APIs in the test package, which makes our
dependency quite fragile. This patch pins a specific, known-good version. We
should update to the lastest version in a follow-up patch.
2015-11-24 09:22:11 -08:00
Adam Barth 727ce65ffc Add package:flutter_test
This package contains WidgetTester, which is very useful when writing tests for
widgets.
2015-11-23 14:09:12 -08:00