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
3df6078b
Unverified
Commit
3df6078b
authored
Oct 09, 2023
by
droidbg
Committed by
GitHub
Oct 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[leak-tracking] Cover testwidgets with leak tracking in test/gestures (#136166)
parent
a1e10ee4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
transformed_monodrag_test.dart
...ages/flutter/test/gestures/transformed_monodrag_test.dart
+1
-1
transformed_scale_test.dart
packages/flutter/test/gestures/transformed_scale_test.dart
+9
-2
No files found.
packages/flutter/test/gestures/transformed_monodrag_test.dart
View file @
3df6078b
...
...
@@ -11,7 +11,7 @@ import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
void
main
(
)
{
group
(
'Horizontal'
,
()
{
testWidgets
(
'gets local coordinates'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'gets local coordinates'
,
(
WidgetTester
tester
)
async
{
int
dragCancelCount
=
0
;
final
List
<
DragDownDetails
>
downDetails
=
<
DragDownDetails
>[];
final
List
<
DragEndDetails
>
endDetails
=
<
DragEndDetails
>[];
...
...
packages/flutter/test/gestures/transformed_scale_test.dart
View file @
3df6078b
...
...
@@ -4,9 +4,10 @@
import
'package:flutter/material.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'
;
void
main
(
)
{
testWidgets
(
'gets local coordinates'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'gets local coordinates'
,
(
WidgetTester
tester
)
async
{
final
List
<
ScaleStartDetails
>
startDetails
=
<
ScaleStartDetails
>[];
final
List
<
ScaleUpdateDetails
>
updateDetails
=
<
ScaleUpdateDetails
>[];
...
...
@@ -30,7 +31,7 @@ void main() {
),
);
await
tester
.
startGesture
(
tester
.
getCenter
(
find
.
byKey
(
redContainer
))
-
const
Offset
(
20
,
20
));
final
TestGesture
gesture
=
await
tester
.
startGesture
(
tester
.
getCenter
(
find
.
byKey
(
redContainer
))
-
const
Offset
(
20
,
20
));
final
TestGesture
pointer2
=
await
tester
.
startGesture
(
tester
.
getCenter
(
find
.
byKey
(
redContainer
))
+
const
Offset
(
30
,
30
));
await
pointer2
.
moveTo
(
tester
.
getCenter
(
find
.
byKey
(
redContainer
))
+
const
Offset
(
20
,
20
));
...
...
@@ -42,5 +43,11 @@ void main() {
expect
(
startDetails
.
first
.
focalPoint
,
const
Offset
(
380
,
280
));
expect
(
startDetails
.
last
.
localFocalPoint
,
const
Offset
(
50
,
50
));
expect
(
startDetails
.
last
.
focalPoint
,
const
Offset
(
400
,
300
));
await
tester
.
pumpAndSettle
();
await
gesture
.
up
();
await
pointer2
.
up
();
await
tester
.
pumpAndSettle
();
});
}
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