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
71acf242
Unverified
Commit
71acf242
authored
Oct 01, 2023
by
derdilla
Committed by
GitHub
Oct 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
leak track page_test.dart (#135352)
parent
f610b9c3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
page_test.dart
packages/flutter/test/cupertino/page_test.dart
+17
-10
No files found.
packages/flutter/test/cupertino/page_test.dart
View file @
71acf242
...
...
@@ -4,9 +4,10 @@
import
'package:flutter/cupertino.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'
;
void
main
(
)
{
testWidgets
(
'test iOS page transition (LTR)'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'test iOS page transition (LTR)'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
onGenerateRoute:
(
RouteSettings
settings
)
{
...
...
@@ -79,7 +80,7 @@ void main() {
expect
(
widget1InitialTopLeft
,
equals
(
widget1TransientTopLeft
));
});
testWidgets
(
'test iOS page transition (RTL)'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'test iOS page transition (RTL)'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
localizationsDelegates:
const
<
LocalizationsDelegate
<
dynamic
>>[
...
...
@@ -150,7 +151,7 @@ void main() {
expect
(
widget1InitialTopLeft
,
equals
(
widget1TransientTopLeft
));
});
testWidgets
(
'test iOS fullscreen dialog transition'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'test iOS fullscreen dialog transition'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
const
CupertinoApp
(
home:
Center
(
child:
Text
(
'Page 1'
)),
...
...
@@ -210,7 +211,7 @@ void main() {
expect
(
widget1InitialTopLeft
,
equals
(
widget1TransientTopLeft
));
});
testWidgets
(
'test only edge swipes work (LTR)'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'test only edge swipes work (LTR)'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
onGenerateRoute:
(
RouteSettings
settings
)
{
...
...
@@ -271,7 +272,7 @@ void main() {
expect
(
find
.
text
(
'Page 2'
),
isOnstage
);
});
testWidgets
(
'test edge swipes work with media query padding (LTR)'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'test edge swipes work with media query padding (LTR)'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
builder:
(
BuildContext
context
,
Widget
?
navigator
)
{
...
...
@@ -315,7 +316,7 @@ void main() {
expect
(
find
.
text
(
'Page 2'
),
isOnstage
);
});
testWidgets
(
'test edge swipes work with media query padding (RLT)'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'test edge swipes work with media query padding (RLT)'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
builder:
(
BuildContext
context
,
Widget
?
navigator
)
{
...
...
@@ -363,7 +364,7 @@ void main() {
expect
(
find
.
text
(
'Page 2'
),
isOnstage
);
});
testWidgets
(
'test only edge swipes work (RTL)'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'test only edge swipes work (RTL)'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
localizationsDelegates:
const
<
LocalizationsDelegate
<
dynamic
>>[
...
...
@@ -428,7 +429,7 @@ void main() {
expect
(
find
.
text
(
'Page 2'
),
isOnstage
);
});
testWidgets
(
'test edge swipe then drop back at starting point works'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'test edge swipe then drop back at starting point works'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
CupertinoApp
(
onGenerateRoute:
(
RouteSettings
settings
)
{
...
...
@@ -463,7 +464,7 @@ void main() {
expect
(
find
.
text
(
'Page 2'
),
isOnstage
);
});
testWidgets
(
'CupertinoPage does not lose its state when transitioning out'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'CupertinoPage does not lose its state when transitioning out'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
<
NavigatorState
>
navigator
=
GlobalKey
<
NavigatorState
>();
await
tester
.
pumpWidget
(
KeepsStateTestWidget
(
navigatorKey:
navigator
));
expect
(
find
.
text
(
'subpage'
),
findsOneWidget
);
...
...
@@ -476,7 +477,7 @@ void main() {
expect
(
find
.
text
(
'home'
),
findsOneWidget
);
});
testWidgets
(
'CupertinoPage restores its state'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'CupertinoPage restores its state'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
RootRestorationScope
(
restorationId:
'root'
,
...
...
@@ -610,6 +611,12 @@ class _TestRestorableWidgetState extends State<TestRestorableWidget> with Restor
registerForRestoration
(
counter
,
'counter'
);
}
@override
void
dispose
()
{
super
.
dispose
();
counter
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
return
Column
(
...
...
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