From e599cdd414d79c78caedef2dad13edd015b806f1 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 22 Jan 2021 11:07:08 -0800 Subject: [PATCH] [flutter_tools] fix web messaging (#74513) --- .../lib/src/isolated/resident_web_runner.dart | 9 +-------- .../general.shard/resident_web_runner_test.dart | 13 +++++++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/flutter_tools/lib/src/isolated/resident_web_runner.dart b/packages/flutter_tools/lib/src/isolated/resident_web_runner.dart index 5b501760e2e..f4547c48e54 100644 --- a/packages/flutter_tools/lib/src/isolated/resident_web_runner.dart +++ b/packages/flutter_tools/lib/src/isolated/resident_web_runner.dart @@ -184,14 +184,7 @@ abstract class ResidentWebRunner extends ResidentRunner { fire + globals.terminal.bolden(rawMessage), TerminalColor.red, ); - if (!flutterNext) { - globals.printStatus( - "Warning: Flutter's support for web development is not stable yet and hasn't"); - globals.printStatus('been thoroughly tested in production environments.'); - globals.printStatus('For more information see https://flutter.dev/web'); - globals.printStatus(''); - globals.printStatus(message); - } + globals.printStatus(message); const String quitMessage = 'To quit, press "q".'; if (device.device is! WebServerDevice) { globals.printStatus('For a more detailed help message, press "h". $quitMessage'); diff --git a/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart b/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart index 88a5c085e96..3ef3137400b 100644 --- a/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart +++ b/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart @@ -891,6 +891,19 @@ void main() { Platform: () => FakePlatform(operatingSystem: 'linux', environment: {}), }); + testUsingContext('printHelp without details shows hot restart help message', () async { + final ResidentRunner residentWebRunner = setUpResidentRunner(mockFlutterDevice); + fakeVmServiceHost = FakeVmServiceHost(requests: []); + residentWebRunner.printHelp(details: false); + + expect(testLogger.statusText, contains('To hot restart changes')); + }, overrides: { + FileSystem: () => fileSystem, + ProcessManager: () => processManager, + Pub: () => MockPub(), + Platform: () => FakePlatform(operatingSystem: 'linux', environment: {}), + }); + testUsingContext('debugDumpApp', () async { final ResidentRunner residentWebRunner = setUpResidentRunner(mockFlutterDevice); fakeVmServiceHost = FakeVmServiceHost(requests: [