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
a96bf714
Unverified
Commit
a96bf714
authored
Sep 20, 2023
by
derdilla
Committed by
GitHub
Sep 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cover cupertino/form_section_test with leak tracing (#135158)
parent
e6d160a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
text_form_field_row.dart
packages/flutter/lib/src/cupertino/text_form_field_row.dart
+1
-0
form_section_test.dart
packages/flutter/test/cupertino/form_section_test.dart
+10
-9
No files found.
packages/flutter/lib/src/cupertino/text_form_field_row.dart
View file @
a96bf714
...
...
@@ -313,6 +313,7 @@ class _CupertinoTextFormFieldRowState extends FormFieldState<String> {
@override
void
dispose
()
{
_cupertinoTextFormFieldRow
.
controller
?.
removeListener
(
_handleControllerChanged
);
_controller
?.
dispose
();
super
.
dispose
();
}
...
...
packages/flutter/test/cupertino/form_section_test.dart
View file @
a96bf714
...
...
@@ -5,9 +5,10 @@
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'
;
void
main
(
)
{
testWidgets
(
'Shows header'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Shows header'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
home:
Center
(
...
...
@@ -22,7 +23,7 @@ void main() {
expect
(
find
.
text
(
'Header'
),
findsOneWidget
);
});
testWidgets
(
'Shows footer'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Shows footer'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
home:
Center
(
...
...
@@ -37,7 +38,7 @@ void main() {
expect
(
find
.
text
(
'Footer'
),
findsOneWidget
);
});
testWidgets
(
'Shows long dividers in edge-to-edge section part 1'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Shows long dividers in edge-to-edge section part 1'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
home:
Center
(
...
...
@@ -54,7 +55,7 @@ void main() {
expect
(
childrenColumn
.
children
.
length
,
3
);
});
testWidgets
(
'Shows long dividers in edge-to-edge section part 2'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Shows long dividers in edge-to-edge section part 2'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
home:
Center
(
...
...
@@ -75,7 +76,7 @@ void main() {
expect
(
childrenColumn
.
children
.
length
,
5
);
});
testWidgets
(
'Does not show long dividers in insetGrouped section part 1'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Does not show long dividers in insetGrouped section part 1'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
home:
Center
(
...
...
@@ -93,7 +94,7 @@ void main() {
expect
(
childrenColumn
.
children
.
length
,
1
);
});
testWidgets
(
'Does not show long dividers in insetGrouped section part 2'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Does not show long dividers in insetGrouped section part 2'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
restorationScopeId:
'App'
,
...
...
@@ -115,7 +116,7 @@ void main() {
expect
(
childrenColumn
.
children
.
length
,
3
);
});
testWidgets
(
'Sets background color for section'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Sets background color for section'
,
(
WidgetTester
tester
)
async
{
const
Color
backgroundColor
=
CupertinoColors
.
systemBlue
;
await
tester
.
pumpWidget
(
...
...
@@ -138,7 +139,7 @@ void main() {
expect
(
boxDecoration
.
color
,
backgroundColor
);
});
testWidgets
(
'Setting clipBehavior clips children section'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Setting clipBehavior clips children section'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
home:
Center
(
...
...
@@ -153,7 +154,7 @@ void main() {
expect
(
find
.
byType
(
ClipRRect
),
findsOneWidget
);
});
testWidgets
(
'Not setting clipBehavior does not produce a RenderClipRRect object'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Not setting clipBehavior does not produce a RenderClipRRect object'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
home:
Center
(
...
...
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