Skip to content

Commit 6d8aa4a

Browse files
authored
Mark test that leaks image. (#142539)
1 parent 50dbcc4 commit 6d8aa4a

5 files changed

Lines changed: 8 additions & 1 deletion

File tree

packages/flutter/test/cupertino/text_field_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ void main() {
626626
const Color expectedSelectionHandleColor = Color.fromARGB(255, 10, 200, 255);
627627

628628
final TextEditingController controller = TextEditingController(text: 'Some text.');
629+
addTearDown(controller.dispose);
629630

630631
await tester.pumpWidget(
631632
CupertinoApp(

packages/flutter/test/material/dropdown_menu_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,6 +1935,7 @@ void main() {
19351935

19361936
testWidgets('DropdownMenu.focusNode can focus text input field', (WidgetTester tester) async {
19371937
final FocusNode focusNode = FocusNode();
1938+
addTearDown(focusNode.dispose);
19381939
final ThemeData theme = ThemeData();
19391940

19401941
await tester.pumpWidget(MaterialApp(

packages/flutter/test/material/menu_anchor_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2616,6 +2616,7 @@ void main() {
26162616
child: const Text('Set focus to null'),
26172617
onPressed: () {
26182618
setState((){
2619+
buttonFocusNode?.dispose();
26192620
buttonFocusNode = null;
26202621
});
26212622
},

packages/flutter/test/material/text_field_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9297,6 +9297,7 @@ void main() {
92979297
const Color expectedSelectionHandleColor = Color.fromARGB(255, 10, 200, 255);
92989298

92999299
final TextEditingController controller = TextEditingController(text: 'Some text.');
9300+
addTearDown(controller.dispose);
93009301

93019302
await tester.pumpWidget(
93029303
MaterialApp(

packages/flutter/test/widgets/scroll_aware_image_provider_test.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ void main() {
167167
expect(imageCache.currentSize, 1);
168168
});
169169

170-
testWidgets('ScrollAwareImageProvider delays if in scrollable that is scrolling fast', (WidgetTester tester) async {
170+
testWidgets('ScrollAwareImageProvider delays if in scrollable that is scrolling fast',
171+
// TODO(polina-c): make sure images are disposed, https://github.com/flutter/flutter/issues/141388 [leaks-to-clean]
172+
experimentalLeakTesting: LeakTesting.settings.withIgnoredAll(),
173+
(WidgetTester tester) async {
171174
final List<GlobalKey<TestWidgetState>> keys = <GlobalKey<TestWidgetState>>[];
172175
final ScrollController scrollController = ScrollController();
173176
addTearDown(scrollController.dispose);

0 commit comments

Comments
 (0)