Handle breaking changes in leak_tracker. (#135185)
This commit is contained in:
parent
5708b76ef0
commit
77718845dd
@ -22,8 +22,8 @@ dev_dependencies:
|
|||||||
flutter_goldens:
|
flutter_goldens:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
fake_async: 1.3.1
|
fake_async: 1.3.1
|
||||||
leak_tracker: 9.0.6
|
leak_tracker: 9.0.7
|
||||||
leak_tracker_flutter_testing: 1.0.3
|
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"
|
_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"
|
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"
|
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"
|
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"
|
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"
|
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"
|
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"
|
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"
|
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"
|
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});
|
expect(MaterialStatesController(<MaterialState>{MaterialState.selected}).value, <MaterialState>{MaterialState.selected});
|
||||||
});
|
});
|
||||||
|
|
||||||
test('MaterialStatesController dispatches memory events', () {
|
test('MaterialStatesController dispatches memory events', () async {
|
||||||
expect(()=> MaterialStatesController().dispose(), dispatchesMemoryEvents(MaterialStatesController));
|
await expectLater(
|
||||||
|
await memoryEvents(() => MaterialStatesController().dispose(), MaterialStatesController),
|
||||||
|
areCreateAndDispose,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('MaterialStatesController update, listener', () {
|
test('MaterialStatesController update, listener', () {
|
||||||
|
@ -14,7 +14,10 @@ import 'restoration.dart';
|
|||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgetsWithLeakTracking('$RestorationManager dispatches memory events', (WidgetTester tester) async {
|
testWidgetsWithLeakTracking('$RestorationManager dispatches memory events', (WidgetTester tester) async {
|
||||||
expect(() => RestorationManager().dispose(), dispatchesMemoryEvents(RestorationManager));
|
await expectLater(
|
||||||
|
await memoryEvents(() => RestorationManager().dispose(), RestorationManager),
|
||||||
|
areCreateAndDispose,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
group('RestorationManager', () {
|
group('RestorationManager', () {
|
||||||
|
@ -1770,12 +1770,18 @@ void main() {
|
|||||||
tester.binding.focusManager.removeListener(handleFocusChange);
|
tester.binding.focusManager.removeListener(handleFocusChange);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('$FocusManager dispatches object creation in constructor', () {
|
test('$FocusManager dispatches object creation in constructor', () async {
|
||||||
expect(()=> FocusManager().dispose(), dispatchesMemoryEvents(FocusManager));
|
await expectLater(
|
||||||
|
await memoryEvents(() => FocusManager().dispose(), FocusManager),
|
||||||
|
areCreateAndDispose,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('$FocusNode dispatches object creation in constructor', () {
|
test('$FocusNode dispatches object creation in constructor', () async {
|
||||||
expect(()=> FocusNode().dispose(), dispatchesMemoryEvents(FocusNode));
|
await expectLater(
|
||||||
|
await memoryEvents(() => FocusNode().dispose(), FocusNode),
|
||||||
|
areCreateAndDispose,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgetsWithLeakTracking('FocusManager notifies listeners when a widget loses focus because it was removed.', (WidgetTester tester) async {
|
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 {
|
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 {
|
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', () {
|
test('$PlatformRouteInformationProvider dispatches object creation in constructor', () async {
|
||||||
void createAndDispose() {
|
Future<void> createAndDispose() async {
|
||||||
PlatformRouteInformationProvider(
|
PlatformRouteInformationProvider(
|
||||||
initialRouteInformation: RouteInformation(uri: Uri.parse('http://google.com')),
|
initialRouteInformation: RouteInformation(uri: Uri.parse('http://google.com')),
|
||||||
).dispose();
|
).dispose();
|
||||||
}
|
}
|
||||||
|
await expectLater(
|
||||||
expect(createAndDispose, dispatchesMemoryEvents(PlatformRouteInformationProvider));
|
await memoryEvents(createAndDispose, PlatformRouteInformationProvider),
|
||||||
|
areCreateAndDispose,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -409,7 +409,10 @@ void main() {
|
|||||||
expect(isScrolling, isTrue);
|
expect(isScrolling, isTrue);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('$ScrollController dispatches object creation in constructor', () {
|
test('$ScrollController dispatches object creation in constructor', () async {
|
||||||
expect(() => ScrollController().dispose(), dispatchesMemoryEvents(ScrollController));
|
await expectLater(
|
||||||
|
await memoryEvents(() => ScrollController().dispose(), ScrollController),
|
||||||
|
areCreateAndDispose,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -672,8 +672,11 @@ void main() {
|
|||||||
expect(pressedKeys, isEmpty);
|
expect(pressedKeys, isEmpty);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('$ShortcutManager dispatches object creation in constructor', () {
|
test('$ShortcutManager dispatches object creation in constructor', () async {
|
||||||
expect(()=> ShortcutManager().dispose(), dispatchesMemoryEvents(ShortcutManager));
|
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 {
|
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();
|
token.dispose();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('dispatches object creation in constructor', () {
|
test('dispatches object creation in constructor', () async {
|
||||||
expect(()=> ShortcutRegistry().dispose(), dispatchesMemoryEvents(ShortcutRegistry));
|
await expectLater(
|
||||||
|
await memoryEvents(() => ShortcutRegistry().dispose(), ShortcutRegistry),
|
||||||
|
areCreateAndDispose,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user