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
abcfdfb9
Unverified
Commit
abcfdfb9
authored
Dec 11, 2020
by
xubaolin
Committed by
GitHub
Dec 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some unit test cases(ink_well_test.dart) bug (#70447)
This change fixes some bugs in ink_well_test.dart.
parent
1219dd7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
18 deletions
+16
-18
ink_well_test.dart
packages/flutter/test/material/ink_well_test.dart
+16
-18
No files found.
packages/flutter/test/material/ink_well_test.dart
View file @
abcfdfb9
...
...
@@ -185,7 +185,7 @@ void main() {
);
await
tester
.
pumpAndSettle
();
final
RenderObject
inkFeatures
=
tester
.
allRenderObjects
.
firstWhere
((
RenderObject
object
)
=>
object
.
runtimeType
.
toString
()
==
'_RenderInkFeatures'
);
expect
(
inkFeatures
,
paintsExactlyCountTimes
(
#
r
ect
,
0
));
expect
(
inkFeatures
,
paintsExactlyCountTimes
(
#
drawR
ect
,
0
));
focusNode
.
requestFocus
();
await
tester
.
pumpAndSettle
();
expect
(
inkFeatures
,
paints
...
...
@@ -228,7 +228,7 @@ void main() {
);
await
tester
.
pumpAndSettle
();
final
RenderObject
inkFeatures
=
tester
.
allRenderObjects
.
firstWhere
((
RenderObject
object
)
=>
object
.
runtimeType
.
toString
()
==
'_RenderInkFeatures'
);
expect
(
inkFeatures
,
paintsExactlyCountTimes
(
#
r
ect
,
0
));
expect
(
inkFeatures
,
paintsExactlyCountTimes
(
#
drawR
ect
,
0
));
focusNode
.
requestFocus
();
await
tester
.
pumpAndSettle
();
expect
(
inkFeatures
,
paints
...
...
@@ -350,20 +350,18 @@ void main() {
child:
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
Center
(
child:
Focus
(
focusNode:
focusNode
,
child:
Container
(
width:
100
,
height:
100
,
child:
InkWell
(
hoverColor:
const
Color
(
0xff00ff00
),
splashColor:
const
Color
(
0xffff0000
),
focusColor:
const
Color
(
0xff0000ff
),
highlightColor:
const
Color
(
0xf00fffff
),
onTap:
()
{
},
onLongPress:
()
{
},
onHover:
(
bool
hover
)
{
},
),
child:
Container
(
width:
100
,
height:
100
,
child:
InkWell
(
focusNode:
focusNode
,
hoverColor:
const
Color
(
0xff00ff00
),
splashColor:
const
Color
(
0xffff0000
),
focusColor:
const
Color
(
0xff0000ff
),
highlightColor:
const
Color
(
0xf00fffff
),
onTap:
()
{
},
onLongPress:
()
{
},
onHover:
(
bool
hover
)
{
},
),
),
),
...
...
@@ -371,10 +369,10 @@ void main() {
));
await
tester
.
pumpAndSettle
();
final
RenderObject
inkFeatures
=
tester
.
allRenderObjects
.
firstWhere
((
RenderObject
object
)
=>
object
.
runtimeType
.
toString
()
==
'_RenderInkFeatures'
);
expect
(
inkFeatures
,
paintsExactlyCountTimes
(
#
r
ect
,
0
));
expect
(
inkFeatures
,
paintsExactlyCountTimes
(
#
drawR
ect
,
0
));
focusNode
.
requestFocus
();
await
tester
.
pumpAndSettle
();
expect
(
inkFeatures
,
paintsExactlyCountTimes
(
#
r
ect
,
0
));
expect
(
inkFeatures
,
paintsExactlyCountTimes
(
#
drawR
ect
,
0
));
});
testWidgets
(
'InkWell.mouseCursor changes cursor on hover'
,
(
WidgetTester
tester
)
async
{
...
...
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