[flutter_tools] add canvaskit hot reload integration test (#69550)
This commit is contained in:
@@ -30,7 +30,7 @@ void main() {
|
||||
testWithoutContext('hot restart works without error', () async {
|
||||
await flutter.run(chrome: true);
|
||||
await flutter.hotRestart();
|
||||
}, skip: platform.isMacOS);
|
||||
}, skip: platform.isMacOS, retry: 1);
|
||||
|
||||
testWithoutContext('newly added code executes during hot restart', () async {
|
||||
final Completer<void> completer = Completer<void>();
|
||||
@@ -48,5 +48,23 @@ void main() {
|
||||
} finally {
|
||||
await subscription.cancel();
|
||||
}
|
||||
}, skip: platform.isMacOS);
|
||||
}, skip: platform.isMacOS, retry: 1);
|
||||
|
||||
testWithoutContext('newly added code executes during hot restart - canvaskit', () async {
|
||||
final Completer<void> completer = Completer<void>();
|
||||
final StreamSubscription<String> subscription = flutter.stdout.listen((String line) {
|
||||
print(line);
|
||||
if (line.contains('(((((RELOAD WORKED)))))')) {
|
||||
completer.complete();
|
||||
}
|
||||
});
|
||||
await flutter.run(chrome: true, additionalCommandArgs: <String>['--dart-define=FLUTTER_WEB_USE_SKIA=true']);
|
||||
project.uncommentHotReloadPrint();
|
||||
try {
|
||||
await flutter.hotRestart();
|
||||
await completer.future;
|
||||
} finally {
|
||||
await subscription.cancel();
|
||||
}
|
||||
}, skip: true, retry: 1); // Currently broken: Expected a value of type 'Future<_RegisteredFont>', but got one of type '_Future<_RegisteredFont?>
|
||||
}
|
||||
|
||||
@@ -451,6 +451,7 @@ class FlutterRunTestDriver extends FlutterTestDriver {
|
||||
bool singleWidgetReloads = false,
|
||||
File pidFile,
|
||||
String script,
|
||||
List<String> additionalCommandArgs,
|
||||
}) async {
|
||||
await _setupProcess(
|
||||
<String>[
|
||||
@@ -471,6 +472,7 @@ class FlutterRunTestDriver extends FlutterTestDriver {
|
||||
'flutter-tester',
|
||||
if (structuredErrors)
|
||||
'--dart-define=flutter.inspector.structuredErrors=true',
|
||||
...?additionalCommandArgs,
|
||||
],
|
||||
withDebugger: withDebugger,
|
||||
startPaused: startPaused,
|
||||
|
||||
Reference in New Issue
Block a user