From 8c10c0bddfe8188db889a3b8d766595a71f31bc9 Mon Sep 17 00:00:00 2001 From: David Iglesias Teixeira Date: Mon, 11 Nov 2024 15:41:33 -0800 Subject: [PATCH 1/3] [ci] Stop using the web-renderer option. --- .../tool/lib/src/drive_examples_command.dart | 7 +-- .../test/drive_examples_command_test.dart | 63 ------------------- 2 files changed, 1 insertion(+), 69 deletions(-) diff --git a/script/tool/lib/src/drive_examples_command.dart b/script/tool/lib/src/drive_examples_command.dart index 8ae12485602..1b2cf4b809b 100644 --- a/script/tool/lib/src/drive_examples_command.dart +++ b/script/tool/lib/src/drive_examples_command.dart @@ -129,12 +129,7 @@ class DriveExamplesCommand extends PackageLoopingCommand { '--web-port=7357', '--browser-name=chrome', if (useWasm) - '--wasm' - // TODO(dit): Clean this up, https://github.com/flutter/flutter/issues/151869 - else if (platform.environment['CHANNEL']?.toLowerCase() == 'master') - '--web-renderer=canvaskit' - else - '--web-renderer=html', + '--wasm', if (platform.environment.containsKey('CHROME_EXECUTABLE')) '--chrome-binary=${platform.environment['CHROME_EXECUTABLE']}', ], diff --git a/script/tool/test/drive_examples_command_test.dart b/script/tool/test/drive_examples_command_test.dart index a1d48865bc4..ac1b8709a9d 100644 --- a/script/tool/test/drive_examples_command_test.dart +++ b/script/tool/test/drive_examples_command_test.dart @@ -759,7 +759,6 @@ void main() { 'web-server', '--web-port=7357', '--browser-name=chrome', - '--web-renderer=canvaskit', '--screenshot=/path/to/logs/plugin_example-drive', '--driver', 'test_driver/integration_test.dart', @@ -822,61 +821,6 @@ void main() { ])); }); - // TODO(dit): Clean this up, https://github.com/flutter/flutter/issues/151869 - test('drives a web plugin (html renderer in stable)', () async { - // Override the platform to simulate CHANNEL: stable - mockPlatform.environment['CHANNEL'] = 'stable'; - - final RepositoryPackage plugin = createFakePlugin( - 'plugin', - packagesDir, - extraFiles: [ - 'example/integration_test/plugin_test.dart', - 'example/test_driver/integration_test.dart', - 'example/web/index.html', - ], - platformSupport: { - platformWeb: const PlatformDetails(PlatformSupport.inline), - }, - ); - - final Directory pluginExampleDirectory = getExampleDir(plugin); - - final List output = await runCapturingPrint(runner, [ - 'drive-examples', - '--web', - ]); - - expect( - output, - containsAllInOrder([ - contains('Running for plugin'), - contains('No issues found!'), - ]), - ); - - expect( - processRunner.recordedCalls, - orderedEquals([ - ProcessCall( - getFlutterCommand(mockPlatform), - const [ - 'drive', - '-d', - 'web-server', - '--web-port=7357', - '--browser-name=chrome', - '--web-renderer=html', - '--screenshot=/path/to/logs/plugin_example-drive', - '--driver', - 'test_driver/integration_test.dart', - '--target', - 'integration_test/plugin_test.dart', - ], - pluginExampleDirectory.path), - ])); - }); - test('runs chromedriver when requested', () async { final RepositoryPackage plugin = createFakePlugin( 'plugin', @@ -916,7 +860,6 @@ void main() { 'web-server', '--web-port=7357', '--browser-name=chrome', - '--web-renderer=canvaskit', '--screenshot=/path/to/logs/plugin_example-drive', '--driver', 'test_driver/integration_test.dart', @@ -969,7 +912,6 @@ void main() { 'web-server', '--web-port=7357', '--browser-name=chrome', - '--web-renderer=canvaskit', '--chrome-binary=/path/to/chrome', '--screenshot=/path/to/logs/plugin_example-drive', '--driver', @@ -1421,7 +1363,6 @@ void main() { 'web-server', '--web-port=7357', '--browser-name=chrome', - '--web-renderer=canvaskit', '--screenshot=/path/to/logs/plugin_example-drive', '--driver', 'test_driver/integration_test.dart', @@ -1437,7 +1378,6 @@ void main() { 'web-server', '--web-port=7357', '--browser-name=chrome', - '--web-renderer=canvaskit', '--screenshot=/path/to/logs/plugin_example-drive', '--driver', 'test_driver/integration_test.dart', @@ -1537,7 +1477,6 @@ void main() { 'web-server', '--web-port=7357', '--browser-name=chrome', - '--web-renderer=canvaskit', '--screenshot=/path/to/logs/a_package_example-drive', '--driver', 'test_driver/integration_test.dart', @@ -1583,7 +1522,6 @@ void main() { 'web-server', '--web-port=7357', '--browser-name=chrome', - '--web-renderer=canvaskit', '--driver', 'test_driver/integration_test.dart', '--target', @@ -1663,7 +1601,6 @@ void main() { 'web-server', '--web-port=7357', '--browser-name=chrome', - '--web-renderer=canvaskit', '--screenshot=/path/to/logs/a_package_example_with_web-drive', '--driver', 'test_driver/integration_test.dart', From c1d794d0911c2ea05ef2c3dfe8ea3e8f902a37ba Mon Sep 17 00:00:00 2001 From: David Iglesias Teixeira Date: Mon, 11 Nov 2024 15:44:25 -0800 Subject: [PATCH 2/3] dart format --- script/tool/lib/src/drive_examples_command.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script/tool/lib/src/drive_examples_command.dart b/script/tool/lib/src/drive_examples_command.dart index 1b2cf4b809b..2f134cfced8 100644 --- a/script/tool/lib/src/drive_examples_command.dart +++ b/script/tool/lib/src/drive_examples_command.dart @@ -128,8 +128,7 @@ class DriveExamplesCommand extends PackageLoopingCommand { 'web-server', '--web-port=7357', '--browser-name=chrome', - if (useWasm) - '--wasm', + if (useWasm) '--wasm', if (platform.environment.containsKey('CHROME_EXECUTABLE')) '--chrome-binary=${platform.environment['CHROME_EXECUTABLE']}', ], From d59eeae825ad91c9d65ea7acd1ff353d62cccb3b Mon Sep 17 00:00:00 2001 From: David Iglesias Teixeira Date: Mon, 11 Nov 2024 16:13:56 -0800 Subject: [PATCH 3/3] Remove web-renderer from dart test command. --- script/tool/lib/src/dart_test_command.dart | 8 ++------ script/tool/test/dart_test_command_test.dart | 5 ----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/script/tool/lib/src/dart_test_command.dart b/script/tool/lib/src/dart_test_command.dart index 224fbd010ac..716cd7fbe49 100644 --- a/script/tool/lib/src/dart_test_command.dart +++ b/script/tool/lib/src/dart_test_command.dart @@ -108,12 +108,9 @@ class DartTestCommand extends PackageLoopingCommand { platform = 'chrome'; } - // All the web tests assume the canvaskit renderer currently. - final String? webRenderer = (platform == 'chrome') ? 'canvaskit' : null; bool passed; if (package.requiresFlutter()) { - passed = await _runFlutterTests(package, - platform: platform, webRenderer: webRenderer); + passed = await _runFlutterTests(package, platform: platform); } else { passed = await _runDartTests(package, platform: platform); } @@ -122,7 +119,7 @@ class DartTestCommand extends PackageLoopingCommand { /// Runs the Dart tests for a Flutter package, returning true on success. Future _runFlutterTests(RepositoryPackage package, - {String? platform, String? webRenderer}) async { + {String? platform}) async { final String experiment = getStringArg(kEnableExperiment); final int exitCode = await processRunner.runAndStream( @@ -134,7 +131,6 @@ class DartTestCommand extends PackageLoopingCommand { // Flutter defaults to VM mode (under a different name) and explicitly // setting it is deprecated, so pass nothing in that case. if (platform != null && platform != 'vm') '--platform=$platform', - if (webRenderer != null) '--web-renderer=$webRenderer', ], workingDir: package.directory, ); diff --git a/script/tool/test/dart_test_command_test.dart b/script/tool/test/dart_test_command_test.dart index 29e1959e38e..0289ebdfb7f 100644 --- a/script/tool/test/dart_test_command_test.dart +++ b/script/tool/test/dart_test_command_test.dart @@ -331,7 +331,6 @@ test_on: vm && browser 'test', '--color', '--platform=chrome', - '--web-renderer=canvaskit', ], package.path), ]), @@ -360,7 +359,6 @@ test_on: vm && browser 'test', '--color', '--platform=chrome', - '--web-renderer=canvaskit', ], plugin.path), ]), @@ -390,7 +388,6 @@ test_on: vm && browser 'test', '--color', '--platform=chrome', - '--web-renderer=canvaskit', ], plugin.path), ]), @@ -420,7 +417,6 @@ test_on: vm && browser 'test', '--color', '--platform=chrome', - '--web-renderer=canvaskit', ], plugin.path), ]), @@ -495,7 +491,6 @@ test_on: vm && browser 'test', '--color', '--platform=chrome', - '--web-renderer=canvaskit', ], plugin.path), ]),