fuchsia_tester.dart still assumes Dart 1. Previously, it ran tests directly
from source, flutter_platform.dart automatically runs a kernel compile when
operating in Dart 2 mode, but this assumes a functional Dart SDK is available
in the artifacts directly, and fuchsia_tester.dart mocks out the artifacts
directory with an empty temp dir.
Remaining work is:
1. Get the frontend server building as a dependency on Fuchsia.
2. Patch fuchsia_tester.dart to use a valid Dart SDK and frontend server.
This also reverts migration to Dart 2 typedef syntax.
This reverts commit 6c56bb2. (#18362)
This reverts commit 3daebd0. (#18316)
* It's time to #deleteDart1 (#18293)
Eliminates support for Dart 1 in flutter_tools, and drops our Dart 1
benchmarks. All commands now run in Dart 1 mode only.
Eliminates --preview-dart-2 / --no-preview-dart-2 support.
* Fix indentation, remove no longer necessary .toList()
* Only push udpated kernel if >0 invalidated srcs
Eliminates support for Dart 1 in flutter_tools, and drops our Dart 1
benchmarks. All commands now run in Dart 1 mode only.
Eliminates --preview-dart-2 / --no-preview-dart-2 support.
This test fails consistently on mac2 and mac3 with the attached Moto G4
devices but passes consistently on other machines.
Adding a delay of 1s right after driver.connect() in setUpAll() causes
it to pass on the machines in question, which suggests a race condition.
Specifically it looks like connect returns the moment Flutter Driver
identifies that the isolate is up and running, but empirically it looks
like we start running the first test before the UI is actually up. This
triggers a failure wherein we start looking for elements before they're
onstage.
Link to viewport.dart:213 at HEAD:
b2b4665926/packages/flutter/lib/src/widgets/viewport.dart (L213)
Stack trace:
FlutterDriver waitFor should find text "present"
```
DriverError: Error in Flutter application: Uncaught extension error while executing waitFor: NoSuchMethodError: The getter 'visible' was called on null.
Receiver: null
Tried calling: visible
#0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:46:5)
#1 _ViewportElement.debugVisitOnstageChildren. (package:flutter/src/widgets/viewport.dart:213:36)
#2 WhereIterator.moveNext (dart:_internal/iterable.dart:439:11)
#3 Iterable.forEach (dart:core/iterable.dart)
#4 _ViewportElement.debugVisitOnstageChildren (package:flutter/src/widgets/viewport.dart:214:8)
#5 _DepthFirstChildIterator._reverseChildrenOf (package:flutter_test/src/all_elements.dart:54:15)
#6 _DepthFirstChildIterator.moveNext (package:flutter_test/src/all_elements.dart:45:19)
#7 CachingIterable._fillNext (package:flutter/src/foundation/basic_types.dart:252:27)
#8 _LazyListIterator.moveNext (package:flutter/src/foundation/basic_types.dart:279:21)
#9 WhereIterator.moveNext (dart:_internal/iterable.dart:438:22)
#10 CachingIterable._fillNext (package:flutter/src/foundation/basic_types.dart:252:27)
#11 _LazyListIterator.moveNext (package:flutter/src/foundation/basic_types.dart:279:21)
#12 Iterable.isEmpty (dart:core/iterable.dart:449:33)
#13 Iterable.isNotEmpty (dart:core/iterable.dart:456:27)
#14 FlutterDriverExtension._waitForElement. (package:flutter_driver/src/extension/extension.dart:215:51)
#15 FlutterDriverExtension._waitUntilFrame (package:flutter_driver/src/extension/extension.dart:197:19)
#16 FlutterDriverExtension._waitForElement (package:flutter_driver/src/extension/extension.dart:215:11)
#17 FlutterDriverExtension._waitFor (package:flutter_driver/src/extension/extension.dart:286:11)
#18 FlutterDriverExtension.call (package:flutter_driver/src/extension/extension.dart:168:51)
#19 BindingBase.registerServiceExtension. (package:flutter/src/foundation/binding.dart:370:32)
```
Removes a previous hack that no longer appears to help (adding a 1
second delay in setUpAll() does seem to work around this issue though).
* With dart being default, move preview_dart_2 tests to dart1.
* Swap out defaults for preview-dart-2 option in tests. Make dart1 explicit
* Move suffix around
* Rename files
* Reject requests for hot reload if a hot reload is already in progress.
Fixes#14184
* Implement TODO, verifying further hot reloads complete sucessfully.
* Fix year on new file.
* Add missing type annotations to fix lints
* Add run_machine_concurrent_hot_reload to manifest for CI
* Reformat document
... but undo things that cause lints (like single-line ifs)
* Extract std stream transformations
* Make inProgressHotReload private
* Disallow all types of reload while hot reload in progress
* Simplify code handling in-progress hot reloads
* Revert "Include a directory with Flutter assets (#12944)"
This reverts commit 3af6b9cbf5.
* Revert "Upgrade project.pbxproj to include flutter_assets (#13011)"
This reverts commit 08128cb29b.
* Revert "Upgrade complex_layout project.pbxproj to include flutter_assets (#13544)"
This reverts commit 35f1a04195.
* mark complex_layout_ios__start_up as flaky
This fills out the following matrix:
App: `flutter create` default app, Complex Layout, and Gallery.
Platforms: Linux/Android, Mac/iOS, Windows/Android
Build modes: full release, aot blobs, debug
Dart: normal, 2.0 preview
It also renames all the tests that used "build" to mean compilation
build to use "compile" instead, so that it's much clearer on the
dashboard.
Also, mark some flaky tests that are no longer flaky as not flaky.
Also, remove uses of call() since that's probably going to go away at
some point.
* Clone hot reload benchmark for --preview-dart-2 option.
* Get rid of linux and win preview_dart_2 (only android would be sufficient for now). Refactor code into lib/tasks
* Revert 2016 to 2017
* Mark new test as flaky
* Revert "Revert "fire service protocol events for frames (#11565)" (#11727)"
This reverts commit f25e2f5213.
* move the postEvent() call into a separate method
- Wait for full Hot Reload
- Wait for full Restart
- Fallback if checkHealth throws METHOD_NOT_FOUND.
We try to wait for the service extensions to be registered and retry.
* fire service protocol extension events for frames
* start time in micros
* introduce a profile() function; only send frame events when in profile (or debug) modes
* moved the profile() function to foundation/profile.dart
* refactor to make the change more testable; test the change
* fire service protocol events by listening to onFrameInfo
* remove the frame event stream; add a devicelab test
* remove a todo
* final
* add Android instrumentation test
* add devicelab test
* add to manifest.yaml
* rename _smoke_test.dart to _smoketest.dart to prevent flutter test from picking it up
* volatile fields; style fixes
* use ConditionVariable; fix sh script
The main purpose of this PR is to make it so that when you set the
initial route and it's a hierarchical route (e.g. `/a/b/c`), it
implies multiple pushes, one for each step of the route (so in that
case, `/`, `/a`, `/a/b`, and `/a/b/c`, in that order). If any of those
routes don't exist, it falls back to '/'.
As part of doing that, I:
* Changed the default for MaterialApp.initialRoute to honor the
actual initial route.
* Added a MaterialApp.onUnknownRoute for handling bad routes.
* Added a feature to flutter_driver that allows the host test script
and the device test app to communicate.
* Added a test to make sure `flutter drive --route` works.
(Hopefully that will also prove `flutter run --route` works, though
this isn't testing the `flutter` tool's side of that. My main
concern is over whether the engine side works.)
* Fixed `flutter drive` to output the right target file name.
* Changed how the stocks app represents its data, so that we can
show a page for a stock before we know if it exists.
* Made it possible to show a stock page that doesn't exist. It shows
a progress indicator if we're loading the data, or else shows a
message saying it doesn't exist.
* Changed the pathing structure of routes in stocks to work more
sanely.
* Made search in the stocks app actually work (before it only worked
if we happened to accidentally trigger a rebuild). Added a test.
* Replaced some custom code in the stocks app with a BackButton.
* Added a "color" feature to BackButton to support the stocks use case.
* Spaced out the ErrorWidget text a bit more.
* Added `RouteSettings.copyWith`, which I ended up not using.
* Improved the error messages around routing.
While I was in some files I made a few formatting fixes, fixed some
code health issues, and also removed `flaky: true` from some devicelab
tests that have been stable for a while. Also added some documentation
here and there.
Adds an initial integration test that:
1. captures laid-out widget size
2. focuses a text field to show the keyboard and resize the view
3. unfocuses the text field to dismiss the keyboard and resize the view
4. verify that the final widget size matches the initial size