@@ -256,7 +256,10 @@ void main() {
256256 });
257257
258258 testUsingContext ('WebRunner copies compiled app.dill to cache during startup' , () async {
259- final ResidentRunner residentWebRunner = setUpResidentRunner (flutterDevice);
259+ final DebuggingOptions debuggingOptions = DebuggingOptions .enabled (
260+ const BuildInfo (BuildMode .debug, null , treeShakeIcons: false ),
261+ );
262+ final ResidentRunner residentWebRunner = setUpResidentRunner (flutterDevice, debuggingOptions: debuggingOptions);
260263 fakeVmServiceHost = FakeVmServiceHost (requests: kAttachExpectations.toList ());
261264 _setupMocks ();
262265
@@ -273,6 +276,24 @@ void main() {
273276 ProcessManager : () => processManager,
274277 });
275278
279+ testUsingContext ('WebRunner copies compiled app.dill to cache during startup with track-widget-creation' , () async {
280+ final ResidentRunner residentWebRunner = setUpResidentRunner (flutterDevice);
281+ fakeVmServiceHost = FakeVmServiceHost (requests: kAttachExpectations.toList ());
282+ _setupMocks ();
283+
284+ residentWebRunner.artifactDirectory.childFile ('app.dill' ).writeAsStringSync ('ABC' );
285+ final Completer <DebugConnectionInfo > connectionInfoCompleter = Completer <DebugConnectionInfo >();
286+ unawaited (residentWebRunner.run (
287+ connectionInfoCompleter: connectionInfoCompleter,
288+ ));
289+ await connectionInfoCompleter.future;
290+
291+ expect (await fileSystem.file (fileSystem.path.join ('build' , 'cache.dill.track.dill' )).readAsString (), 'ABC' );
292+ }, overrides: < Type , Generator > {
293+ FileSystem : () => fileSystem,
294+ ProcessManager : () => processManager,
295+ });
296+
276297 // Regression test for https://github.com/flutter/flutter/issues/60613
277298 testUsingContext ('ResidentWebRunner calls appFailedToStart if initial compilation fails' , () async {
278299 fakeVmServiceHost = FakeVmServiceHost (requests: kAttachExpectations.toList ());
@@ -1048,11 +1069,12 @@ void main() {
10481069ResidentRunner setUpResidentRunner (FlutterDevice flutterDevice, {
10491070 Logger logger,
10501071 SystemClock systemClock,
1072+ DebuggingOptions debuggingOptions,
10511073}) {
10521074 return ResidentWebRunner (
10531075 flutterDevice,
10541076 flutterProject: FlutterProject .fromDirectoryTest (globals.fs.currentDirectory),
1055- debuggingOptions: DebuggingOptions .enabled (BuildInfo .debug),
1077+ debuggingOptions: debuggingOptions ?? DebuggingOptions .enabled (BuildInfo .debug),
10561078 ipv6: true ,
10571079 urlTunneller: null ,
10581080 usage: globals.flutterUsage,
0 commit comments