@@ -48,6 +48,7 @@ void main() {
4848 MockChromeTab mockChromeTab;
4949 MockWipConnection mockWipConnection;
5050 MockWipDebugger mockWipDebugger;
51+ bool didSkipDwds;
5152
5253 setUp (() {
5354 resetChromeForTesting ();
@@ -87,6 +88,7 @@ void main() {
8788 @required String port,
8889 @required List <String > dartDefines,
8990 }) async {
91+ didSkipDwds = skipDwds;
9092 return mockWebFs;
9193 },
9294 },
@@ -127,9 +129,9 @@ void main() {
127129 when (mockWipConnection.debugger).thenReturn (mockWipDebugger);
128130 }
129131
130- test ('runner with web server device does not support debugging' , () => testbed.run (() {
132+ test ('runner with web server device does not support debugging' , () => testbed.run (() async {
131133 when (mockFlutterDevice.device).thenReturn (WebServerDevice ());
132- final ResidentRunner profileResidentWebRunner = residentWebRunner = DwdsWebRunnerFactory ().createWebRunner (
134+ final ResidentRunner profileResidentWebRunner = DwdsWebRunnerFactory ().createWebRunner (
133135 mockFlutterDevice,
134136 flutterProject: FlutterProject .current (),
135137 debuggingOptions: DebuggingOptions .enabled (BuildInfo .debug),
@@ -145,6 +147,20 @@ void main() {
145147 expect (residentWebRunner.debuggingEnabled, true );
146148 }));
147149
150+ test ('runner with web server device does not initialize dwds' , () => testbed.run (() async {
151+ _setupMocks ();
152+ when (mockFlutterDevice.device).thenReturn (WebServerDevice ());
153+
154+ final Completer <DebugConnectionInfo > connectionInfoCompleter = Completer <DebugConnectionInfo >();
155+ unawaited (residentWebRunner.run (
156+ connectionInfoCompleter: connectionInfoCompleter,
157+ ));
158+ await connectionInfoCompleter.future;
159+
160+ expect (didSkipDwds, true );
161+ }));
162+
163+
148164 test ('profile does not supportsServiceProtocol' , () => testbed.run (() {
149165 when (mockFlutterDevice.device).thenReturn (mockChromeDevice);
150166 final ResidentRunner profileResidentWebRunner = DwdsWebRunnerFactory ().createWebRunner (
0 commit comments