Skip to content

Commit

Permalink
Update leak related TODOs. (#146743)
Browse files Browse the repository at this point in the history
  • Loading branch information
polina-c authored Apr 15, 2024
1 parent 882bcbb commit c4a7cf2
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 25 deletions.
2 changes: 1 addition & 1 deletion packages/flutter/test/animation/live_binding_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void main() {
}, skip: true); // Typically skip: isBrowser https://github.com/flutter/flutter/issues/42767

testWidgets('Should show event indicator for pointer events with setSurfaceSize',
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787 [leaks-to-clean]
// TODO(polina-c): root layer is leaking, https://github.com/flutter/flutter/issues/146742 [leaks-to-clean]
experimentalLeakTesting: LeakTesting.settings.withIgnoredAll(),
(WidgetTester tester) async {
final AnimationSheetBuilder animationSheet = AnimationSheetBuilder(frameSize: const Size(200, 200), allLayers: true);
Expand Down
7 changes: 1 addition & 6 deletions packages/flutter/test/cupertino/tab_scaffold_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,6 @@ void main() {

testWidgets('A controller can control more than one CupertinoTabScaffold, '
'removal of listeners does not break the controller',
// TODO(polina-c): dispose TabController, https://github.com/flutter/flutter/issues/144910 [leaks-to-clean]
experimentalLeakTesting: LeakTesting.settings.withIgnoredAll(),
(WidgetTester tester) async {
final List<int> tabsPainted0 = <int>[];
final List<int> tabsPainted1 = <int>[];
Expand Down Expand Up @@ -1277,10 +1275,7 @@ void main() {
.setMockMethodCallHandler(SystemChannels.platform, null);
});

testWidgets('System back navigation inside of tabs',
// TODO(polina-c): dispose TabController, https://github.com/flutter/flutter/issues/144910
experimentalLeakTesting: LeakTesting.settings.withIgnoredAll(),
(WidgetTester tester) async {
testWidgets('System back navigation inside of tabs', (WidgetTester tester) async {
await tester.pumpWidget(
CupertinoApp(
home: MediaQuery(
Expand Down
13 changes: 4 additions & 9 deletions packages/flutter/test/widgets/draggable_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';

import 'semantics_tester.dart';

Expand Down Expand Up @@ -2541,10 +2540,7 @@ void main() {
});

// Regression test for https://github.com/flutter/flutter/issues/6128.
testWidgets('Draggable plays nice with onTap',
// TODO(polina-c): fix the leaking ImmediateMultiDragGestureRecognizer https://github.com/flutter/flutter/pull/144396 [leaks-to-clean]
experimentalLeakTesting: LeakTesting.settings.withIgnoredAll(),
(WidgetTester tester) async {
testWidgets('Draggable plays nice with onTap', (WidgetTester tester) async {
late final OverlayEntry entry;
addTearDown(() => entry..remove()..dispose());

Expand Down Expand Up @@ -2578,6 +2574,7 @@ void main() {

await firstGesture.moveBy(const Offset(100.0, 0.0));
await secondGesture.up();
await firstGesture.up();
});

testWidgets('DragTarget does not set state when remove from the tree', (WidgetTester tester) async {
Expand Down Expand Up @@ -3434,10 +3431,7 @@ void main() {
});

// Regression test for https://github.com/flutter/flutter/issues/92083
testWidgets('feedback respect the MouseRegion cursor configure',
// TODO(polina-c): fix the leaking ImmediateMultiDragGestureRecognizer https://github.com/flutter/flutter/pull/144396 [leaks-to-clean]
experimentalLeakTesting: LeakTesting.settings.withIgnoredAll(),
(WidgetTester tester) async {
testWidgets('feedback respect the MouseRegion cursor configure', (WidgetTester tester) async {
await tester.pumpWidget(
const MaterialApp(
home: Column(
Expand All @@ -3463,6 +3457,7 @@ void main() {
await tester.pump();

expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.grabbing);
gesture.up();
});

testWidgets('configurable feedback ignore pointer behavior', (WidgetTester tester) async {
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/test/widgets/image_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ void main() {
});

testWidgets('Precache removes original listener immediately after future completes, does not crash on successive calls #25143',
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787 [leaks-to-clean]
// TODO(polina-c): dispose ImageStreamCompleterHandle, https://github.com/flutter/flutter/issues/145599 [leaks-to-clean]
experimentalLeakTesting: LeakTesting.settings.withIgnoredAll(),
(WidgetTester tester) async {
final _TestImageStreamCompleter imageStreamCompleter = _TestImageStreamCompleter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/semantics.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';

import 'semantics_tester.dart';

Expand Down Expand Up @@ -53,10 +52,7 @@ void _tests() {
// also update this code to reflect the new output.
//
// This test is flexible w.r.t. leading and trailing whitespace.
testWidgets('generates code',
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787 [leaks-to-clean]
experimentalLeakTesting: LeakTesting.settings.withIgnoredAll(),
(WidgetTester tester) async {
testWidgets('generates code', (WidgetTester tester) async {
final SemanticsTester semantics = SemanticsTester(tester);
await pumpTestWidget(tester);
final String code = semantics
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/test/widgets/shape_decoration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Future<void> main() async {
final ImageProvider image = TestImageProvider(0, 0, image: rawImage);

testWidgets('ShapeDecoration.image',
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787 [leaks-to-clean]
// TODO(polina-c): dispose ImageStreamCompleterHandle, https://github.com/flutter/flutter/issues/145599 [leaks-to-clean]
experimentalLeakTesting: LeakTesting.settings.withIgnoredAll(),
(WidgetTester tester) async {
await tester.pumpWidget(
Expand Down
3 changes: 1 addition & 2 deletions packages/flutter/test/widgets/view_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,7 @@ void main() {
});

testWidgets('correctly switches between view configurations',
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787 [leaks-to-clean]
experimentalLeakTesting: LeakTesting.settings.withIgnoredAll(),
experimentalLeakTesting: LeakTesting.settings.withIgnoredAll(), // Leaking by design as contains deprecated items.
(WidgetTester tester) async {
await tester.pumpWidget(
wrapWithView: false,
Expand Down

0 comments on commit c4a7cf2

Please sign in to comment.