mirror of
https://github.com/flutter/flutter
synced 2024-10-12 19:23:02 +00:00
[flutter_tools] swap web debugging protocol to ws (#82456)
This commit is contained in:
parent
3266f4d90c
commit
344f3ab7d9
|
@ -211,7 +211,7 @@ abstract class FlutterCommand extends Command<void> {
|
|||
);
|
||||
argParser.addOption('web-server-debug-protocol',
|
||||
allowed: <String>['sse', 'ws'],
|
||||
defaultsTo: 'sse',
|
||||
defaultsTo: 'ws',
|
||||
help: 'The protocol (SSE or WebSockets) to use for the debug service proxy '
|
||||
'when using the Web Server device and Dart Debug extension. '
|
||||
'This is useful for editors/debug adapters that do not support debugging '
|
||||
|
@ -220,7 +220,7 @@ abstract class FlutterCommand extends Command<void> {
|
|||
);
|
||||
argParser.addOption('web-server-debug-backend-protocol',
|
||||
allowed: <String>['sse', 'ws'],
|
||||
defaultsTo: 'sse',
|
||||
defaultsTo: 'ws',
|
||||
help: 'The protocol (SSE or WebSockets) to use for the Dart Debug Extension '
|
||||
'backend service when using the Web Server device. '
|
||||
'Using WebSockets can improve performance but may fail when connecting through '
|
||||
|
@ -229,7 +229,7 @@ abstract class FlutterCommand extends Command<void> {
|
|||
);
|
||||
argParser.addOption('web-server-debug-injected-client-protocol',
|
||||
allowed: <String>['sse', 'ws'],
|
||||
defaultsTo: 'sse',
|
||||
defaultsTo: 'ws',
|
||||
help: 'The protocol (SSE or WebSockets) to use for the injected client '
|
||||
'when using the Web Server device. '
|
||||
'Using WebSockets can improve performance but may fail when connecting through '
|
||||
|
|
|
@ -508,6 +508,20 @@ void main() {
|
|||
'--bundle-sksl-path=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 {}
|
||||
|
|
Loading…
Reference in a new issue