Skip to content

Commit 773acaf

Browse files
authored
[ Tool ] Output DTD URI for Flutter web applications (flutter#177310)
Fixes flutter#176310
1 parent d20b961 commit 773acaf

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/flutter_tools/lib/src/isolated/resident_web_runner.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ class ResidentWebRunner extends ResidentRunner {
934934
DebugConnectionInfo(
935935
wsUri: websocketUri,
936936
devToolsUri: Uri.tryParse(debugConnection.devToolsUri ?? ''),
937-
// TODO(bkonyi): surface DTD URI once it's visible from DWDS
937+
dtdUri: Uri.tryParse(debugConnection.dtdUri ?? ''),
938938
),
939939
);
940940
}),

packages/flutter_tools/test/general.shard/resident_web_runner_test.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ name: my_app
144144
webDevFS.result = ConnectionResult(appConnection, debugConnection, debugConnection.vmService);
145145
debugConnection.uri = 'ws://127.0.0.1/abcd/';
146146
debugConnection.devToolsUri = 'http://127.0.0.1/abcd/';
147+
debugConnection.dtdUri = 'ws://127.0.0.1/efgh/';
147148
chromeConnection.tabs.add(chromeTab);
148149
}
149150

@@ -260,6 +261,7 @@ name: my_app
260261
expect(appConnection.ranMain, true);
261262
expect(logger.statusText, contains('Debug service listening on ws://127.0.0.1/abcd/'));
262263
expect(debugConnectionInfo.wsUri.toString(), 'ws://127.0.0.1/abcd/');
264+
expect(debugConnectionInfo.dtdUri.toString(), 'ws://127.0.0.1/efgh/');
263265
},
264266
overrides: <Type, Generator>{
265267
FileSystem: () => fileSystem,
@@ -2029,6 +2031,9 @@ class FakeDebugConnection extends Fake implements DebugConnection {
20292031
@override
20302032
late String devToolsUri;
20312033

2034+
@override
2035+
late String dtdUri;
2036+
20322037
final completer = Completer<void>();
20332038
var didClose = false;
20342039

0 commit comments

Comments
 (0)