Skip to content

Commit c57e4e7

Browse files
authored
Revert "Cover some test/widgets tests with leak tracking" (#133779)
Reverts flutter/flutter#133767 Causing failures to Mac framework_tests_widgets and Linux framework_tests_widgets
1 parent 792e26d commit c57e4e7

12 files changed

+118
-143
lines changed

packages/flutter/test/widgets/absorb_pointer_test.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44

55
import 'package:flutter/material.dart';
66
import 'package:flutter_test/flutter_test.dart';
7-
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
87

98
import 'semantics_tester.dart';
109

1110
void main() {
12-
testWidgetsWithLeakTracking('AbsorbPointers do not block siblings', (WidgetTester tester) async {
11+
testWidgets('AbsorbPointers do not block siblings', (WidgetTester tester) async {
1312
bool tapped = false;
1413
await tester.pumpWidget(
1514
Column(
@@ -30,7 +29,7 @@ void main() {
3029
});
3130

3231
group('AbsorbPointer semantics', () {
33-
testWidgetsWithLeakTracking('does not change semantics when not absorbing', (WidgetTester tester) async {
32+
testWidgets('does not change semantics when not absorbing', (WidgetTester tester) async {
3433
final UniqueKey key = UniqueKey();
3534
await tester.pumpWidget(
3635
MaterialApp(
@@ -57,7 +56,7 @@ void main() {
5756
);
5857
});
5958

60-
testWidgetsWithLeakTracking('drops semantics when its ignoreSemantics is true', (WidgetTester tester) async {
59+
testWidgets('drops semantics when its ignoreSemantics is true', (WidgetTester tester) async {
6160
final SemanticsTester semantics = SemanticsTester(tester);
6261
final UniqueKey key = UniqueKey();
6362
await tester.pumpWidget(
@@ -76,7 +75,7 @@ void main() {
7675
semantics.dispose();
7776
});
7877

79-
testWidgetsWithLeakTracking('ignores user interactions', (WidgetTester tester) async {
78+
testWidgets('ignores user interactions', (WidgetTester tester) async {
8079
final UniqueKey key = UniqueKey();
8180
await tester.pumpWidget(
8281
MaterialApp(

packages/flutter/test/widgets/actions_test.dart

Lines changed: 41 additions & 55 deletions
Large diffs are not rendered by default.

packages/flutter/test/widgets/align_test.dart

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
import 'package:flutter/widgets.dart';
66
import 'package:flutter_test/flutter_test.dart';
7-
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
87

98
void main() {
10-
testWidgetsWithLeakTracking('Align smoke test', (WidgetTester tester) async {
9+
testWidgets('Align smoke test', (WidgetTester tester) async {
1110
await tester.pumpWidget(
1211
Align(
1312
alignment: const Alignment(0.50, 0.50),
@@ -39,7 +38,7 @@ void main() {
3938
);
4039
});
4140

42-
testWidgetsWithLeakTracking('Align control test (LTR)', (WidgetTester tester) async {
41+
testWidgets('Align control test (LTR)', (WidgetTester tester) async {
4342
await tester.pumpWidget(const Directionality(
4443
textDirection: TextDirection.ltr,
4544
child: Align(
@@ -63,7 +62,7 @@ void main() {
6362
expect(tester.getBottomRight(find.byType(SizedBox)).dx, 100.0);
6463
});
6564

66-
testWidgetsWithLeakTracking('Align control test (RTL)', (WidgetTester tester) async {
65+
testWidgets('Align control test (RTL)', (WidgetTester tester) async {
6766
await tester.pumpWidget(const Directionality(
6867
textDirection: TextDirection.rtl,
6968
child: Align(
@@ -87,7 +86,7 @@ void main() {
8786
expect(tester.getBottomRight(find.byType(SizedBox)).dx, 100.0);
8887
});
8988

90-
testWidgetsWithLeakTracking('Shrink wraps in finite space', (WidgetTester tester) async {
89+
testWidgets('Shrink wraps in finite space', (WidgetTester tester) async {
9190
final GlobalKey alignKey = GlobalKey();
9291
await tester.pumpWidget(
9392
SingleChildScrollView(
@@ -106,7 +105,7 @@ void main() {
106105
expect(size.height, equals(10.0));
107106
});
108107

109-
testWidgetsWithLeakTracking('Align widthFactor', (WidgetTester tester) async {
108+
testWidgets('Align widthFactor', (WidgetTester tester) async {
110109
await tester.pumpWidget(
111110
const Directionality(
112111
textDirection: TextDirection.ltr,
@@ -129,7 +128,7 @@ void main() {
129128
expect(box.size.width, equals(50.0));
130129
});
131130

132-
testWidgetsWithLeakTracking('Align heightFactor', (WidgetTester tester) async {
131+
testWidgets('Align heightFactor', (WidgetTester tester) async {
133132
await tester.pumpWidget(
134133
const Directionality(
135134
textDirection: TextDirection.ltr,

packages/flutter/test/widgets/animated_align_test.dart

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
import 'package:flutter/widgets.dart';
66
import 'package:flutter_test/flutter_test.dart';
7-
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
87

98
void main() {
10-
testWidgetsWithLeakTracking('AnimatedAlign.debugFillProperties', (WidgetTester tester) async {
9+
testWidgets('AnimatedAlign.debugFillProperties', (WidgetTester tester) async {
1110
const AnimatedAlign box = AnimatedAlign(
1211
alignment: Alignment.topCenter,
1312
curve: Curves.ease,
@@ -16,7 +15,7 @@ void main() {
1615
expect(box, hasOneLineDescription);
1716
});
1817

19-
testWidgetsWithLeakTracking('AnimatedAlign alignment visual-to-directional animation', (WidgetTester tester) async {
18+
testWidgets('AnimatedAlign alignment visual-to-directional animation', (WidgetTester tester) async {
2019
final Key target = UniqueKey();
2120

2221
await tester.pumpWidget(
@@ -58,7 +57,7 @@ void main() {
5857
expect(tester.getTopRight(find.byKey(target)), const Offset(800.0, 400.0));
5958
});
6059

61-
testWidgetsWithLeakTracking('AnimatedAlign widthFactor', (WidgetTester tester) async {
60+
testWidgets('AnimatedAlign widthFactor', (WidgetTester tester) async {
6261
await tester.pumpWidget(
6362
const Directionality(
6463
textDirection: TextDirection.ltr,
@@ -83,7 +82,7 @@ void main() {
8382
expect(box.size.width, equals(50.0));
8483
});
8584

86-
testWidgetsWithLeakTracking('AnimatedAlign heightFactor', (WidgetTester tester) async {
85+
testWidgets('AnimatedAlign heightFactor', (WidgetTester tester) async {
8786
await tester.pumpWidget(
8887
const Directionality(
8988
textDirection: TextDirection.ltr,
@@ -107,7 +106,7 @@ void main() {
107106
expect(box.size.height, equals( 50.0));
108107
});
109108

110-
testWidgetsWithLeakTracking('AnimatedAlign null height factor', (WidgetTester tester) async {
109+
testWidgets('AnimatedAlign null height factor', (WidgetTester tester) async {
111110
await tester.pumpWidget(
112111
const Directionality(
113112
textDirection: TextDirection.ltr,
@@ -131,7 +130,7 @@ void main() {
131130
expect(box.size, equals(const Size(100.0, 100)));
132131
});
133132

134-
testWidgetsWithLeakTracking('AnimatedAlign null widthFactor', (WidgetTester tester) async {
133+
testWidgets('AnimatedAlign null widthFactor', (WidgetTester tester) async {
135134
await tester.pumpWidget(
136135
const Directionality(
137136
textDirection: TextDirection.ltr,

packages/flutter/test/widgets/animated_container_test.dart

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
import 'package:flutter/rendering.dart';
66
import 'package:flutter/widgets.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() {
11-
testWidgetsWithLeakTracking('AnimatedContainer.debugFillProperties', (WidgetTester tester) async {
10+
testWidgets('AnimatedContainer.debugFillProperties', (WidgetTester tester) async {
1211
final AnimatedContainer container = AnimatedContainer(
1312
constraints: const BoxConstraints.tightFor(width: 17.0, height: 23.0),
1413
decoration: const BoxDecoration(color: Color(0xFF00FF00)),
@@ -25,7 +24,7 @@ void main() {
2524
expect(container, hasOneLineDescription);
2625
});
2726

28-
testWidgetsWithLeakTracking('AnimatedContainer control test', (WidgetTester tester) async {
27+
testWidgets('AnimatedContainer control test', (WidgetTester tester) async {
2928
final GlobalKey key = GlobalKey();
3029

3130
const BoxDecoration decorationA = BoxDecoration(
@@ -103,7 +102,7 @@ void main() {
103102
);
104103
});
105104

106-
testWidgetsWithLeakTracking('AnimatedContainer overanimate test', (WidgetTester tester) async {
105+
testWidgets('AnimatedContainer overanimate test', (WidgetTester tester) async {
107106
await tester.pumpWidget(
108107
AnimatedContainer(
109108
duration: const Duration(milliseconds: 200),
@@ -140,7 +139,7 @@ void main() {
140139
expect(tester.binding.transientCallbackCount, 0);
141140
});
142141

143-
testWidgetsWithLeakTracking('AnimatedContainer padding visual-to-directional animation', (WidgetTester tester) async {
142+
testWidgets('AnimatedContainer padding visual-to-directional animation', (WidgetTester tester) async {
144143
final Key target = UniqueKey();
145144

146145
await tester.pumpWidget(
@@ -182,7 +181,7 @@ void main() {
182181
expect(tester.getTopRight(find.byKey(target)), const Offset(700.0, 0.0));
183182
});
184183

185-
testWidgetsWithLeakTracking('AnimatedContainer alignment visual-to-directional animation', (WidgetTester tester) async {
184+
testWidgets('AnimatedContainer alignment visual-to-directional animation', (WidgetTester tester) async {
186185
final Key target = UniqueKey();
187186

188187
await tester.pumpWidget(
@@ -224,7 +223,7 @@ void main() {
224223
expect(tester.getTopRight(find.byKey(target)), const Offset(800.0, 400.0));
225224
});
226225

227-
testWidgetsWithLeakTracking('Animation rerun', (WidgetTester tester) async {
226+
testWidgets('Animation rerun', (WidgetTester tester) async {
228227
await tester.pumpWidget(
229228
Center(
230229
child: AnimatedContainer(
@@ -292,7 +291,7 @@ void main() {
292291
expect(text.size.height, equals(100.0));
293292
});
294293

295-
testWidgetsWithLeakTracking('AnimatedContainer sets transformAlignment', (WidgetTester tester) async {
294+
testWidgets('AnimatedContainer sets transformAlignment', (WidgetTester tester) async {
296295
final Key target = UniqueKey();
297296

298297
await tester.pumpWidget(
@@ -340,7 +339,7 @@ void main() {
340339
expect(tester.getTopLeft(find.byKey(target)), const Offset(400.0, 300.0));
341340
});
342341

343-
testWidgetsWithLeakTracking('AnimatedContainer sets clipBehavior', (WidgetTester tester) async {
342+
testWidgets('AnimatedContainer sets clipBehavior', (WidgetTester tester) async {
344343
await tester.pumpWidget(
345344
AnimatedContainer(
346345
decoration: const BoxDecoration(

packages/flutter/test/widgets/animated_cross_fade_test.dart

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
import 'package:flutter/material.dart';
66
import 'package:flutter/scheduler.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() {
11-
testWidgetsWithLeakTracking('AnimatedCrossFade test', (WidgetTester tester) async {
10+
testWidgets('AnimatedCrossFade test', (WidgetTester tester) async {
1211
await tester.pumpWidget(
1312
const Directionality(
1413
textDirection: TextDirection.ltr,
@@ -62,7 +61,7 @@ void main() {
6261
expect(box.size.height, equals(150.0));
6362
});
6463

65-
testWidgetsWithLeakTracking('AnimatedCrossFade test showSecond', (WidgetTester tester) async {
64+
testWidgets('AnimatedCrossFade test showSecond', (WidgetTester tester) async {
6665
await tester.pumpWidget(
6766
const Directionality(
6867
textDirection: TextDirection.ltr,
@@ -89,7 +88,7 @@ void main() {
8988
expect(box.size.height, equals(200.0));
9089
});
9190

92-
testWidgetsWithLeakTracking('AnimatedCrossFade alignment (VISUAL)', (WidgetTester tester) async {
91+
testWidgets('AnimatedCrossFade alignment (VISUAL)', (WidgetTester tester) async {
9392
final Key firstKey = UniqueKey();
9493
final Key secondKey = UniqueKey();
9594

@@ -147,7 +146,7 @@ void main() {
147146
expect(box2.localToGlobal(Offset.zero), const Offset(275.0, 175.0));
148147
});
149148

150-
testWidgetsWithLeakTracking('AnimatedCrossFade alignment (LTR)', (WidgetTester tester) async {
149+
testWidgets('AnimatedCrossFade alignment (LTR)', (WidgetTester tester) async {
151150
final Key firstKey = UniqueKey();
152151
final Key secondKey = UniqueKey();
153152

@@ -205,7 +204,7 @@ void main() {
205204
expect(box2.localToGlobal(Offset.zero), const Offset(275.0, 175.0));
206205
});
207206

208-
testWidgetsWithLeakTracking('AnimatedCrossFade alignment (RTL)', (WidgetTester tester) async {
207+
testWidgets('AnimatedCrossFade alignment (RTL)', (WidgetTester tester) async {
209208
final Key firstKey = UniqueKey();
210209
final Key secondKey = UniqueKey();
211210

@@ -275,7 +274,7 @@ void main() {
275274
);
276275
}
277276

278-
testWidgetsWithLeakTracking('AnimatedCrossFade preserves widget state', (WidgetTester tester) async {
277+
testWidgets('AnimatedCrossFade preserves widget state', (WidgetTester tester) async {
279278
await tester.pumpWidget(crossFadeWithWatcher());
280279

281280
_TickerWatchingWidgetState findState() => tester.state(find.byType(_TickerWatchingWidget));
@@ -288,7 +287,7 @@ void main() {
288287
}
289288
});
290289

291-
testWidgetsWithLeakTracking('AnimatedCrossFade switches off TickerMode and semantics on faded out widget', (WidgetTester tester) async {
290+
testWidgets('AnimatedCrossFade switches off TickerMode and semantics on faded out widget', (WidgetTester tester) async {
292291
ExcludeSemantics findSemantics() {
293292
return tester.widget(find.descendant(
294293
of: find.byKey(const ValueKey<CrossFadeState>(CrossFadeState.showFirst)),
@@ -318,7 +317,7 @@ void main() {
318317
expect(findSemantics().excluding, true);
319318
});
320319

321-
testWidgetsWithLeakTracking('AnimatedCrossFade.layoutBuilder', (WidgetTester tester) async {
320+
testWidgets('AnimatedCrossFade.layoutBuilder', (WidgetTester tester) async {
322321
await tester.pumpWidget(
323322
const Directionality(
324323
textDirection: TextDirection.ltr,
@@ -362,7 +361,7 @@ void main() {
362361
expect(find.text('AAA'), findsNothing);
363362
});
364363

365-
testWidgetsWithLeakTracking('AnimatedCrossFade test focus', (WidgetTester tester) async {
364+
testWidgets('AnimatedCrossFade test focus', (WidgetTester tester) async {
366365
await tester.pumpWidget(
367366
Directionality(
368367
textDirection: TextDirection.ltr,
@@ -386,7 +385,7 @@ void main() {
386385
expect(hiddenNode.hasPrimaryFocus, isFalse);
387386
});
388387

389-
testWidgetsWithLeakTracking('AnimatedCrossFade bottom child can have focus', (WidgetTester tester) async {
388+
testWidgets('AnimatedCrossFade bottom child can have focus', (WidgetTester tester) async {
390389
await tester.pumpWidget(
391390
Directionality(
392391
textDirection: TextDirection.ltr,
@@ -411,7 +410,7 @@ void main() {
411410
expect(hiddenNode.hasPrimaryFocus, isTrue);
412411
});
413412

414-
testWidgetsWithLeakTracking('AnimatedCrossFade second child do not receive touch events',
413+
testWidgets('AnimatedCrossFade second child do not receive touch events',
415414
(WidgetTester tester) async {
416415
int numberOfTouchEventNoticed = 0;
417416

0 commit comments

Comments
 (0)