Commit graph

618 commits

Author SHA1 Message Date
Jonah Williams 7bc4074ff3
use dpr and window size from binding (#39577) 2019-09-01 23:57:32 -07:00
Phil Quitslund 37846b032f
migrate from slow async io calls (#39515)
* migrate from slow async io calls
2019-08-29 16:47:10 -07:00
liyuqian 6ef80b447f
Replace deprecated onReportTimings w/ frameTimings (#38861)
This is the continuation of https://github.com/flutter/engine/pull/11041 and https://github.com/flutter/flutter/pull/38574

This is not a breaking change as we're not removing `onReportTimings` API.
We're simply removing the use of it in our framework.
2019-08-28 15:25:06 -07:00
adazh 5667b78291
Added a Driver wait condition for no pending platform messages (#39196) 2019-08-27 14:26:31 -07:00
Shi-Hao Hong 3b7410476f
Add MediaQuery.systemGestureInsets to support Android Q (#37416)
* Wire Window.systemGestureInsets to MediaQuery.systemGestureInsets

* Add systemGestureInsets property to TestWindow
2019-08-22 00:34:11 -04:00
Chris Bracken ffa3785411
Update package versions to latest (#39013)
This fixes a breakage in fuchsia where package_config version 1.1.0 is
required but flutter_tools is currently locked to 1.05.
2019-08-21 19:15:33 -07:00
adazh 93c32c4ff6
Moved the default BinaryMessenger instance to ServicesBinding (#38464)
* Moved the default BinaryMessenger instance to ServicesBinding

This reverts commit 821602aef3.

* Added assertion in defaultBinaryMessenger. Also fixed the devicelab tests.
2019-08-21 16:47:42 -07:00
Chris Bracken a093b98060
Update BUILD.gn for package:flutter_test (#38916)
Syncs the BUILD.gn with pubspec.yaml for package:test. This fixes a
breakage in the Fuchsia tree.
2019-08-20 15:10:23 -07:00
James D. Lin b2f8d3a668
Instrument pending timers in tests (#37646)
Flutter widget tests assert if a test completes with timers still
pending.  However, it can be hard to diagnose where a pending timer
came from.  For example, a widget might consume a third-party library
that internally uses a timer.

I added a FakeAsync.pendingTimersDebugInfo getter to quiver
(https://github.com/google/quiver-dart/pull/500).  Make flutter_test
use it.

Additionally modify Flutter's debugPrintStack to take an optional
StackTrace argument instead of always printing StackTrace.current.

Fixes #4237.
2019-08-20 10:28:49 -07:00
Kaushik Iska d2bc74aa6d
Fix analyzer issues for onReportTiming to frameTiming (#38840)
Filed: https://github.com/flutter/flutter/issues/38838
to track these usages.

This was introduced by: https://github.com/flutter/engine/pull/11041
2019-08-19 14:56:22 -07:00
Kate Lovett 6ff212b328
Comparing pixels instead of bytes with GoldenFileComparator (#38473) 2019-08-19 09:06:22 -07:00
Yegor 34c692659e
Teach render objects to reuse engine layers (#36402)
Teach Layer and its implementations, RenderObject and its implementations, and PaintingContext to reuse engine layers. The idea is that a concrete RenderObject creates a Layer and holds on to it as long as it needs it (i.e. when it is composited, and the layer type does not change). In return, each Layer object holds on to an EngineLayer and reports it to the engine via addRetained and oldLayer. This allows the Web engine to reuse DOM elements across frames. Without it, each frame drops all previously rendered HTML and regenerates it from scratch.
2019-08-16 15:27:12 -07:00
Kate Lovett cac8fa5da0
Re-land 'Adding physicalDepth to MediaQueryData & TestWindow' (#38546) 2019-08-16 13:34:23 -07:00
Nurhan Turgut c2e2f093ec
Navigator change backup (#38494)
* Broadcasting popRoute and pushRoute methods via SystemChannels.navigation. These messages will be used in flutter_web to detect the route

* Broadcasting popRoute and pushRoute methods via SystemChannels.navigation. These messages will be used in flutter_web to detect the route

* Reverting all unrelated formatting changes.

* Adding unit tests. Adding more comments.

* Changing string method names with constant strings.

* Fixing a constant strings.

* Fixing analyzer error.

* Fixing more white space.

* Changing the method names. Adding comments to the SystemChannels

* Comment and code name fixes

* replacing the comment with reviewer suggestion.

* addinf systemchannels.navigation mock to test bindings

* Adding a new class for sending route change notrifications. The nottifications are only sent on web. This should fix breaking android/ios

* using new class RouteNotificationMessages in navigator

* Fixing analyzer issues.

* fixing cycle dependency

* fixing github analyze error

* dartfmt two new classes. trying to fix anayze errors

* Update route_notification_messages.dart

* trying to fix white space errors
2019-08-16 13:17:45 -07:00
Emmanuel Garcia 83a8a575ee
Update dependencies (#37971) 2019-08-10 12:38:20 -07:00
Michael Klimushyn 821602aef3
Revert "Moved the default BinaryMessenger instance to ServicesBinding (#37489)" (#37983)
This reverts commit 92ef2b9ce1.

This requires either runApp() or
WidgetsFlutterBinding.ensureInitialized() to have been called before
using any MethodChannels. Plugins broadly rely on MethodChannels and
right now there's no general requirements that they be constructed
within the runApp call, so the ecosystem breakages from this are broader
than originally thought. Reverting for now.
2019-08-09 16:30:30 -07:00
Kate Lovett f3dbefd3ce
Revert "Adding physicalDepth to MediaQueryData & TestWindow (#37718)" (#37938)
This reverts commit 3a2d30813a.
2019-08-09 12:58:59 -07:00
adazh 92ef2b9ce1
Moved the default BinaryMessenger instance to ServicesBinding (#37489) 2019-08-09 10:13:40 -07:00
Jonah Williams ba8f0bbb0d
remove references to solo flag (#37856) 2019-08-08 16:37:18 -07:00
Kate Lovett 3a2d30813a
Adding physicalDepth to MediaQueryData & TestWindow (#37718) 2019-08-07 13:52:16 -07:00
Jonah Williams a785db78fb
Reland "Integrate dwds into flutter tool for web support (#34252)" (#37649)" (#37650) 2019-08-05 16:51:57 -07:00
Jonah Williams 433436e1ee
Revert "Integrate dwds into flutter tool for web support (#34252)" (#37649) 2019-08-05 15:58:04 -07:00
Jonah Williams 4ccd81199f
Integrate dwds into flutter tool for web support (#34252) 2019-08-05 12:41:58 -07:00
Dan Field 84fe2adedb
Nosuchmethod window (#37417) 2019-08-01 20:04:49 -07:00
Kate Lovett 616794fca7
Re-land "Part 1: Skia Gold Testing" (#36103) 2019-07-28 12:26:06 -07:00
Lau Ching Jun 677b7c15c3
Load assets during test from file system instead of manifest. (#36553) 2019-07-19 14:54:24 -07:00
Todd Volkert 1170105eae
flutter update-packages --force-upgrade (#36510) 2019-07-18 22:21:58 -07:00
Mouad Debbar 9c9b71a0fb
Add multi-line flag to semantics (#36297) 2019-07-18 10:36:22 -07:00
chunhtai 1166015931
Enable widget load assets in its own package in test (#35991) 2019-07-16 09:47:42 -07:00
Kate Lovett 8809f698cb
Revert "Part 1: Skia Gold Testing (#33688)" (#36094)
This reverts commit eb0b179028.
Skia Gold post-submit test were failing due to the service account not being found on Cirrus.
2019-07-12 13:35:36 -07:00
Kate Lovett eb0b179028
Part 1: Skia Gold Testing (#33688)
* Fresh PR for Gold integration.

* Nits

* WIP

* Artifacts from merge

* Changed some platform dependencies for web, added library prefix notation for Skia Gold test names.

* Updating for CI implementation

* Write out service account

* Writing to skip out

* WIP

* ++

* Fixing depot tools deps

* Windows depot_tools

* Fixing setup scripts

* ++

* depot tools

* ++

* WIP

* Tracing depot_tools clone

* WIP

* ++

* analyzer

* WIP

* chrome typo

* copy artifact

* Working on tests

* Code cleanup

* ++

* Code cleanup, updated tests

* ++ review feedback

* Review

* Analyzer

* Review feedback

* Nits from review

* PRogress

* ++

* Fixing tests

* ++

* Testing repo route

* Just needing documention around new structures.

* cleanup

* Analyzer

* Documentation updates

* Documentation updates

* Cirrus updates

* cirrus nit

* Review feedback

* Review feedback

* Fixing skip comparator

* Fix base directory for Skia Gold case

* ++

* Feedback

* ++

* Fixed uri assertion

* Made GoldensClient abstract, altered SkiaGoldClient constructor

* Analyzer
2019-07-12 12:23:04 -07:00
Shi-Hao Hong 2ba85a22dd
Simple Doc Fixes (#35743)
* Fix "the a" typos

* Rephrase global key API doc description
2019-07-08 10:42:08 -07:00
Jonah Williams 93edc014ae
update packages (#35573) 2019-07-04 11:26:19 -07:00
Alexandre Ardhuin 758009ba70
more ui-as-code (#35393)
* more ui-as-code

* address review comments
2019-07-02 21:11:56 +02:00
Dan Field 3eb40925e5
Always test semantics (#35110)
Default `semanticsEnabled` to true for `testWidgets` and fix associated bugs
2019-06-28 12:40:23 -07:00
Tong Mu 94dbdcba73
benchmarkWidgets.semanticsEnabled default false. (#35280)
In order not to break existing benchmarks.
2019-06-28 11:03:16 -07:00
David Shuckerow df6e4d4872
Make it possible to override the FLUTTER_TEST env variable (#34301)
* Make it possible to override the FLUTTER_TEST env variable without unsetting it.

* Switch to using platform instead of Platform.

* Document the bindings, and introduce tests that initialize multiple WidgetsBindings with different environments.

* Add tests for the flutter platform test.

* Add license headers

* Fix lints

* Remove trailing whitespace

* Respond to Jonahs comments

* Respond to Ians comments

* Mock out the HttpServer in flutter_platform_test

* Mock out the HttpServer in flutter_platform_test

* Explain why we mock out the HttpServer in flutter_platform_test
2019-06-28 10:37:27 -07:00
Tong Mu 03ed06f44d
New benchmark: Gesture semantics (#35232)
* Add semanticsEnabled to widgetBenchmark
* Add button_matrix_app and gesture benchmark
2019-06-28 00:37:01 -07:00
Todd Volkert 04e2f22650
Force-upgrade package deps (#35206) 2019-06-27 14:02:23 -07:00
Todd Volkert d2c2f4c66b
More HttpClientResponse Uint8List fixes (#35143)
Follow-on change to https://github.com/flutter/flutter/pull/34863 (see that change
for context), whereby we ensure that we're properly dealing in `Uint8List`.

These necessary changes would have been caught by disabling implicit casts
in our analysis options.

dart-lang/sdk#36900
https://github.com/flutter/flutter/issues/13815
2019-06-26 16:11:04 -07:00
Alexandre Ardhuin c7408be181
prepare for lint update of prefer_final_fields (#35059) 2019-06-25 19:39:34 +02:00
Todd Volkert e8270ff661
Prepare for HttpClientResponse Uint8List SDK change (#34863)
* Prepare for HttpClientResponse Uint8List SDK change

An upcoming change in the Dart SDK will change `HttpClientResponse`
from implementing `Stream<List<int>>` to instead implement
`Stream<Uint8List>`.

This forwards-compatible change to `_MockHttpClientResponse` is being
made to allow for a smooth rollout of that SDK breaking change. The
current structure of the class is as follows:

```dart
_MockHttpClientResponse extends Stream<List<int>> implements HttpClientResponse {
  ...
}
```

This structure would require that the Dart SDK change land atomically
a change to the class (`extends Stream<Uint8List>`). This atomic landing
requirement doesn't play well at all with Flutter's roll model vis-a-vis
the Dart SDK's roll model to Google's internal repo.  As such, this commit
changes the structure of `_MockHttpClientResponse` to be:

```dart
_MockHttpClientResponse implements HttpClientResponse {
  final Stream<Uint8List> _delegate;

  ...
}
```

Once the Dart SDK change has fully rolled out, we can simplify this class
back to its former structure.

https://github.com/dart-lang/sdk/issues/36900

* Review comment
2019-06-21 17:01:32 -07:00
chunhtai c8c20fbc1f
add read only semantics flag (#34683) 2019-06-19 14:41:44 -07:00
LongCatIsLooong 2602119194
Cupertino text edit tooltip rework (#34095) 2019-06-18 18:29:10 -07:00
Kate Lovett 7d95e8e0c1
Splitting golden file versioning out as an argument of matchesGoldenFile (#33880)
* Splitting golden file versioning out as an argument of matchesGoldenFile

* Fixing description implementation.

* Removing unused imports

* Removing unused import

* Review feedback
2019-06-18 11:32:13 -07:00
Ian Hickson f31fc1bd0f More removing of timeouts. (#33932) 2019-06-12 23:12:35 -07:00
Todd Volkert 8163c0aebb
Re-apply compressionState changes. (#34341)
This re-applies the changes that were made in #33697 and #33729,
but which were reverted in #33792 and #33790, respectively due to
the Dart SDK not having received the update within Google yet.
The SDK has now rolled, so these changes can be re-applied.

https://github.com/flutter/flutter/issues/32374
https://github.com/flutter/flutter/issues/33791
2019-06-12 13:47:47 -07:00
Jonah Williams 42a14b5891
Compatibility pass on flutter/foundation tests for JavaScript compilation. (1) (#33349) 2019-06-06 21:22:00 -07:00
liyuqian 07083a51da
Manual roll the engine to land the timing API (#33989)
This will manually land https://github.com/flutter/engine/pull/8983 in
the framework.
2019-06-06 16:11:27 -07:00
sjindel-google f83df74b6b
Don't print warning message when running benchmarks test. (#33842)
# Description
Currently the benchmarks test prints a scary warning message, even when it passes, that a benchmark is being run with asserts enabled.

Normally we don't want developers to do this, because the performance of code with asserts is not characteristic of what end-users will experience. However, we need to unit-test benchmarkWidgets, so I've added a contraindicated option to suppress the warning for the test.

# Related Issues
25049 (comment)
2019-06-06 19:39:32 +02:00