Pass along web renderer into debugging options in the test command. (#143128)
We need to pass along the web renderer in the debugging options to make sure that the resident web runner sets up the targets correctly.
This commit is contained in:
@@ -22,6 +22,7 @@ import 'package:flutter_tools/src/test/test_device.dart';
|
||||
import 'package:flutter_tools/src/test/test_time_recorder.dart';
|
||||
import 'package:flutter_tools/src/test/test_wrapper.dart';
|
||||
import 'package:flutter_tools/src/test/watcher.dart';
|
||||
import 'package:flutter_tools/src/web/compile.dart';
|
||||
import 'package:stream_channel/stream_channel.dart';
|
||||
import 'package:vm_service/vm_service.dart';
|
||||
|
||||
@@ -1057,6 +1058,24 @@ dev_dependencies:
|
||||
FileSystem: () => fs,
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('Passes web renderer into debugging options', () async {
|
||||
final FakeFlutterTestRunner testRunner = FakeFlutterTestRunner(0);
|
||||
|
||||
final TestCommand testCommand = TestCommand(testRunner: testRunner);
|
||||
final CommandRunner<void> commandRunner = createTestCommandRunner(testCommand);
|
||||
|
||||
await commandRunner.run(const <String>[
|
||||
'test',
|
||||
'--no-pub',
|
||||
'--platform=chrome',
|
||||
'--web-renderer=canvaskit',
|
||||
]);
|
||||
expect(testRunner.lastDebuggingOptionsValue.webRenderer, WebRendererMode.canvaskit);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => fs,
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user