Handle breaking changes in leak_tracker. (#135185)
This commit is contained in:
parent
5708b76ef0
commit
77718845dd
@ -22,8 +22,8 @@ dev_dependencies:
|
||||
flutter_goldens:
|
||||
sdk: flutter
|
||||
fake_async: 1.3.1
|
||||
leak_tracker: 9.0.6
|
||||
leak_tracker_flutter_testing: 1.0.3
|
||||
leak_tracker: 9.0.7
|
||||
leak_tracker_flutter_testing: 1.0.5
|
||||
|
||||
_fe_analyzer_shared: 64.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
analyzer: 6.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
@ -42,7 +42,7 @@ dev_dependencies:
|
||||
intl: 0.18.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
io: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
js: 0.6.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
leak_tracker_testing: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
leak_tracker_testing: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
logging: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
matcher: 0.12.16 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
mime: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
@ -74,4 +74,4 @@ dev_dependencies:
|
||||
webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: 5f92
|
||||
# PUBSPEC CHECKSUM: a796
|
||||
|
@ -13,8 +13,11 @@ void main() {
|
||||
expect(MaterialStatesController(<MaterialState>{MaterialState.selected}).value, <MaterialState>{MaterialState.selected});
|
||||
});
|
||||
|
||||
test('MaterialStatesController dispatches memory events', () {
|
||||
expect(()=> MaterialStatesController().dispose(), dispatchesMemoryEvents(MaterialStatesController));
|
||||
test('MaterialStatesController dispatches memory events', () async {
|
||||
await expectLater(
|
||||
await memoryEvents(() => MaterialStatesController().dispose(), MaterialStatesController),
|
||||
areCreateAndDispose,
|
||||
);
|
||||
});
|
||||
|
||||
test('MaterialStatesController update, listener', () {
|
||||
|
@ -14,7 +14,10 @@ import 'restoration.dart';
|
||||
|
||||
void main() {
|
||||
testWidgetsWithLeakTracking('$RestorationManager dispatches memory events', (WidgetTester tester) async {
|
||||
expect(() => RestorationManager().dispose(), dispatchesMemoryEvents(RestorationManager));
|
||||
await expectLater(
|
||||
await memoryEvents(() => RestorationManager().dispose(), RestorationManager),
|
||||
areCreateAndDispose,
|
||||
);
|
||||
});
|
||||
|
||||
group('RestorationManager', () {
|
||||
|
@ -1770,12 +1770,18 @@ void main() {
|
||||
tester.binding.focusManager.removeListener(handleFocusChange);
|
||||
});
|
||||
|
||||
test('$FocusManager dispatches object creation in constructor', () {
|
||||
expect(()=> FocusManager().dispose(), dispatchesMemoryEvents(FocusManager));
|
||||
test('$FocusManager dispatches object creation in constructor', () async {
|
||||
await expectLater(
|
||||
await memoryEvents(() => FocusManager().dispose(), FocusManager),
|
||||
areCreateAndDispose,
|
||||
);
|
||||
});
|
||||
|
||||
test('$FocusNode dispatches object creation in constructor', () {
|
||||
expect(()=> FocusNode().dispose(), dispatchesMemoryEvents(FocusNode));
|
||||
test('$FocusNode dispatches object creation in constructor', () async {
|
||||
await expectLater(
|
||||
await memoryEvents(() => FocusNode().dispose(), FocusNode),
|
||||
areCreateAndDispose,
|
||||
);
|
||||
});
|
||||
|
||||
testWidgetsWithLeakTracking('FocusManager notifies listeners when a widget loses focus because it was removed.', (WidgetTester tester) async {
|
||||
|
@ -59,7 +59,10 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgetsWithLeakTracking('$RestorableProperty dispatches creation in constructor', (WidgetTester widgetTester) async {
|
||||
expect(() => RestorableDateTimeN(null).dispose(), dispatchesMemoryEvents(RestorableDateTimeN));
|
||||
await expectLater(
|
||||
await memoryEvents(() => RestorableDateTimeN(null).dispose(), RestorableDateTimeN),
|
||||
areCreateAndDispose,
|
||||
);
|
||||
});
|
||||
|
||||
testWidgetsWithLeakTracking('work when not in restoration scope', (WidgetTester tester) async {
|
||||
|
@ -1584,14 +1584,16 @@ testWidgets('ChildBackButtonDispatcher take priority recursively', (WidgetTester
|
||||
});
|
||||
});
|
||||
|
||||
test('$PlatformRouteInformationProvider dispatches object creation in constructor', () {
|
||||
void createAndDispose() {
|
||||
test('$PlatformRouteInformationProvider dispatches object creation in constructor', () async {
|
||||
Future<void> createAndDispose() async {
|
||||
PlatformRouteInformationProvider(
|
||||
initialRouteInformation: RouteInformation(uri: Uri.parse('http://google.com')),
|
||||
).dispose();
|
||||
}
|
||||
|
||||
expect(createAndDispose, dispatchesMemoryEvents(PlatformRouteInformationProvider));
|
||||
await expectLater(
|
||||
await memoryEvents(createAndDispose, PlatformRouteInformationProvider),
|
||||
areCreateAndDispose,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -409,7 +409,10 @@ void main() {
|
||||
expect(isScrolling, isTrue);
|
||||
});
|
||||
|
||||
test('$ScrollController dispatches object creation in constructor', () {
|
||||
expect(() => ScrollController().dispose(), dispatchesMemoryEvents(ScrollController));
|
||||
test('$ScrollController dispatches object creation in constructor', () async {
|
||||
await expectLater(
|
||||
await memoryEvents(() => ScrollController().dispose(), ScrollController),
|
||||
areCreateAndDispose,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
@ -672,8 +672,11 @@ void main() {
|
||||
expect(pressedKeys, isEmpty);
|
||||
});
|
||||
|
||||
test('$ShortcutManager dispatches object creation in constructor', () {
|
||||
expect(()=> ShortcutManager().dispose(), dispatchesMemoryEvents(ShortcutManager));
|
||||
test('$ShortcutManager dispatches object creation in constructor', () async {
|
||||
await expectLater(
|
||||
await memoryEvents(() => ShortcutManager().dispose(), ShortcutManager),
|
||||
areCreateAndDispose,
|
||||
);
|
||||
});
|
||||
|
||||
testWidgetsWithLeakTracking("Shortcuts passes to the next Shortcuts widget if it doesn't map the key", (WidgetTester tester) async {
|
||||
@ -1872,8 +1875,11 @@ void main() {
|
||||
token.dispose();
|
||||
});
|
||||
|
||||
test('dispatches object creation in constructor', () {
|
||||
expect(()=> ShortcutRegistry().dispose(), dispatchesMemoryEvents(ShortcutRegistry));
|
||||
test('dispatches object creation in constructor', () async {
|
||||
await expectLater(
|
||||
await memoryEvents(() => ShortcutRegistry().dispose(), ShortcutRegistry),
|
||||
areCreateAndDispose,
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user