From ae160ec87eb5a4777d850c81974f013a9705c99d Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Tue, 17 Oct 2023 00:25:35 +0000 Subject: [PATCH] Revert "Fix `Platform.script` for flutter_tester" This reverts commit b14d3469d48c3d397f17267292cba14cac8ec12b. With https://github.com/flutter/engine/pull/46911, the Platform.script API will return a URI for the compiled temporary wrapper script generated by "flutter test". This will cause issues for tests that expect Platform.script to reflect the directory where "flutter test" was launched. --- shell/testing/tester_main.cc | 1 - testing/dart/BUILD.gn | 1 - testing/dart/platform_test.dart | 14 -------------- 3 files changed, 16 deletions(-) delete mode 100644 testing/dart/platform_test.dart diff --git a/shell/testing/tester_main.cc b/shell/testing/tester_main.cc index 8b1b49131bb75..607dc6a6a61a3 100644 --- a/shell/testing/tester_main.cc +++ b/shell/testing/tester_main.cc @@ -526,7 +526,6 @@ int main(int argc, char* argv[]) { // it as a positional argument instead. settings.application_kernel_asset = command_line.positional_args()[0]; } - settings.advisory_script_uri = settings.application_kernel_asset; if (settings.application_kernel_asset.empty()) { FML_LOG(ERROR) << "Dart kernel file not specified."; diff --git a/testing/dart/BUILD.gn b/testing/dart/BUILD.gn index f59b6166c6c64..2e1bb1ad38f67 100644 --- a/testing/dart/BUILD.gn +++ b/testing/dart/BUILD.gn @@ -38,7 +38,6 @@ tests = [ "paragraph_test.dart", "path_test.dart", "picture_test.dart", - "platform_test.dart", "platform_view_test.dart", "plugin_utilities_test.dart", "semantics_test.dart", diff --git a/testing/dart/platform_test.dart b/testing/dart/platform_test.dart deleted file mode 100644 index 5ba620ddcc567..0000000000000 --- a/testing/dart/platform_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'dart:io'; - -import 'package:litetest/litetest.dart'; - -void main() { - test('Platform.script has right URI', () async { - // Platform.script should look like file:///path/to/engine/src/out/variant/gen/platform_test.dart.dill - expect(Platform.script.path, endsWith('gen/platform_test.dart.dill')); - }); -}