Skip to content

Commit 4a7b385

Browse files
authored
[ci] Remove web renderer option from tools. (flutter#8055)
Removes the `--web-renderer` option from the "drive examples" and "dart test" commands. Fixes flutter#151869
1 parent 53c1ff2 commit 4a7b385

File tree

4 files changed

+3
-81
lines changed

4 files changed

+3
-81
lines changed

script/tool/lib/src/dart_test_command.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,9 @@ class DartTestCommand extends PackageLoopingCommand {
108108
platform = 'chrome';
109109
}
110110

111-
// All the web tests assume the canvaskit renderer currently.
112-
final String? webRenderer = (platform == 'chrome') ? 'canvaskit' : null;
113111
bool passed;
114112
if (package.requiresFlutter()) {
115-
passed = await _runFlutterTests(package,
116-
platform: platform, webRenderer: webRenderer);
113+
passed = await _runFlutterTests(package, platform: platform);
117114
} else {
118115
passed = await _runDartTests(package, platform: platform);
119116
}
@@ -122,7 +119,7 @@ class DartTestCommand extends PackageLoopingCommand {
122119

123120
/// Runs the Dart tests for a Flutter package, returning true on success.
124121
Future<bool> _runFlutterTests(RepositoryPackage package,
125-
{String? platform, String? webRenderer}) async {
122+
{String? platform}) async {
126123
final String experiment = getStringArg(kEnableExperiment);
127124

128125
final int exitCode = await processRunner.runAndStream(
@@ -134,7 +131,6 @@ class DartTestCommand extends PackageLoopingCommand {
134131
// Flutter defaults to VM mode (under a different name) and explicitly
135132
// setting it is deprecated, so pass nothing in that case.
136133
if (platform != null && platform != 'vm') '--platform=$platform',
137-
if (webRenderer != null) '--web-renderer=$webRenderer',
138134
],
139135
workingDir: package.directory,
140136
);

script/tool/lib/src/drive_examples_command.dart

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,7 @@ class DriveExamplesCommand extends PackageLoopingCommand {
128128
'web-server',
129129
'--web-port=7357',
130130
'--browser-name=chrome',
131-
if (useWasm)
132-
'--wasm'
133-
// TODO(dit): Clean this up, https://github.com/flutter/flutter/issues/151869
134-
else if (platform.environment['CHANNEL']?.toLowerCase() == 'master')
135-
'--web-renderer=canvaskit'
136-
else
137-
'--web-renderer=html',
131+
if (useWasm) '--wasm',
138132
if (platform.environment.containsKey('CHROME_EXECUTABLE'))
139133
'--chrome-binary=${platform.environment['CHROME_EXECUTABLE']}',
140134
],

script/tool/test/dart_test_command_test.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ test_on: vm && browser
331331
'test',
332332
'--color',
333333
'--platform=chrome',
334-
'--web-renderer=canvaskit',
335334
],
336335
package.path),
337336
]),
@@ -360,7 +359,6 @@ test_on: vm && browser
360359
'test',
361360
'--color',
362361
'--platform=chrome',
363-
'--web-renderer=canvaskit',
364362
],
365363
plugin.path),
366364
]),
@@ -390,7 +388,6 @@ test_on: vm && browser
390388
'test',
391389
'--color',
392390
'--platform=chrome',
393-
'--web-renderer=canvaskit',
394391
],
395392
plugin.path),
396393
]),
@@ -420,7 +417,6 @@ test_on: vm && browser
420417
'test',
421418
'--color',
422419
'--platform=chrome',
423-
'--web-renderer=canvaskit',
424420
],
425421
plugin.path),
426422
]),
@@ -495,7 +491,6 @@ test_on: vm && browser
495491
'test',
496492
'--color',
497493
'--platform=chrome',
498-
'--web-renderer=canvaskit',
499494
],
500495
plugin.path),
501496
]),

script/tool/test/drive_examples_command_test.dart

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,6 @@ void main() {
759759
'web-server',
760760
'--web-port=7357',
761761
'--browser-name=chrome',
762-
'--web-renderer=canvaskit',
763762
'--screenshot=/path/to/logs/plugin_example-drive',
764763
'--driver',
765764
'test_driver/integration_test.dart',
@@ -822,61 +821,6 @@ void main() {
822821
]));
823822
});
824823

825-
// TODO(dit): Clean this up, https://github.com/flutter/flutter/issues/151869
826-
test('drives a web plugin (html renderer in stable)', () async {
827-
// Override the platform to simulate CHANNEL: stable
828-
mockPlatform.environment['CHANNEL'] = 'stable';
829-
830-
final RepositoryPackage plugin = createFakePlugin(
831-
'plugin',
832-
packagesDir,
833-
extraFiles: <String>[
834-
'example/integration_test/plugin_test.dart',
835-
'example/test_driver/integration_test.dart',
836-
'example/web/index.html',
837-
],
838-
platformSupport: <String, PlatformDetails>{
839-
platformWeb: const PlatformDetails(PlatformSupport.inline),
840-
},
841-
);
842-
843-
final Directory pluginExampleDirectory = getExampleDir(plugin);
844-
845-
final List<String> output = await runCapturingPrint(runner, <String>[
846-
'drive-examples',
847-
'--web',
848-
]);
849-
850-
expect(
851-
output,
852-
containsAllInOrder(<Matcher>[
853-
contains('Running for plugin'),
854-
contains('No issues found!'),
855-
]),
856-
);
857-
858-
expect(
859-
processRunner.recordedCalls,
860-
orderedEquals(<ProcessCall>[
861-
ProcessCall(
862-
getFlutterCommand(mockPlatform),
863-
const <String>[
864-
'drive',
865-
'-d',
866-
'web-server',
867-
'--web-port=7357',
868-
'--browser-name=chrome',
869-
'--web-renderer=html',
870-
'--screenshot=/path/to/logs/plugin_example-drive',
871-
'--driver',
872-
'test_driver/integration_test.dart',
873-
'--target',
874-
'integration_test/plugin_test.dart',
875-
],
876-
pluginExampleDirectory.path),
877-
]));
878-
});
879-
880824
test('runs chromedriver when requested', () async {
881825
final RepositoryPackage plugin = createFakePlugin(
882826
'plugin',
@@ -916,7 +860,6 @@ void main() {
916860
'web-server',
917861
'--web-port=7357',
918862
'--browser-name=chrome',
919-
'--web-renderer=canvaskit',
920863
'--screenshot=/path/to/logs/plugin_example-drive',
921864
'--driver',
922865
'test_driver/integration_test.dart',
@@ -969,7 +912,6 @@ void main() {
969912
'web-server',
970913
'--web-port=7357',
971914
'--browser-name=chrome',
972-
'--web-renderer=canvaskit',
973915
'--chrome-binary=/path/to/chrome',
974916
'--screenshot=/path/to/logs/plugin_example-drive',
975917
'--driver',
@@ -1421,7 +1363,6 @@ void main() {
14211363
'web-server',
14221364
'--web-port=7357',
14231365
'--browser-name=chrome',
1424-
'--web-renderer=canvaskit',
14251366
'--screenshot=/path/to/logs/plugin_example-drive',
14261367
'--driver',
14271368
'test_driver/integration_test.dart',
@@ -1437,7 +1378,6 @@ void main() {
14371378
'web-server',
14381379
'--web-port=7357',
14391380
'--browser-name=chrome',
1440-
'--web-renderer=canvaskit',
14411381
'--screenshot=/path/to/logs/plugin_example-drive',
14421382
'--driver',
14431383
'test_driver/integration_test.dart',
@@ -1537,7 +1477,6 @@ void main() {
15371477
'web-server',
15381478
'--web-port=7357',
15391479
'--browser-name=chrome',
1540-
'--web-renderer=canvaskit',
15411480
'--screenshot=/path/to/logs/a_package_example-drive',
15421481
'--driver',
15431482
'test_driver/integration_test.dart',
@@ -1583,7 +1522,6 @@ void main() {
15831522
'web-server',
15841523
'--web-port=7357',
15851524
'--browser-name=chrome',
1586-
'--web-renderer=canvaskit',
15871525
'--driver',
15881526
'test_driver/integration_test.dart',
15891527
'--target',
@@ -1663,7 +1601,6 @@ void main() {
16631601
'web-server',
16641602
'--web-port=7357',
16651603
'--browser-name=chrome',
1666-
'--web-renderer=canvaskit',
16671604
'--screenshot=/path/to/logs/a_package_example_with_web-drive',
16681605
'--driver',
16691606
'test_driver/integration_test.dart',

0 commit comments

Comments
 (0)