Skip to content

Commit 65e3007

Browse files
authored
Remove opt out for CurvedAnimation. (#147594)
1 parent 0214afb commit 65e3007

33 files changed

+46
-224
lines changed

packages/flutter/test/cupertino/context_menu_test.dart

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'package:flutter/foundation.dart';
88
import 'package:flutter/gestures.dart';
99
import 'package:flutter/rendering.dart';
1010
import 'package:flutter_test/flutter_test.dart';
11-
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
1211

1312
void main() {
1413
final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized();
@@ -143,10 +142,7 @@ void main() {
143142
expect(tester.getRect(find.byWidget(child)), childRect);
144143
});
145144

146-
testWidgets('Can open CupertinoContextMenu by tap and hold',
147-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
148-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
149-
(WidgetTester tester) async {
145+
testWidgets('Can open CupertinoContextMenu by tap and hold', (WidgetTester tester) async {
150146
final Widget child = getChild();
151147
await tester.pumpWidget(getContextMenu(child: child));
152148
expect(find.byWidget(child), findsOneWidget);
@@ -593,10 +589,7 @@ void main() {
593589
expect(findStatic(), findsNothing);
594590
});
595591

596-
testWidgets('Can close CupertinoContextMenu by flinging down',
597-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
598-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
599-
(WidgetTester tester) async {
592+
testWidgets('Can close CupertinoContextMenu by flinging down', (WidgetTester tester) async {
600593
final Widget child = getChild();
601594
await tester.pumpWidget(getContextMenu(child: child));
602595

packages/flutter/test/cupertino/dialog_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import 'package:flutter/foundation.dart';
1515
import 'package:flutter/material.dart';
1616
import 'package:flutter/rendering.dart';
1717
import 'package:flutter_test/flutter_test.dart';
18-
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
1918

2019
import '../widgets/semantics_tester.dart';
2120

@@ -356,10 +355,7 @@ void main() {
356355
expect(tester.getSize(find.widgetWithText(CupertinoDialogAction, 'OK')), equals(const Size(310.0, 98.0)));
357356
});
358357

359-
testWidgets('Dialog respects small constraints.',
360-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
361-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
362-
(WidgetTester tester) async {
358+
testWidgets('Dialog respects small constraints.', (WidgetTester tester) async {
363359
final ScrollController scrollController = ScrollController();
364360
addTearDown(scrollController.dispose);
365361
await tester.pumpWidget(

packages/flutter/test/cupertino/route_test.dart

Lines changed: 11 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import 'package:flutter/foundation.dart';
1212
import 'package:flutter/material.dart';
1313
import 'package:flutter/rendering.dart';
1414
import 'package:flutter_test/flutter_test.dart';
15-
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
1615

1716
import '../widgets/semantics_tester.dart';
1817

@@ -644,10 +643,7 @@ void main() {
644643
);
645644
});
646645

647-
testWidgets('Fullscreen route animates correct transform values over time',
648-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
649-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
650-
(WidgetTester tester) async {
646+
testWidgets('Fullscreen route animates correct transform values over time', (WidgetTester tester) async {
651647
await tester.pumpWidget(
652648
CupertinoApp(
653649
home: Builder(
@@ -865,17 +861,11 @@ void main() {
865861
expect(tester.getTopLeft(find.byType(Placeholder)).dx, moreOrLessEquals(-0.0, epsilon: 1.0));
866862
}
867863

868-
testWidgets('CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top',
869-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
870-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
871-
(WidgetTester tester) async {
864+
testWidgets('CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top', (WidgetTester tester) async {
872865
await testParallax(tester, fromFullscreenDialog: false);
873866
});
874867

875-
testWidgets('FullscreenDialog CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top',
876-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
877-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
878-
(WidgetTester tester) async {
868+
testWidgets('FullscreenDialog CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top', (WidgetTester tester) async {
879869
await testParallax(tester, fromFullscreenDialog: true);
880870
});
881871

@@ -989,17 +979,11 @@ void main() {
989979
expect(tester.getTopLeft(find.byType(Placeholder)).dx, moreOrLessEquals(0.0, epsilon: 1.0));
990980
}
991981

992-
testWidgets('CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top and gets popped before the end of the animation',
993-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
994-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
995-
(WidgetTester tester) async {
982+
testWidgets('CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top and gets popped before the end of the animation', (WidgetTester tester) async {
996983
await testParallax(tester, fromFullscreenDialog: false);
997984
});
998985

999-
testWidgets('FullscreenDialog CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top and gets popped before the end of the animation',
1000-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
1001-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
1002-
(WidgetTester tester) async {
986+
testWidgets('FullscreenDialog CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top and gets popped before the end of the animation', (WidgetTester tester) async {
1003987
await testParallax(tester, fromFullscreenDialog: true);
1004988
});
1005989
});
@@ -1085,24 +1069,15 @@ void main() {
10851069
expect(tester.getTopLeft(find.byType(Placeholder)).dx, 0.0);
10861070
}
10871071

1088-
testWidgets('CupertinoPageRoute has no parallax when fullscreenDialog route is pushed on top',
1089-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
1090-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
1091-
(WidgetTester tester) async {
1072+
testWidgets('CupertinoPageRoute has no parallax when fullscreenDialog route is pushed on top', (WidgetTester tester) async {
10921073
await testNoParallax(tester, fromFullscreenDialog: false);
10931074
});
10941075

1095-
testWidgets('FullscreenDialog CupertinoPageRoute has no parallax when fullscreenDialog route is pushed on top',
1096-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
1097-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
1098-
(WidgetTester tester) async {
1076+
testWidgets('FullscreenDialog CupertinoPageRoute has no parallax when fullscreenDialog route is pushed on top', (WidgetTester tester) async {
10991077
await testNoParallax(tester, fromFullscreenDialog: true);
11001078
});
11011079

1102-
testWidgets('Animated push/pop is not linear',
1103-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
1104-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
1105-
(WidgetTester tester) async {
1080+
testWidgets('Animated push/pop is not linear', (WidgetTester tester) async {
11061081
await tester.pumpWidget(
11071082
const CupertinoApp(
11081083
home: Text('1'),
@@ -2620,10 +2595,7 @@ void main() {
26202595
});
26212596
});
26222597

2623-
testWidgets(
2624-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
2625-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: <String>['CurvedAnimation']),
2626-
'Fullscreen route does not leak CurveAnimation', (WidgetTester tester) async {
2598+
testWidgets( 'Fullscreen route does not leak CurveAnimation', (WidgetTester tester) async {
26272599
await tester.pumpWidget(
26282600
MaterialApp(
26292601
home: Builder(
@@ -2667,10 +2639,7 @@ void main() {
26672639
await tester.pump(const Duration(milliseconds: 400));
26682640
});
26692641

2670-
testWidgets('CupertinoModalPopupRoute does not leak CurveAnimation',
2671-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
2672-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: <String>['CurvedAnimation']),
2673-
(WidgetTester tester) async {
2642+
testWidgets('CupertinoModalPopupRoute does not leak CurveAnimation', (WidgetTester tester) async {
26742643
await tester.pumpWidget(MaterialApp(
26752644
home: Navigator(
26762645
onGenerateRoute: (RouteSettings settings) {
@@ -2697,10 +2666,7 @@ void main() {
26972666
await tester.pumpAndSettle();
26982667
});
26992668

2700-
testWidgets('CupertinoDialogRoute does not leak CurveAnimation',
2701-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
2702-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: <String>['CurvedAnimation']),
2703-
(WidgetTester tester) async {
2669+
testWidgets('CupertinoDialogRoute does not leak CurveAnimation', (WidgetTester tester) async {
27042670
await tester.pumpWidget(MaterialApp(
27052671
home: Navigator(
27062672
onGenerateRoute: (RouteSettings settings) {

packages/flutter/test/cupertino/switch_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@ import 'package:flutter/material.dart';
1414
import 'package:flutter/rendering.dart';
1515
import 'package:flutter/services.dart';
1616
import 'package:flutter_test/flutter_test.dart';
17-
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
1817

1918
void main() {
20-
testWidgets('Switch can toggle on tap',
21-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
22-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
23-
(WidgetTester tester) async {
19+
testWidgets('Switch can toggle on tap', (WidgetTester tester) async {
2420
final Key switchKey = UniqueKey();
2521
bool value = false;
2622
await tester.pumpWidget(

packages/flutter/test/flutter_test_config.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,9 @@ Future<void> testExecutable(FutureOr<void> Function() testMain) {
4343

4444
if (_isLeakTrackingEnabled()) {
4545
LeakTesting.enable();
46-
4746
LeakTracking.warnForUnsupportedPlatforms = false;
48-
4947
LeakTesting.settings = LeakTesting.settings.withIgnored(
5048
createdByTestHelpers: true,
51-
allNotGCed: true,
52-
classes: <String>[
53-
// TODO(polina-c): CurvedAnimation is leaking, https://github.com/flutter/flutter/issues/145600 [leaks-to-clean]
54-
'CurvedAnimation',
55-
],
5649
);
5750
}
5851

packages/flutter/test/material/banner_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import 'package:flutter/foundation.dart';
66
import 'package:flutter/material.dart';
77
import 'package:flutter/rendering.dart';
88
import 'package:flutter_test/flutter_test.dart';
9-
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
109

1110
void main() {
1211
testWidgets('MaterialBanner properties are respected', (WidgetTester tester) async {
@@ -508,10 +507,7 @@ void main() {
508507
expect(find.text('banner2'), findsNothing);
509508
});
510509

511-
testWidgets('ScaffoldMessenger does not duplicate a MaterialBanner when presenting a SnackBar.',
512-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
513-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
514-
(WidgetTester tester) async {
510+
testWidgets('ScaffoldMessenger does not duplicate a MaterialBanner when presenting a SnackBar.', (WidgetTester tester) async {
515511
const Key materialBannerTapTarget = Key('materialbanner-tap-target');
516512
const Key snackBarTapTarget = Key('snackbar-tap-target');
517513
const String snackBarText = 'SnackBar';

packages/flutter/test/material/banner_theme_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import 'package:flutter/material.dart';
66
import 'package:flutter/rendering.dart';
77
import 'package:flutter_test/flutter_test.dart';
8-
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
98

109
void main() {
1110
test('MaterialBannerThemeData copyWith, ==, hashCode basics', () {
@@ -325,10 +324,7 @@ void main() {
325324
expect(find.byType(Divider), findsNothing);
326325
});
327326

328-
testWidgets('MaterialBanner widget properties take priority over theme when presented by ScaffoldMessenger',
329-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
330-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
331-
(WidgetTester tester) async {
327+
testWidgets('MaterialBanner widget properties take priority over theme when presented by ScaffoldMessenger', (WidgetTester tester) async {
332328
const Color backgroundColor = Colors.purple;
333329
const double elevation = 6.0;
334330
const TextStyle textStyle = TextStyle(color: Colors.green);

packages/flutter/test/material/bottom_navigation_bar_test.dart

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import 'package:flutter/foundation.dart';
1414
import 'package:flutter/material.dart';
1515
import 'package:flutter/rendering.dart';
1616
import 'package:flutter_test/flutter_test.dart';
17-
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
1817
import 'package:vector_math/vector_math_64.dart' show Vector3;
1918

2019
import '../widgets/feedback_tester.dart';
@@ -2188,10 +2187,7 @@ void main() {
21882187
);
21892188
});
21902189

2191-
testWidgets('BottomNavigationBar handles items.length changes',
2192-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
2193-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
2194-
(WidgetTester tester) async {
2190+
testWidgets('BottomNavigationBar handles items.length changes', (WidgetTester tester) async {
21952191
// Regression test for https://github.com/flutter/flutter/issues/10322
21962192

21972193
Widget buildFrame(int itemCount) {
@@ -2326,10 +2322,7 @@ void main() {
23262322
);
23272323
}
23282324
for (int pump = 1; pump < 9; pump++) {
2329-
testWidgets('pump $pump',
2330-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
2331-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']).withCreationStackTrace(),
2332-
(WidgetTester tester) async {
2325+
testWidgets('pump $pump', (WidgetTester tester) async {
23332326
await tester.pumpWidget(runTest());
23342327
await tester.tap(find.text('Green'));
23352328

packages/flutter/test/material/bottom_sheet_test.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import 'dart:ui';
77
import 'package:flutter/foundation.dart';
88
import 'package:flutter/material.dart';
99
import 'package:flutter_test/flutter_test.dart';
10-
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
11-
1210
import '../widgets/semantics_tester.dart';
1311

1412
void main() {
@@ -1283,10 +1281,7 @@ void main() {
12831281
await checkDragHandleAndColors();
12841282
});
12851283

1286-
testWidgets('showModalBottomSheet does not use root Navigator by default',
1287-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
1288-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
1289-
(WidgetTester tester) async {
1284+
testWidgets('showModalBottomSheet does not use root Navigator by default', (WidgetTester tester) async {
12901285
await tester.pumpWidget(MaterialApp(
12911286
home: Scaffold(
12921287
body: Navigator(onGenerateRoute: (RouteSettings settings) => MaterialPageRoute<void>(builder: (_) {

packages/flutter/test/material/data_table_theme_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import 'package:flutter/gestures.dart';
66
import 'package:flutter/material.dart';
77
import 'package:flutter/rendering.dart';
88
import 'package:flutter_test/flutter_test.dart';
9-
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
109

1110
void main() {
1211
test('DataTableThemeData copyWith, ==, hashCode basics', () {
@@ -553,10 +552,7 @@ void main() {
553552
});
554553

555554
// This is a regression test for https://github.com/flutter/flutter/issues/143340.
556-
testWidgets('DataColumn label can be centered with DataTableTheme.headingRowAlignment',
557-
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
558-
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
559-
(WidgetTester tester) async {
555+
testWidgets('DataColumn label can be centered with DataTableTheme.headingRowAlignment', (WidgetTester tester) async {
560556
const double horizontalMargin = 24.0;
561557

562558
Widget buildTable({ MainAxisAlignment? headingRowAlignment, bool sortEnabled = false }) {

0 commit comments

Comments
 (0)