Skip to content

Commit

Permalink
Mark test that leaks image. (#142539)
Browse files Browse the repository at this point in the history
  • Loading branch information
polina-c authored Jan 31, 2024
1 parent 50dbcc4 commit 6d8aa4a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/flutter/test/cupertino/text_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ void main() {
const Color expectedSelectionHandleColor = Color.fromARGB(255, 10, 200, 255);

final TextEditingController controller = TextEditingController(text: 'Some text.');
addTearDown(controller.dispose);

await tester.pumpWidget(
CupertinoApp(
Expand Down
1 change: 1 addition & 0 deletions packages/flutter/test/material/dropdown_menu_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1935,6 +1935,7 @@ void main() {

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

await tester.pumpWidget(MaterialApp(
Expand Down
1 change: 1 addition & 0 deletions packages/flutter/test/material/menu_anchor_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2616,6 +2616,7 @@ void main() {
child: const Text('Set focus to null'),
onPressed: () {
setState((){
buttonFocusNode?.dispose();
buttonFocusNode = null;
});
},
Expand Down
1 change: 1 addition & 0 deletions packages/flutter/test/material/text_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9297,6 +9297,7 @@ void main() {
const Color expectedSelectionHandleColor = Color.fromARGB(255, 10, 200, 255);

final TextEditingController controller = TextEditingController(text: 'Some text.');
addTearDown(controller.dispose);

await tester.pumpWidget(
MaterialApp(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ void main() {
expect(imageCache.currentSize, 1);
});

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

0 comments on commit 6d8aa4a

Please sign in to comment.