diff --git a/dev/automated_tests/integration_test/license_expectation.txt b/dev/automated_tests/integration_test/license_expectation.txt deleted file mode 100644 index cda62d712cd99e..00000000000000 --- a/dev/automated_tests/integration_test/license_expectation.txt +++ /dev/null @@ -1 +0,0 @@ -[0-9]+:[0-9]+ [+]1: All tests passed! diff --git a/dev/automated_tests/integration_test/license_test.dart b/dev/automated_tests/integration_test/license_test.dart deleted file mode 100644 index b891c14ca5aa9a..00000000000000 --- a/dev/automated_tests/integration_test/license_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2014 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 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -void main() { - testWidgets('Can show the license page', (WidgetTester tester) async { - await tester.pumpWidget(const TestApp()); - await tester.pump(); - - final Finder button = find.byType(TextButton); - - await tester.tap(button); - await tester.pumpAndSettle(); - - await tester.scrollUntilVisible( - // Dart should very definitely be in the licenses list. - find.text('dart'), - 100, - maxScrolls: 200, - ); - - expect(find.text('dart'), findsOneWidget); - }); -} - -class TestApp extends StatelessWidget { - const TestApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return const MaterialApp( - home: ShowLicenseButton(), - ); - } -} - -class ShowLicenseButton extends StatelessWidget { - const ShowLicenseButton({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return TextButton( - onPressed: () => showLicensePage(context: context), - child: const Text( - 'Show licenses', - key: Key('show-licenses'), - ), - ); - } -} diff --git a/packages/flutter_test/lib/src/binding.dart b/packages/flutter_test/lib/src/binding.dart index e9eacd1f374c9c..8300c5925e94aa 100644 --- a/packages/flutter_test/lib/src/binding.dart +++ b/packages/flutter_test/lib/src/binding.dart @@ -297,6 +297,13 @@ abstract class TestWidgetsFlutterBinding extends BindingBase _testTextInput = TestTextInput(onCleared: _resetFocusedEditable); } + @override + // ignore: MUST_CALL_SUPER + void initLicenses() { + // Do not include any licenses, because we're a test, and the LICENSE file + // doesn't get generated for tests. + } + /// Whether there is currently a test executing. bool get inTest; @@ -898,13 +905,6 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding { binding.mockFlutterAssets(); } - @override - // ignore: MUST_CALL_SUPER - void initLicenses() { - // Do not include any licenses, because we're a test, and the LICENSE file - // doesn't get generated for tests. - } - FakeAsync? _currentFakeAsync; // set in runTest; cleared in postTest Completer? _pendingAsyncTasks; diff --git a/packages/flutter_tools/test/integration.shard/test_test.dart b/packages/flutter_tools/test/integration.shard/test_test.dart index c04bd9688ace6a..d7575e2056a27e 100644 --- a/packages/flutter_tools/test/integration.shard/test_test.dart +++ b/packages/flutter_tools/test/integration.shard/test_test.dart @@ -209,10 +209,6 @@ void main() { } expect(result.exitCode, 0); }); - - testWithoutContext('integration test can show the license page', () async { - return _testFile('license', automatedTestsDirectory, integrationTestDirectory, exitCode: isZero, extraArguments: integrationTestExtraArgs); - }); } Future _testFile(