Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
6dff3da3
Unverified
Commit
6dff3da3
authored
Jan 30, 2024
by
Polina Cherkasova
Committed by
GitHub
Jan 30, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Organize leak tracking TODOs. (#142460)
parent
5c64d037
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
54 additions
and
84 deletions
+54
-84
live_binding_test.dart
packages/flutter/test/animation/live_binding_test.dart
+1
-1
refresh_test.dart
packages/flutter/test/cupertino/refresh_test.dart
+1
-1
circle_avatar_test.dart
packages/flutter/test/material/circle_avatar_test.dart
+1
-1
input_decorator_test.dart
packages/flutter/test/material/input_decorator_test.dart
+1
-1
scaffold_test.dart
packages/flutter/test/material/scaffold_test.dart
+1
-1
decoration_image_lerp_test.dart
...ges/flutter/test/painting/decoration_image_lerp_test.dart
+3
-3
image_stream_test.dart
packages/flutter/test/painting/image_stream_test.dart
+1
-1
system_fonts_test.dart
packages/flutter/test/painting/system_fonts_test.dart
+1
-1
semantics_elevation_test.dart
...ages/flutter/test/semantics/semantics_elevation_test.dart
+1
-1
basic_test.dart
packages/flutter/test/widgets/basic_test.dart
+1
-1
context_menu_controller_test.dart
...es/flutter/test/widgets/context_menu_controller_test.dart
+2
-2
draggable_test.dart
packages/flutter/test/widgets/draggable_test.dart
+1
-1
image_test.dart
packages/flutter/test/widgets/image_test.dart
+12
-12
nested_scroll_view_test.dart
packages/flutter/test/widgets/nested_scroll_view_test.dart
+1
-4
overscroll_indicator_test.dart
packages/flutter/test/widgets/overscroll_indicator_test.dart
+1
-1
page_view_test.dart
packages/flutter/test/widgets/page_view_test.dart
+8
-21
pageable_list_test.dart
packages/flutter/test/widgets/pageable_list_test.dart
+1
-5
scroll_aware_image_provider_test.dart
...lutter/test/widgets/scroll_aware_image_provider_test.dart
+9
-6
scrollable_restoration_test.dart
...ges/flutter/test/widgets/scrollable_restoration_test.dart
+3
-9
semantics_tester_generate_test_semantics_expression_for_current_semantics_tree_test.dart
...semantics_expression_for_current_semantics_tree_test.dart
+1
-1
shape_decoration_test.dart
packages/flutter/test/widgets/shape_decoration_test.dart
+1
-1
tracking_scroll_controller_test.dart
...flutter/test/widgets/tracking_scroll_controller_test.dart
+2
-9
No files found.
packages/flutter/test/animation/live_binding_test.dart
View file @
6dff3da3
...
...
@@ -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
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
AnimationSheetBuilder
animationSheet
=
AnimationSheetBuilder
(
frameSize:
const
Size
(
200
,
200
),
allLayers:
true
);
...
...
packages/flutter/test/cupertino/refresh_test.dart
View file @
6dff3da3
...
...
@@ -36,7 +36,7 @@ void main() {
void
uiTestGroup
()
{
testWidgets
(
"doesn't invoke anything without user interaction"
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
packages/flutter/test/material/circle_avatar_test.dart
View file @
6dff3da3
...
...
@@ -96,7 +96,7 @@ void main() {
});
testWidgets
(
'CircleAvatar backgroundImage is used as a fallback for foregroundImage'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
ErrorImageProvider
errorImage
=
ErrorImageProvider
();
...
...
packages/flutter/test/material/input_decorator_test.dart
View file @
6dff3da3
...
...
@@ -170,7 +170,7 @@ void main() {
void
runAllTests
(
{
required
bool
useMaterial3
})
{
testWidgets
(
'InputDecorator input/label text layout'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
// The label appears above the input text
...
...
packages/flutter/test/material/scaffold_test.dart
View file @
6dff3da3
...
...
@@ -2207,7 +2207,7 @@ void main() {
testWidgets
(
'didUpdate bottomSheet while a previous bottom sheet is still displayed'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
GlobalKey
<
ScaffoldState
>
key
=
GlobalKey
<
ScaffoldState
>();
...
...
packages/flutter/test/painting/decoration_image_lerp_test.dart
View file @
6dff3da3
...
...
@@ -18,7 +18,7 @@ import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
void
main
(
)
{
testWidgets
(
'ImageDecoration.lerp'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
MemoryImage
green
=
MemoryImage
(
Uint8List
.
fromList
(<
int
>[
...
...
@@ -195,7 +195,7 @@ void main() {
},
skip:
kIsWeb
);
// TODO(ianh): https://github.com/flutter/flutter/issues/130612, https://github.com/flutter/flutter/issues/130609
testWidgets
(
'ImageDecoration.lerp'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
MemoryImage
cmyk
=
MemoryImage
(
Uint8List
.
fromList
(<
int
>[
...
...
@@ -416,7 +416,7 @@ void main() {
},
skip:
kIsWeb
);
// TODO(ianh): https://github.com/flutter/flutter/issues/130612, https://github.com/flutter/flutter/issues/130609
testWidgets
(
'ImageDecoration.lerp with colored background'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
MemoryImage
cmyk
=
MemoryImage
(
Uint8List
.
fromList
(<
int
>[
...
...
packages/flutter/test/painting/image_stream_test.dart
View file @
6dff3da3
...
...
@@ -78,7 +78,7 @@ class FakeEventReportingImageStreamCompleter extends ImageStreamCompleter {
}
void
main
(
)
{
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
LeakTesting
.
settings
=
LeakTesting
.
settings
.
withIgnoredAll
();
late
Image
image20x10
;
...
...
packages/flutter/test/painting/system_fonts_test.dart
View file @
6dff3da3
...
...
@@ -38,7 +38,7 @@ Future<void> verifyMarkedNeedsLayoutDuringTransientCallbacksPhase(WidgetTester t
void
main
(
)
{
testWidgets
(
'RenderParagraph relayout upon system fonts changes'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
packages/flutter/test/semantics/semantics_elevation_test.dart
View file @
6dff3da3
...
...
@@ -11,7 +11,7 @@ import '../widgets/semantics_tester.dart';
void
main
(
)
{
testWidgets
(
'SemanticsNodes overlapping in z'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
// Cards are semantic boundaries that always own their own SemanticNode,
...
...
packages/flutter/test/widgets/basic_test.dart
View file @
6dff3da3
...
...
@@ -22,7 +22,7 @@ import 'semantics_tester.dart';
void
main
(
)
{
group
(
'RawImage'
,
()
{
testWidgets
(
'properties'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
ui
.
Image
image1
=
(
await
tester
.
runAsync
<
ui
.
Image
>(()
=>
createTestImage
()))!;
...
...
packages/flutter/test/widgets/context_menu_controller_test.dart
View file @
6dff3da3
...
...
@@ -92,7 +92,7 @@ void main() {
});
testWidgets
(
'A menu can be hidden and then reshown'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
GlobalKey
key1
=
GlobalKey
();
...
...
@@ -183,7 +183,7 @@ void main() {
});
testWidgets
(
'Calling show when a built-in widget is already showing its context menu hides the built-in menu'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
GlobalKey
builtInKey
=
GlobalKey
();
...
...
packages/flutter/test/widgets/draggable_test.dart
View file @
6dff3da3
...
...
@@ -3432,7 +3432,7 @@ void main() {
// Regression test for https://github.com/flutter/flutter/issues/92083
testWidgets
(
'feedback respect the MouseRegion cursor configure'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
packages/flutter/test/widgets/image_test.dart
View file @
6dff3da3
...
...
@@ -798,7 +798,7 @@ void main() {
});
testWidgets
(
'Precache'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
_TestImageProvider
provider
=
_TestImageProvider
();
...
...
@@ -823,7 +823,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
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
_TestImageStreamCompleter
imageStreamCompleter
=
_TestImageStreamCompleter
();
...
...
@@ -1021,7 +1021,7 @@ void main() {
});
testWidgets
(
'Image invokes frameBuilder with correct frameNumber argument'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
ui
.
Codec
codec
=
(
await
tester
.
runAsync
(()
{
...
...
@@ -1093,7 +1093,7 @@ void main() {
});
testWidgets
(
'Image invokes frameBuilder with correct wasSynchronouslyLoaded=true'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
_TestImageStreamCompleter
streamCompleter
=
_TestImageStreamCompleter
(
ImageInfo
(
image:
image10x10
.
clone
()));
...
...
@@ -1154,7 +1154,7 @@ void main() {
});
testWidgets
(
'Image state handles enabling and disabling of tickers'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
ui
.
Codec
codec
=
(
await
tester
.
runAsync
(()
{
...
...
@@ -1565,7 +1565,7 @@ void main() {
});
testWidgets
(
'precacheImage does not hold weak ref for more than a frame'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
imageCache
.
maximumSize
=
0
;
...
...
@@ -1619,7 +1619,7 @@ void main() {
});
testWidgets
(
'precacheImage allows time to take over weak reference'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
_TestImageProvider
provider
=
_TestImageProvider
();
...
...
@@ -1673,7 +1673,7 @@ void main() {
});
testWidgets
(
'evict an image during precache'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
// This test checks that the live image tracking does not hold on to a
...
...
@@ -1790,7 +1790,7 @@ void main() {
testWidgets
(
'Rotated images'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
await
testRotatedImage
(
tester
,
true
);
...
...
@@ -1801,7 +1801,7 @@ void main() {
testWidgets
(
'Image opacity'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
Key
key
=
UniqueKey
();
...
...
@@ -1852,7 +1852,7 @@ void main() {
);
testWidgets
(
'Reports image size when painted'
,
// TODO(polina-c): make sure images are disposed, https://github.com/flutter/flutter/issues/141388
// 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
{
late
ImageSizeInfo
imageSizeInfo
;
...
...
@@ -1964,7 +1964,7 @@ void main() {
});
testWidgets
(
'Load a good image after a bad image was loaded should not call errorBuilder'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
UniqueKey
errorKey
=
UniqueKey
();
...
...
packages/flutter/test/widgets/nested_scroll_view_test.dart
View file @
6dff3da3
...
...
@@ -534,10 +534,7 @@ void main() {
expect
(
find
.
text
(
'ddd1'
),
findsOneWidget
);
});
testWidgets
(
'Three NestedScrollViews with one ScrollController'
,
// TODO(polina-c): Remove when PageView is fixed, https://github.com/flutter/flutter/issues/141119
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
testWidgets
(
'Three NestedScrollViews with one ScrollController'
,
(
WidgetTester
tester
)
async
{
final
TrackingScrollController
controller
=
TrackingScrollController
();
addTearDown
(
controller
.
dispose
);
expect
(
controller
.
mostRecentlyUpdatedPosition
,
isNull
);
...
...
packages/flutter/test/widgets/overscroll_indicator_test.dart
View file @
6dff3da3
...
...
@@ -293,7 +293,7 @@ void main() {
});
testWidgets
(
'Nested overscrolls do not throw exceptions'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
Directionality
(
...
...
packages/flutter/test/widgets/page_view_test.dart
View file @
6dff3da3
...
...
@@ -7,7 +7,6 @@ import 'package:flutter/gestures.dart' show DragStartBehavior;
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'
;
import
'../rendering/rendering_tester.dart'
show
TestClipPaintingContext
;
import
'semantics_tester.dart'
;
...
...
@@ -15,10 +14,7 @@ import 'states.dart';
void
main
(
)
{
// Regression test for https://github.com/flutter/flutter/issues/100451
testWidgets
(
'PageView.builder respects findChildIndexCallback'
,
// TODO(polina-c): Remove when PageView is fixed, https://github.com/flutter/flutter/issues/141119
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
testWidgets
(
'PageView.builder respects findChildIndexCallback'
,
(
WidgetTester
tester
)
async
{
bool
finderCalled
=
false
;
int
itemCount
=
7
;
late
StateSetter
stateSetter
;
...
...
@@ -333,10 +329,7 @@ void main() {
expect
(
find
.
text
(
'California'
),
findsOneWidget
);
});
testWidgets
(
'PageController page stability'
,
// TODO(polina-c): Remove when PageView is fixed, https://github.com/flutter/flutter/issues/141119
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
testWidgets
(
'PageController page stability'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
Center
(
...
...
@@ -422,10 +415,7 @@ void main() {
expect
(
previousPageCompleted
,
true
);
});
testWidgets
(
'PageView in zero-size container'
,
// TODO(polina-c): Remove when PageView is fixed, https://github.com/flutter/flutter/issues/141119
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
testWidgets
(
'PageView in zero-size container'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
Center
(
...
...
@@ -605,10 +595,7 @@ void main() {
expect
(
tester
.
getTopLeft
(
find
.
text
(
'Idaho'
)),
const
Offset
(
790.0
,
0.0
));
});
testWidgets
(
'Page snapping disable and reenable'
,
// TODO(polina-c): Remove when PageView is fixed, https://github.com/flutter/flutter/issues/141119
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
testWidgets
(
'Page snapping disable and reenable'
,
(
WidgetTester
tester
)
async
{
final
List
<
int
>
log
=
<
int
>[];
Widget
build
({
required
bool
pageSnapping
})
{
...
...
@@ -1333,20 +1320,20 @@ void main() {
}
Future
<
void
>
testPageViewWithController
(
PageController
controller
,
WidgetTester
tester
,
bool
controls
)
async
{
int
curentVisiblePage
()
{
int
cur
r
entVisiblePage
()
{
return
int
.
parse
(
tester
.
widgetList
(
find
.
byType
(
Text
)).
whereType
<
Text
>().
first
.
data
!);
}
final
int
initialPageInView
=
curentVisiblePage
();
final
int
initialPageInView
=
cur
r
entVisiblePage
();
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
if
(
controls
)
{
controller
.
jumpToPage
(
i
);
await
tester
.
pumpAndSettle
();
expect
(
curentVisiblePage
(),
i
);
expect
(
cur
r
entVisiblePage
(),
i
);
}
else
{
expect
(()=>
controller
.
jumpToPage
(
i
),
throwsAssertionError
);
expect
(
curentVisiblePage
(),
initialPageInView
);
expect
(
cur
r
entVisiblePage
(),
initialPageInView
);
}
}
}
...
...
packages/flutter/test/widgets/pageable_list_test.dart
View file @
6dff3da3
...
...
@@ -4,7 +4,6 @@
import
'package:flutter/widgets.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'
;
Size
pageSize
=
const
Size
(
600.0
,
300.0
);
const
List
<
int
>
defaultPages
=
<
int
>[
0
,
1
,
2
,
3
,
4
,
5
];
...
...
@@ -60,10 +59,7 @@ Future<void> pageRight(WidgetTester tester) {
}
void
main
(
)
{
testWidgets
(
'PageView default control'
,
// TODO(polina-c): Remove when PageView is fixed, https://github.com/flutter/flutter/issues/141119
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
testWidgets
(
'PageView default control'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
Directionality
(
textDirection:
TextDirection
.
ltr
,
...
...
packages/flutter/test/widgets/scroll_aware_image_provider_test.dart
View file @
6dff3da3
...
...
@@ -35,7 +35,7 @@ void main() {
}
testWidgets
(
'ScrollAwareImageProvider does not delay if widget is not in scrollable'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
GlobalKey
<
TestWidgetState
>
key
=
GlobalKey
<
TestWidgetState
>();
...
...
@@ -65,7 +65,10 @@ void main() {
expect
(
imageCache
.
currentSize
,
1
);
});
testWidgets
(
'ScrollAwareImageProvider does not delay if in scrollable that is not scrolling'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'ScrollAwareImageProvider does not delay if in scrollable that is not scrolling'
,
// 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
GlobalKey
<
TestWidgetState
>
key
=
GlobalKey
<
TestWidgetState
>();
await
tester
.
pumpWidget
(
Directionality
(
textDirection:
TextDirection
.
ltr
,
...
...
@@ -103,7 +106,7 @@ void main() {
});
testWidgets
(
'ScrollAwareImageProvider does not delay if in scrollable that is scrolling slowly'
,
// TODO(polina-c): make sure images are disposed, https://github.com/flutter/flutter/issues/141388
// 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
>>[];
...
...
@@ -234,7 +237,7 @@ void main() {
});
testWidgets
(
'ScrollAwareImageProvider delays if in scrollable that is scrolling fast and fizzles if disposed'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
List
<
GlobalKey
<
TestWidgetState
>>
keys
=
<
GlobalKey
<
TestWidgetState
>>[];
...
...
@@ -308,7 +311,7 @@ void main() {
});
testWidgets
(
'ScrollAwareImageProvider resolves from ImageCache and does not set completer twice'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
GlobalKey
<
TestWidgetState
>
key
=
GlobalKey
<
TestWidgetState
>();
...
...
@@ -361,7 +364,7 @@ void main() {
});
testWidgets
(
'ScrollAwareImageProvider does not block LRU updates to image cache'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
int
oldSize
=
imageCache
.
maximumSize
;
...
...
packages/flutter/test/widgets/scrollable_restoration_test.dart
View file @
6dff3da3
...
...
@@ -264,7 +264,7 @@ void main() {
});
testWidgets
(
'PageView restoration'
,
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -282,10 +282,7 @@ void main() {
await
pageViewScrollAndRestore
(
tester
);
});
testWidgets
(
'PageView.builder restoration'
,
// TODO(polina-c): Remove when PageView is fixed, https://github.com/flutter/flutter/issues/141119
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
testWidgets
(
'PageView.builder restoration'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
TestHarness
(
child:
PageView
.
builder
(
...
...
@@ -301,10 +298,7 @@ void main() {
await
pageViewScrollAndRestore
(
tester
);
});
testWidgets
(
'PageView.custom restoration'
,
// TODO(polina-c): Remove when PageView is fixed, https://github.com/flutter/flutter/issues/141119
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
testWidgets
(
'PageView.custom restoration'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
TestHarness
(
child:
PageView
.
custom
(
...
...
packages/flutter/test/widgets/semantics_tester_generate_test_semantics_expression_for_current_semantics_tree_test.dart
View file @
6dff3da3
...
...
@@ -54,7 +54,7 @@ void _tests() {
//
// 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
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
...
packages/flutter/test/widgets/shape_decoration_test.dart
View file @
6dff3da3
...
...
@@ -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
// TODO(polina-c): clean up leaks, https://github.com/flutter/flutter/issues/134787
[leaks-to-clean]
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
packages/flutter/test/widgets/tracking_scroll_controller_test.dart
View file @
6dff3da3
...
...
@@ -4,13 +4,9 @@
import
'package:flutter/widgets.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:leak_tracker_testing/leak_tracker_testing.dart'
;
void
main
(
)
{
testWidgets
(
'TrackingScrollController saves offset'
,
// TODO(polina-c): Remove when PageView is fixed, https://github.com/flutter/flutter/issues/141119
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
testWidgets
(
'TrackingScrollController saves offset'
,
(
WidgetTester
tester
)
async
{
final
TrackingScrollController
controller
=
TrackingScrollController
();
addTearDown
(
controller
.
dispose
);
const
double
listItemHeight
=
100.0
;
...
...
@@ -64,10 +60,7 @@ void main() {
expect
(
controller
.
initialScrollOffset
,
0.0
);
});
testWidgets
(
'TrackingScrollController saves offset'
,
// TODO(polina-c): Remove when PageView is fixed, https://github.com/flutter/flutter/issues/141119
experimentalLeakTesting:
LeakTesting
.
settings
.
withIgnoredAll
(),
(
WidgetTester
tester
)
async
{
testWidgets
(
'TrackingScrollController saves offset'
,
(
WidgetTester
tester
)
async
{
int
attach
=
0
;
int
detach
=
0
;
final
TrackingScrollController
controller
=
TrackingScrollController
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment