Unverified Commit 344f3ab7 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] swap web debugging protocol to ws (#82456)

parent 3266f4d9
...@@ -211,7 +211,7 @@ abstract class FlutterCommand extends Command<void> { ...@@ -211,7 +211,7 @@ abstract class FlutterCommand extends Command<void> {
); );
argParser.addOption('web-server-debug-protocol', argParser.addOption('web-server-debug-protocol',
allowed: <String>['sse', 'ws'], allowed: <String>['sse', 'ws'],
defaultsTo: 'sse', defaultsTo: 'ws',
help: 'The protocol (SSE or WebSockets) to use for the debug service proxy ' help: 'The protocol (SSE or WebSockets) to use for the debug service proxy '
'when using the Web Server device and Dart Debug extension. ' 'when using the Web Server device and Dart Debug extension. '
'This is useful for editors/debug adapters that do not support debugging ' 'This is useful for editors/debug adapters that do not support debugging '
...@@ -220,7 +220,7 @@ abstract class FlutterCommand extends Command<void> { ...@@ -220,7 +220,7 @@ abstract class FlutterCommand extends Command<void> {
); );
argParser.addOption('web-server-debug-backend-protocol', argParser.addOption('web-server-debug-backend-protocol',
allowed: <String>['sse', 'ws'], allowed: <String>['sse', 'ws'],
defaultsTo: 'sse', defaultsTo: 'ws',
help: 'The protocol (SSE or WebSockets) to use for the Dart Debug Extension ' help: 'The protocol (SSE or WebSockets) to use for the Dart Debug Extension '
'backend service when using the Web Server device. ' 'backend service when using the Web Server device. '
'Using WebSockets can improve performance but may fail when connecting through ' 'Using WebSockets can improve performance but may fail when connecting through '
...@@ -229,7 +229,7 @@ abstract class FlutterCommand extends Command<void> { ...@@ -229,7 +229,7 @@ abstract class FlutterCommand extends Command<void> {
); );
argParser.addOption('web-server-debug-injected-client-protocol', argParser.addOption('web-server-debug-injected-client-protocol',
allowed: <String>['sse', 'ws'], allowed: <String>['sse', 'ws'],
defaultsTo: 'sse', defaultsTo: 'ws',
help: 'The protocol (SSE or WebSockets) to use for the injected client ' help: 'The protocol (SSE or WebSockets) to use for the injected client '
'when using the Web Server device. ' 'when using the Web Server device. '
'Using WebSockets can improve performance but may fail when connecting through ' 'Using WebSockets can improve performance but may fail when connecting through '
......
...@@ -508,6 +508,20 @@ void main() { ...@@ -508,6 +508,20 @@ void main() {
'--bundle-sksl-path=foo.json', '--bundle-sksl-path=foo.json',
]), throwsToolExit(message: 'No SkSL shader bundle found at foo.json')); ]), throwsToolExit(message: 'No SkSL shader bundle found at foo.json'));
}); });
testUsingContext('Configures web connection options to use web sockets by default', () async {
final RunCommand command = RunCommand();
await expectLater(() => createTestCommandRunner(command).run(<String>[
'run',
'--no-pub',
]), throwsToolExit());
final DebuggingOptions options = await command.createDebuggingOptions(true);
expect(options.webUseSseForDebugBackend, false);
expect(options.webUseSseForDebugProxy, false);
expect(options.webUseSseForInjectedClient, false);
});
} }
class MockCache extends Mock implements Cache {} class MockCache extends Mock implements Cache {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment