Skip to content

Commit 75549dc

Browse files
Fix the broken build (#5076)
1 parent 9a533c3 commit 75549dc

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

packages/devtools_app/test/shared/service_extension_widgets_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Future<void> main() async {
2727
when(mockServiceManager.appState).thenReturn(
2828
AppState(mockServiceManager.isolateManager.selectedIsolate),
2929
);
30-
when(mockServiceManager.runDeviceBusyTask(Future<void>.value()))
30+
when(mockServiceManager.runDeviceBusyTask(any))
3131
.thenAnswer((_) => Future<void>.value());
3232
when(mockServiceManager.isMainIsolatePaused).thenReturn(false);
3333
setGlobal(ServiceConnectionManager, mockServiceManager);

packages/devtools_app/test/test_infra/goldens/inspector_service_details_tree.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ MaterialApp
88
└─Focus
99
│ state: _FocusState#00000
1010
11-
└─_FocusMarker
11+
└─_FocusInheritedScope
1212
└─Semantics
1313
│ container: false
1414
│ properties: SemanticsProperties

packages/devtools_test/lib/src/wrappers.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,12 @@ void testWidgetsWithContext(
134134
} finally {
135135
// restore previous global values
136136
for (Type type in oldValues.keys) {
137-
setGlobal(type, oldValues[type]);
137+
final oldGlobal = oldValues[type];
138+
if (oldGlobal != null) {
139+
setGlobal(type, oldGlobal);
140+
} else {
141+
globals.remove(type);
142+
}
138143
}
139144
}
140145
});

0 commit comments

Comments
 (0)