diff --git a/packages/flutter_tools/bin/fuchsia_tester.dart b/packages/flutter_tools/bin/fuchsia_tester.dart index 2182f6be3c4..aaa0f36c72e 100644 --- a/packages/flutter_tools/bin/fuchsia_tester.dart +++ b/packages/flutter_tools/bin/fuchsia_tester.dart @@ -121,7 +121,6 @@ Future run(List args) async { watcher: collector, ipv6: false, enableObservatory: collector != null, - previewDart2: true, precompiledDillPath: dillFile.path, concurrency: math.max(1, platform.numberOfProcessors - 2), ); diff --git a/packages/flutter_tools/lib/src/commands/test.dart b/packages/flutter_tools/lib/src/commands/test.dart index 4bace50e995..170f7e84df0 100644 --- a/packages/flutter_tools/lib/src/commands/test.dart +++ b/packages/flutter_tools/lib/src/commands/test.dart @@ -167,7 +167,6 @@ class TestCommand extends FlutterCommand { startPaused: startPaused, ipv6: argResults['ipv6'], machine: machine, - previewDart2: true, trackWidgetCreation: argResults['track-widget-creation'], updateGoldens: argResults['update-goldens'], concurrency: jobs, diff --git a/packages/flutter_tools/lib/src/test/flutter_platform.dart b/packages/flutter_tools/lib/src/test/flutter_platform.dart index 2ca065d1f16..1722b2a5b61 100644 --- a/packages/flutter_tools/lib/src/test/flutter_platform.dart +++ b/packages/flutter_tools/lib/src/test/flutter_platform.dart @@ -68,7 +68,6 @@ void installHook({ bool enableObservatory = false, bool machine = false, bool startPaused = false, - bool previewDart2 = true, int port = 0, String precompiledDillPath, bool trackWidgetCreation = false, @@ -88,7 +87,6 @@ void installHook({ startPaused: startPaused, explicitObservatoryPort: observatoryPort, host: _kHosts[serverType], - previewDart2: previewDart2, port: port, precompiledDillPath: precompiledDillPath, trackWidgetCreation: trackWidgetCreation, @@ -339,7 +337,6 @@ class _FlutterPlatform extends PlatformPlugin { this.startPaused, this.explicitObservatoryPort, this.host, - this.previewDart2, this.port, this.precompiledDillPath, this.trackWidgetCreation, @@ -354,7 +351,6 @@ class _FlutterPlatform extends PlatformPlugin { final bool startPaused; final int explicitObservatoryPort; final InternetAddress host; - final bool previewDart2; final int port; final String precompiledDillPath; final bool trackWidgetCreation; @@ -447,15 +443,13 @@ class _FlutterPlatform extends PlatformPlugin { printTrace('test $ourTestCount: starting shell process'); - // [precompiledDillPath] can be set only if [previewDart2] is [true]. - assert(precompiledDillPath == null || previewDart2); // If a kernel file is given, then use that to launch the test. // Otherwise create a "listener" dart that invokes actual test. String mainDart = precompiledDillPath != null ? precompiledDillPath : _createListenerDart(finalizers, ourTestCount, testPath, server); - if (previewDart2 && precompiledDillPath == null) { + if (precompiledDillPath == null) { // Lazily instantiate compiler so it is built only if it is actually used. compiler ??= new _Compiler(trackWidgetCreation, projectRootDirectory); mainDart = await compiler.compile(mainDart); @@ -705,10 +699,6 @@ class _FlutterPlatform extends PlatformPlugin { } String _getBundlePath(List<_Finalizer> finalizers, int ourTestCount) { - if (!previewDart2) { - return null; - } - if (precompiledDillPath != null) { return artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath); } diff --git a/packages/flutter_tools/lib/src/test/runner.dart b/packages/flutter_tools/lib/src/test/runner.dart index 0ecdf3e8f70..71652c6caf1 100644 --- a/packages/flutter_tools/lib/src/test/runner.dart +++ b/packages/flutter_tools/lib/src/test/runner.dart @@ -4,7 +4,6 @@ import 'dart:async'; -import 'package:args/command_runner.dart'; import 'package:meta/meta.dart'; import 'package:test/src/executable.dart' as test; // ignore: implementation_imports @@ -29,20 +28,12 @@ Future runTests( bool startPaused = false, bool ipv6 = false, bool machine = false, - bool previewDart2 = true, String precompiledDillPath, bool trackWidgetCreation = false, bool updateGoldens = false, TestWatcher watcher, @required int concurrency, }) async { - if (trackWidgetCreation && !previewDart2) { - throw new UsageException( - '--track-widget-creation is valid only when previewDart2 is specified.', - null, - ); - } - // Compute the command-line arguments for package:test. final List testArgs = []; if (!terminal.supportsColor) { @@ -83,7 +74,6 @@ Future runTests( machine: machine, startPaused: startPaused, serverType: serverType, - previewDart2: previewDart2, precompiledDillPath: precompiledDillPath, trackWidgetCreation: trackWidgetCreation, updateGoldens: updateGoldens,