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
3ae6abd9
Unverified
Commit
3ae6abd9
authored
Jun 13, 2019
by
Jonah Williams
Committed by
GitHub
Jun 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compatibility pass on flutter/material tests for JavaScript compilation. (9) (#33378)
parent
ad507723
Changes
36
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
97 additions
and
83 deletions
+97
-83
test.dart
dev/bots/test.dart
+1
-0
slider_theme.dart
packages/flutter/lib/src/material/slider_theme.dart
+1
-1
about_test.dart
packages/flutter/test/material/about_test.dart
+3
-3
bottom_app_bar_test.dart
packages/flutter/test/material/bottom_app_bar_test.dart
+3
-1
bottom_app_bar_theme_test.dart
...ages/flutter/test/material/bottom_app_bar_theme_test.dart
+1
-1
bottom_navigation_bar_test.dart
...ges/flutter/test/material/bottom_navigation_bar_test.dart
+5
-5
button_theme_test.dart
packages/flutter/test/material/button_theme_test.dart
+1
-1
buttons_test.dart
packages/flutter/test/material/buttons_test.dart
+2
-2
card_theme_test.dart
packages/flutter/test/material/card_theme_test.dart
+1
-1
chip_test.dart
packages/flutter/test/material/chip_test.dart
+9
-9
chip_theme_test.dart
packages/flutter/test/material/chip_theme_test.dart
+1
-1
circle_avatar_test.dart
packages/flutter/test/material/circle_avatar_test.dart
+1
-1
date_picker_test.dart
packages/flutter/test/material/date_picker_test.dart
+1
-1
dialog_theme_test.dart
packages/flutter/test/material/dialog_theme_test.dart
+1
-1
dropdown_test.dart
packages/flutter/test/material/dropdown_test.dart
+2
-2
flat_button_test.dart
packages/flutter/test/material/flat_button_test.dart
+2
-0
flexible_space_bar_test.dart
packages/flutter/test/material/flexible_space_bar_test.dart
+2
-2
floating_action_button_location_test.dart
...r/test/material/floating_action_button_location_test.dart
+9
-9
floating_action_button_test.dart
...es/flutter/test/material/floating_action_button_test.dart
+1
-0
ink_paint_test.dart
packages/flutter/test/material/ink_paint_test.dart
+1
-1
input_decorator_test.dart
packages/flutter/test/material/input_decorator_test.dart
+7
-6
list_tile_test.dart
packages/flutter/test/material/list_tile_test.dart
+2
-2
material_button_test.dart
packages/flutter/test/material/material_button_test.dart
+1
-0
material_test.dart
packages/flutter/test/material/material_test.dart
+2
-2
outline_button_test.dart
packages/flutter/test/material/outline_button_test.dart
+4
-2
radio_test.dart
packages/flutter/test/material/radio_test.dart
+1
-1
raised_button_test.dart
packages/flutter/test/material/raised_button_test.dart
+1
-0
slider_test.dart
packages/flutter/test/material/slider_test.dart
+1
-1
slider_theme_test.dart
packages/flutter/test/material/slider_theme_test.dart
+2
-1
snack_bar_test.dart
packages/flutter/test/material/snack_bar_test.dart
+4
-4
tab_bar_theme_test.dart
packages/flutter/test/material/tab_bar_theme_test.dart
+4
-4
tabs_test.dart
packages/flutter/test/material/tabs_test.dart
+6
-6
text_field_test.dart
packages/flutter/test/material/text_field_test.dart
+3
-2
time_picker_test.dart
packages/flutter/test/material/time_picker_test.dart
+1
-0
tooltip_test.dart
packages/flutter/test/material/tooltip_test.dart
+6
-6
image_test.dart
packages/flutter/test/widgets/image_test.dart
+4
-4
No files found.
dev/bots/test.dart
View file @
3ae6abd9
...
...
@@ -350,6 +350,7 @@ Future<void> _runWebTests() async {
'test/scheduler/'
,
'test/widgets/'
,
'test/semantics/'
,
'test/material/'
,
]);
}
...
...
packages/flutter/lib/src/material/slider_theme.dart
View file @
3ae6abd9
...
...
@@ -810,7 +810,7 @@ class SliderThemeData extends Diagnosticable {
void
debugFillProperties
(
DiagnosticPropertiesBuilder
properties
)
{
super
.
debugFillProperties
(
properties
);
const
SliderThemeData
defaultData
=
SliderThemeData
();
properties
.
add
(
D
iagnosticsProperty
<
double
>
(
'trackHeight'
,
trackHeight
,
defaultValue:
defaultData
.
trackHeight
));
properties
.
add
(
D
oubleProperty
(
'trackHeight'
,
trackHeight
,
defaultValue:
defaultData
.
trackHeight
));
properties
.
add
(
DiagnosticsProperty
<
Color
>(
'activeTrackColor'
,
activeTrackColor
,
defaultValue:
defaultData
.
activeTrackColor
));
properties
.
add
(
DiagnosticsProperty
<
Color
>(
'activeTrackColor'
,
activeTrackColor
,
defaultValue:
defaultData
.
activeTrackColor
));
properties
.
add
(
DiagnosticsProperty
<
Color
>(
'inactiveTrackColor'
,
inactiveTrackColor
,
defaultValue:
defaultData
.
inactiveTrackColor
));
...
...
packages/flutter/test/material/about_test.dart
View file @
3ae6abd9
...
...
@@ -63,7 +63,7 @@ void main() {
await
tester
.
pumpAndSettle
(
const
Duration
(
milliseconds:
100
));
expect
(
find
.
text
(
'Pirate license'
),
findsOneWidget
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'About box logic defaults to executable name for app name'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -107,7 +107,7 @@ void main() {
expect
(
find
.
text
(
'BBB'
),
findsOneWidget
);
expect
(
find
.
text
(
'Another package'
),
findsOneWidget
);
expect
(
find
.
text
(
'Another license'
),
findsOneWidget
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'LicensePage respects the notch'
,
(
WidgetTester
tester
)
async
{
const
double
safeareaPadding
=
27.0
;
...
...
@@ -132,5 +132,5 @@ void main() {
await
tester
.
pumpAndSettle
();
expect
(
tester
.
getTopLeft
(
find
.
text
(
'DEF'
)),
const
Offset
(
8.0
+
safeareaPadding
,
527.0
));
});
}
,
skip:
isBrowser
);
}
packages/flutter/test/material/bottom_app_bar_test.dart
View file @
3ae6abd9
...
...
@@ -74,14 +74,16 @@ void main() {
await
expectLater
(
find
.
byKey
(
key
),
matchesGoldenFile
(
'bottom_app_bar.custom_shape.1.png'
),
skip:
!
Platform
.
isLinux
,
);
await
pump
(
FloatingActionButtonLocation
.
centerDocked
);
await
tester
.
pumpAndSettle
();
await
expectLater
(
find
.
byKey
(
key
),
matchesGoldenFile
(
'bottom_app_bar.custom_shape.2.png'
),
skip:
!
Platform
.
isLinux
,
);
},
skip:
!
Platform
.
isLinux
);
},
skip:
isBrowser
);
testWidgets
(
'color defaults to Theme.bottomAppBarColor'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
packages/flutter/test/material/bottom_app_bar_theme_test.dart
View file @
3ae6abd9
...
...
@@ -83,7 +83,7 @@ void main() {
matchesGoldenFile
(
'bottom_app_bar_theme.custom_shape.png'
),
skip:
!
isLinux
,
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'BAB theme does not affect defaults'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
const
MaterialApp
(
...
...
packages/flutter/test/material/bottom_navigation_bar_test.dart
View file @
3ae6abd9
...
...
@@ -891,7 +891,7 @@ void main() {
await
tester
.
tap
(
find
.
text
(
'Alarm'
));
await
tester
.
pump
(
const
Duration
(
seconds:
1
));
expect
(
Theme
.
of
(
tester
.
element
(
find
.
text
(
'Alarm'
))).
brightness
,
equals
(
Brightness
.
dark
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'BottomNavigationBar iconSize test'
,
(
WidgetTester
tester
)
async
{
double
builderIconSize
;
...
...
@@ -1001,7 +1001,7 @@ void main() {
final
RenderBox
box
=
tester
.
renderObject
(
find
.
byType
(
BottomNavigationBar
));
expect
(
box
.
size
.
height
,
equals
(
66.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'BottomNavigationBar limits width of tiles with long titles'
,
(
WidgetTester
tester
)
async
{
final
Text
longTextA
=
Text
(
''
.
padLeft
(
100
,
'A'
));
...
...
@@ -1033,7 +1033,7 @@ void main() {
expect
(
itemBoxA
.
size
,
equals
(
const
Size
(
400.0
,
14.0
)));
final
RenderBox
itemBoxB
=
tester
.
renderObject
(
find
.
text
(
longTextB
.
data
));
expect
(
itemBoxB
.
size
,
equals
(
const
Size
(
400.0
,
14.0
)));
});
}
,
skip:
isBrowser
);
testWidgets
(
'BottomNavigationBar paints circles'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -1103,7 +1103,7 @@ void main() {
..
translate
(
x:
400.0
)
..
circle
(
x:
200.0
),
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'BottomNavigationBar inactiveIcon shown'
,
(
WidgetTester
tester
)
async
{
const
Key
filled
=
Key
(
'filled'
);
...
...
@@ -1438,7 +1438,7 @@ void main() {
skip:
!
isLinux
,
);
}
});
}
,
skip:
isBrowser
);
testWidgets
(
'BottomNavigationBar item title should not be nullable'
,
(
WidgetTester
tester
)
async
{
expect
(()
{
...
...
packages/flutter/test/material/button_theme_test.dart
View file @
3ae6abd9
...
...
@@ -170,7 +170,7 @@ void main() {
expect
(
tester
.
widget
<
Material
>(
find
.
byType
(
Material
)).
shape
,
shape
);
expect
(
tester
.
widget
<
Material
>(
find
.
byType
(
Material
)).
color
,
disabledColor
);
expect
(
tester
.
getSize
(
find
.
byType
(
Material
)),
const
Size
(
88.0
,
48.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Theme buttonTheme ButtonTheme overrides'
,
(
WidgetTester
tester
)
async
{
ButtonTextTheme
textTheme
;
...
...
packages/flutter/test/material/buttons_test.dart
View file @
3ae6abd9
...
...
@@ -681,7 +681,7 @@ void main() {
expect
(
tester
.
getSize
(
find
.
byType
(
FlatButton
)).
height
,
equals
(
48.0
));
expect
(
tester
.
getSize
(
find
.
byType
(
Text
)).
width
,
isIn
(<
double
>[
126.0
,
127.0
]));
expect
(
tester
.
getSize
(
find
.
byType
(
Text
)).
height
,
equals
(
42.0
));
});
}
,
skip:
isBrowser
);
// This test is very similar to the '...explicit splashColor and highlightColor' test
// in icon_button_test.dart. If you change this one, you may want to also change that one.
...
...
@@ -924,7 +924,7 @@ void main() {
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'MaterialButton minWidth and height parameters'
,
(
WidgetTester
tester
)
async
{
Widget
buildFrame
({
double
minWidth
,
double
height
,
EdgeInsets
padding
=
EdgeInsets
.
zero
,
Widget
child
})
{
...
...
packages/flutter/test/material/card_theme_test.dart
View file @
3ae6abd9
...
...
@@ -140,7 +140,7 @@ void main() {
matchesGoldenFile
(
'card_theme.custom_shape.png'
),
skip:
!
isLinux
,
);
});
}
,
skip:
isBrowser
);
}
CardTheme
_cardTheme
(
)
{
...
...
packages/flutter/test/material/chip_test.dart
View file @
3ae6abd9
...
...
@@ -356,7 +356,7 @@ void main() {
);
expect
(
tester
.
getSize
(
find
.
byType
(
Text
)),
const
Size
(
40.0
,
10.0
));
expect
(
tester
.
getSize
(
find
.
byType
(
Chip
)),
const
Size
(
800.0
,
48.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Chip elements are ordered horizontally for locale'
,
(
WidgetTester
tester
)
async
{
final
UniqueKey
iconKey
=
UniqueKey
();
...
...
@@ -477,7 +477,7 @@ void main() {
expect
(
tester
.
getSize
(
find
.
byType
(
Chip
).
first
).
width
,
anyOf
(
318.0
,
319.0
));
expect
(
tester
.
getSize
(
find
.
byType
(
Chip
).
first
).
height
,
equals
(
50.0
));
expect
(
tester
.
getSize
(
find
.
byType
(
Chip
).
last
),
anyOf
(
const
Size
(
132.0
,
48.0
),
const
Size
(
131.0
,
48.0
)));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Labels can be non-text widgets'
,
(
WidgetTester
tester
)
async
{
final
Key
keyA
=
GlobalKey
();
...
...
@@ -511,7 +511,7 @@ void main() {
anyOf
(
const
Size
(
132.0
,
48.0
),
const
Size
(
131.0
,
48.0
)),
);
expect
(
tester
.
getSize
(
find
.
byType
(
Chip
).
last
),
const
Size
(
58.0
,
48.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Avatars can be non-circle avatar widgets'
,
(
WidgetTester
tester
)
async
{
final
Key
keyA
=
GlobalKey
();
...
...
@@ -735,7 +735,7 @@ void main() {
expect
(
tester
.
getSize
(
find
.
byType
(
RawChip
)),
equals
(
const
Size
(
80.0
,
48.0
)));
expect
(
tester
.
getTopLeft
(
find
.
byKey
(
labelKey
)),
equals
(
const
Offset
(
12.0
,
17.0
)));
expect
(
find
.
byKey
(
avatarKey
),
findsNothing
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Delete button drawer works as expected on RawChip'
,
(
WidgetTester
tester
)
async
{
final
UniqueKey
labelKey
=
UniqueKey
();
...
...
@@ -851,7 +851,7 @@ void main() {
expect
(
tester
.
getSize
(
find
.
byType
(
RawChip
)),
equals
(
const
Size
(
80.0
,
48.0
)));
expect
(
tester
.
getTopLeft
(
find
.
byKey
(
labelKey
)),
equals
(
const
Offset
(
12.0
,
17.0
)));
expect
(
find
.
byKey
(
deleteButtonKey
),
findsNothing
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Selection with avatar works as expected on RawChip'
,
(
WidgetTester
tester
)
async
{
bool
selected
=
false
;
...
...
@@ -934,7 +934,7 @@ void main() {
expect
(
getSelectProgress
(
tester
),
equals
(
0.0
));
expect
(
getAvatarDrawerProgress
(
tester
),
equals
(
1.0
));
expect
(
getDeleteDrawerProgress
(
tester
),
equals
(
0.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Selection without avatar works as expected on RawChip'
,
(
WidgetTester
tester
)
async
{
bool
selected
=
false
;
...
...
@@ -1010,7 +1010,7 @@ void main() {
expect
(
getSelectProgress
(
tester
),
equals
(
0.0
));
expect
(
getAvatarDrawerProgress
(
tester
),
equals
(
0.0
));
expect
(
getDeleteDrawerProgress
(
tester
),
equals
(
0.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Activation works as expected on RawChip'
,
(
WidgetTester
tester
)
async
{
bool
selected
=
false
;
...
...
@@ -1135,7 +1135,7 @@ void main() {
);
expect
(
tester
.
getSize
(
find
.
byKey
(
key2
)),
const
Size
(
80.0
,
32.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Chip uses the right theme colors for the right components'
,
(
WidgetTester
tester
)
async
{
final
ThemeData
themeData
=
ThemeData
(
...
...
@@ -1721,7 +1721,7 @@ void main() {
],
excludes:
<
Offset
>[
const
Offset
(
4
,
4
),
]));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Chips should use InkWell instead of InkResponse.'
,
(
WidgetTester
tester
)
async
{
// Regression test for https://github.com/flutter/flutter/issues/28646
...
...
packages/flutter/test/material/chip_theme_test.dart
View file @
3ae6abd9
...
...
@@ -164,7 +164,7 @@ void main() {
expect
(
materialBox
,
paints
..
path
(
color:
Color
(
customTheme
.
backgroundColor
.
value
)));
expect
(
material
.
elevation
,
customTheme
.
elevation
);
expect
(
material
.
shadowColor
,
customTheme
.
shadowColor
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'ChipThemeData generates correct opacities for defaults'
,
(
WidgetTester
tester
)
async
{
const
Color
customColor1
=
Color
(
0xcafefeed
);
...
...
packages/flutter/test/material/circle_avatar_test.dart
View file @
3ae6abd9
...
...
@@ -186,7 +186,7 @@ void main() {
),
);
expect
(
tester
.
getSize
(
find
.
text
(
'Z'
)),
equals
(
const
Size
(
16.0
,
16.0
)));
});
}
,
skip:
isBrowser
);
testWidgets
(
'CircleAvatar respects minRadius'
,
(
WidgetTester
tester
)
async
{
final
Color
backgroundColor
=
Colors
.
blue
.
shade900
;
...
...
packages/flutter/test/material/date_picker_test.dart
View file @
3ae6abd9
...
...
@@ -19,7 +19,7 @@ void main() {
},
// Skip on Windows because this test is quite flaky when run on Windows,
// until https://github.com/flutter/flutter/issues/19696 is fixed.
skip:
isWindows
,
skip:
isWindows
||
isBrowser
,
);
}
...
...
packages/flutter/test/material/dialog_theme_test.dart
View file @
3ae6abd9
...
...
@@ -133,7 +133,7 @@ void main() {
matchesGoldenFile
(
'dialog_theme.dialog_with_custom_border.png'
),
skip:
!
isLinux
,
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Custom Title Text Style - Constructor Param'
,
(
WidgetTester
tester
)
async
{
const
String
titleText
=
'Title'
;
...
...
packages/flutter/test/material/dropdown_test.dart
View file @
3ae6abd9
...
...
@@ -143,7 +143,7 @@ void main() {
matchesGoldenFile
(
'dropdown_test.default.0.png'
),
skip:
!
isLinux
,
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Expanded dropdown golden'
,
(
WidgetTester
tester
)
async
{
final
Key
buttonKey
=
UniqueKey
();
...
...
@@ -156,7 +156,7 @@ void main() {
matchesGoldenFile
(
'dropdown_test.expanded.0.png'
),
skip:
!
isLinux
,
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Dropdown button control test'
,
(
WidgetTester
tester
)
async
{
String
value
=
'one'
;
...
...
packages/flutter/test/material/flat_button_test.dart
View file @
3ae6abd9
...
...
@@ -76,6 +76,7 @@ void main() {
await
gesture
.
removePointer
();
},
semanticsEnabled:
true
,
skip:
isBrowser
,
);
testWidgets
(
'FlatButton with colored theme meets a11y contrast guidelines'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -140,6 +141,7 @@ void main() {
await
gesture
.
removePointer
();
},
semanticsEnabled:
true
,
skip:
isBrowser
,
);
testWidgets
(
'FlatButton uses stateful color for text color in different states'
,
(
WidgetTester
tester
)
async
{
...
...
packages/flutter/test/material/flexible_space_bar_test.dart
View file @
3ae6abd9
...
...
@@ -154,7 +154,7 @@ void main() {
await
tester
.
pumpWidget
(
buildFrame
(
TargetPlatform
.
iOS
,
false
));
expect
(
getTitleBottomLeft
(),
const
Offset
(
72.0
,
16.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'FlexibleSpaceBar test titlePadding override'
,
(
WidgetTester
tester
)
async
{
Widget
buildFrame
(
TargetPlatform
platform
,
bool
centerTitle
)
{
...
...
@@ -195,7 +195,7 @@ void main() {
await
tester
.
pumpWidget
(
buildFrame
(
TargetPlatform
.
iOS
,
false
));
expect
(
getTitleBottomLeft
(),
Offset
.
zero
);
});
}
,
skip:
isBrowser
);
}
class
TestDelegate
extends
SliverPersistentHeaderDelegate
{
...
...
packages/flutter/test/material/floating_action_button_location_test.dart
View file @
3ae6abd9
...
...
@@ -213,7 +213,7 @@ void main() {
),
);
await
tester
.
pumpAndSettle
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'interrupting entrance of a new fab.'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -238,7 +238,7 @@ void main() {
);
await
tester
.
pumpAndSettle
();
});
});
}
,
skip:
isBrowser
);
});
testWidgets
(
'Docked floating action button locations'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -274,7 +274,7 @@ void main() {
);
await
tester
.
pumpAndSettle
();
expect
(
tester
.
getCenter
(
find
.
byType
(
FloatingActionButton
)),
const
Offset
(
756.0
,
500.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Docked floating action button locations: no BAB, small BAB'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -293,7 +293,7 @@ void main() {
),
);
expect
(
tester
.
getCenter
(
find
.
byType
(
FloatingActionButton
)),
const
Offset
(
756.0
,
572.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Mini-start-top floating action button location'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -314,7 +314,7 @@ void main() {
);
expect
(
tester
.
getCenter
(
find
.
byType
(
FloatingActionButton
)).
dx
,
tester
.
getCenter
(
find
.
byType
(
CircleAvatar
)).
dx
);
expect
(
tester
.
getCenter
(
find
.
byType
(
FloatingActionButton
)).
dy
,
kToolbarHeight
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Start-top floating action button location LTR'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -327,7 +327,7 @@ void main() {
),
);
expect
(
tester
.
getRect
(
find
.
byType
(
FloatingActionButton
)),
rectMoreOrLessEquals
(
const
Rect
.
fromLTWH
(
16.0
,
28.0
,
56.0
,
56.0
)));
});
}
,
skip:
isBrowser
);
testWidgets
(
'End-top floating action button location RTL'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -343,7 +343,7 @@ void main() {
),
);
expect
(
tester
.
getRect
(
find
.
byType
(
FloatingActionButton
)),
rectMoreOrLessEquals
(
const
Rect
.
fromLTWH
(
16.0
,
28.0
,
56.0
,
56.0
)));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Start-top floating action button location RTL'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -359,7 +359,7 @@ void main() {
),
);
expect
(
tester
.
getRect
(
find
.
byType
(
FloatingActionButton
)),
rectMoreOrLessEquals
(
const
Rect
.
fromLTWH
(
800.0
-
56.0
-
16.0
,
28.0
,
56.0
,
56.0
)));
});
}
,
skip:
isBrowser
);
testWidgets
(
'End-top floating action button location LTR'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -372,7 +372,7 @@ void main() {
),
);
expect
(
tester
.
getRect
(
find
.
byType
(
FloatingActionButton
)),
rectMoreOrLessEquals
(
const
Rect
.
fromLTWH
(
800.0
-
56.0
-
16.0
,
28.0
,
56.0
,
56.0
)));
});
}
,
skip:
isBrowser
);
}
...
...
packages/flutter/test/material/floating_action_button_test.dart
View file @
3ae6abd9
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@TestOn
(
'!chrome'
)
// whole file needs triage.
import
'dart:ui'
;
import
'package:flutter/material.dart'
;
...
...
packages/flutter/test/material/ink_paint_test.dart
View file @
3ae6abd9
...
...
@@ -223,7 +223,7 @@ void main() {
expect
(
box
,
isNot
(
paints
..
circle
()));
await
gesture
.
up
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'Cancel an InkRipple that was disposed when its animation ended'
,
(
WidgetTester
tester
)
async
{
// Regression test for https://github.com/flutter/flutter/issues/14391
...
...
packages/flutter/test/material/input_decorator_test.dart
View file @
3ae6abd9
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@TestOn
(
'!chrome'
)
// needs substantial triage.
import
'dart:async'
;
import
'package:flutter/material.dart'
;
...
...
@@ -1437,7 +1438,7 @@ void main() {
expect
(
tester
.
getTopLeft
(
find
.
text
(
'text'
)).
dy
,
12.0
);
expect
(
getBorderBottom
(
tester
),
40.0
);
expect
(
getBorderWeight
(
tester
),
1.0
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'InputDecorator.collapsed'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -1476,7 +1477,7 @@ void main() {
expect
(
tester
.
getSize
(
find
.
text
(
'hint'
)).
height
,
16.0
);
expect
(
tester
.
getTopLeft
(
find
.
text
(
'hint'
)).
dy
,
0.0
);
expect
(
getBorderWeight
(
tester
),
0.0
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'InputDecorator with baseStyle'
,
(
WidgetTester
tester
)
async
{
// Setting the baseStyle of the InputDecoration and the style of the input
...
...
@@ -1517,7 +1518,7 @@ void main() {
expect
(
tester
.
getTopLeft
(
find
.
text
(
'hint'
)).
dy
,
23.5
);
expect
(
tester
.
getTopLeft
(
find
.
text
(
'label'
)).
dy
,
17.75
);
expect
(
tester
.
getTopLeft
(
find
.
text
(
'text'
)).
dy
,
23.5
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'InputDecorator with empty style overrides'
,
(
WidgetTester
tester
)
async
{
// Same as not specifying any style overrides
...
...
@@ -1559,7 +1560,7 @@ void main() {
expect
(
getBorderWeight
(
tester
),
1.0
);
expect
(
tester
.
getTopLeft
(
find
.
text
(
'helper'
)),
const
Offset
(
12.0
,
64.0
));
expect
(
tester
.
getTopRight
(
find
.
text
(
'counter'
)),
const
Offset
(
788.0
,
64.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'InputDecoration outline shape with no border and no floating placeholder'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -1611,7 +1612,7 @@ void main() {
// The label should not be seen.
expect
(
getOpacity
(
tester
,
'label'
),
0.0
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'InputDecorationTheme outline border'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -1636,7 +1637,7 @@ void main() {
expect
(
tester
.
getBottomLeft
(
find
.
text
(
'label'
)).
dy
,
36.0
);
expect
(
getBorderBottom
(
tester
),
56.0
);
expect
(
getBorderWeight
(
tester
),
1.0
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'InputDecorationTheme outline border, dense layout'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
packages/flutter/test/material/list_tile_test.dart
View file @
3ae6abd9
...
...
@@ -190,7 +190,7 @@ void main() {
testChildren
();
testHorizontalGeometry
();
testVerticalGeometry
(
128.0
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'ListTile geometry (RTL)'
,
(
WidgetTester
tester
)
async
{
const
double
leftPadding
=
10.0
;
...
...
@@ -784,7 +784,7 @@ void main() {
expect
(
tester
.
getRect
(
find
.
byType
(
ListTile
).
at
(
1
)),
const
Rect
.
fromLTWH
(
0.0
,
216.0
,
800.0
,
56.0
));
expect
(
tester
.
getRect
(
find
.
byType
(
Placeholder
).
at
(
2
)),
const
Rect
.
fromLTWH
(
16.0
,
216.0
+
16.0
,
24.0
,
12.0
));
expect
(
tester
.
getRect
(
find
.
byType
(
Placeholder
).
at
(
3
)),
const
Rect
.
fromLTWH
(
800.0
-
24.0
-
16.0
,
216.0
+
16.0
,
24.0
,
24.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'ListTile leading icon height does not exceed ListTile height'
,
(
WidgetTester
tester
)
async
{
// regression test for https://github.com/flutter/flutter/issues/28765
...
...
packages/flutter/test/material/material_button_test.dart
View file @
3ae6abd9
...
...
@@ -32,6 +32,7 @@ void main() {
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
},
semanticsEnabled:
true
,
skip:
isBrowser
,
);
}
packages/flutter/test/material/material_test.dart
View file @
3ae6abd9
...
...
@@ -619,7 +619,7 @@ void main() {
matchesGoldenFile
(
'material.border_paint_above.png'
),
skip:
!
isLinux
,
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'border is painted below child when specified'
,
(
WidgetTester
tester
)
async
{
final
Key
painterKey
=
UniqueKey
();
...
...
@@ -660,6 +660,6 @@ void main() {
matchesGoldenFile
(
'material.border_paint_below.png'
),
skip:
!
isLinux
,
);
});
}
,
skip:
isBrowser
);
});
}
packages/flutter/test/material/outline_button_test.dart
View file @
3ae6abd9
...
...
@@ -79,6 +79,7 @@ void main() {
await
gesture
.
removePointer
();
},
semanticsEnabled:
true
,
skip:
isBrowser
,
);
testWidgets
(
'OutlineButton with colored theme meets a11y contrast guidelines'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -142,6 +143,7 @@ void main() {
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
await
gesture
.
removePointer
();
},
skip:
isBrowser
,
semanticsEnabled:
true
,
);
...
...
@@ -480,7 +482,7 @@ void main() {
clipPath:
clipPath
,
clipRect:
clipRect
,
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'OutlineButton has no clip by default'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
buttonKey
=
GlobalKey
();
...
...
@@ -614,7 +616,7 @@ void main() {
expect
(
tester
.
getSize
(
find
.
byType
(
FlatButton
)).
height
,
equals
(
48.0
));
expect
(
tester
.
getSize
(
find
.
byType
(
Text
)).
width
,
isIn
(<
double
>[
126.0
,
127.0
]));
expect
(
tester
.
getSize
(
find
.
byType
(
Text
)).
height
,
equals
(
42.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'OutlineButton pressed fillColor default'
,
(
WidgetTester
tester
)
async
{
Widget
buildFrame
(
ThemeData
theme
)
{
...
...
packages/flutter/test/material/radio_test.dart
View file @
3ae6abd9
...
...
@@ -279,6 +279,6 @@ void main() {
matchesGoldenFile
(
'radio.ink_ripple.png'
),
skip:
!
isLinux
,
);
});
}
,
skip:
isBrowser
);
}
packages/flutter/test/material/raised_button_test.dart
View file @
3ae6abd9
...
...
@@ -75,6 +75,7 @@ void main() {
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
await
gesture
.
removePointer
();
},
skip:
isBrowser
,
semanticsEnabled:
true
,
);
...
...
packages/flutter/test/material/slider_test.dart
View file @
3ae6abd9
...
...
@@ -991,7 +991,7 @@ void main() {
await
gesture
.
up
();
await
tester
.
pumpAndSettle
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'Tick marks are skipped when they are too dense'
,
(
WidgetTester
tester
)
async
{
Widget
buildSlider
({
...
...
packages/flutter/test/material/slider_theme_test.dart
View file @
3ae6abd9
...
...
@@ -529,7 +529,8 @@ void main() {
),
);
await
gesture
.
up
();
});
},
skip:
isBrowser
);
testWidgets
(
'The slider track height can be overridden'
,
(
WidgetTester
tester
)
async
{
final
SliderThemeData
sliderTheme
=
ThemeData
().
sliderTheme
.
copyWith
(
trackHeight:
16
);
...
...
packages/flutter/test/material/snack_bar_test.dart
View file @
3ae6abd9
...
...
@@ -386,7 +386,7 @@ void main() {
expect
(
actionTextBottomLeft
.
dx
-
textBottomRight
.
dx
,
24.0
);
expect
(
snackBarBottomRight
.
dx
-
actionTextBottomRight
.
dx
,
24.0
+
30.0
);
// margin + right padding
expect
(
snackBarBottomRight
.
dy
-
actionTextBottomRight
.
dy
,
17.0
+
40.0
);
// margin + bottom padding
});
}
,
skip:
isBrowser
);
testWidgets
(
'SnackBar is positioned above BottomNavigationBar'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
MaterialApp
(
...
...
@@ -439,7 +439,7 @@ void main() {
expect
(
actionTextBottomLeft
.
dx
-
textBottomRight
.
dx
,
24.0
);
expect
(
snackBarBottomRight
.
dx
-
actionTextBottomRight
.
dx
,
24.0
+
30.0
);
// margin + right padding
expect
(
snackBarBottomRight
.
dy
-
actionTextBottomRight
.
dy
,
17.0
);
// margin (with no bottom padding)
});
}
,
skip:
isBrowser
);
testWidgets
(
'SnackBar should push FloatingActionButton above'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
MaterialApp
(
...
...
@@ -536,7 +536,7 @@ void main() {
expect
(
actionTextBottomLeft
.
dx
-
textBottomRight
.
dx
,
16.0
);
expect
(
snackBarBottomRight
.
dx
-
actionTextBottomRight
.
dx
,
31.0
+
30.0
);
// margin + right padding
expect
(
snackBarBottomRight
.
dy
-
actionTextBottomRight
.
dy
,
27.0
);
// margin (with no bottom padding)
});
}
,
skip:
isBrowser
);
testWidgets
(
'Floating SnackBar is positioned above BottomNavigationBar'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
MaterialApp
(
...
...
@@ -592,7 +592,7 @@ void main() {
expect
(
actionTextBottomLeft
.
dx
-
textBottomRight
.
dx
,
16.0
);
expect
(
snackBarBottomRight
.
dx
-
actionTextBottomRight
.
dx
,
31.0
+
30.0
);
// margin + right padding
expect
(
snackBarBottomRight
.
dy
-
actionTextBottomRight
.
dy
,
27.0
);
// margin (with no bottom padding)
});
}
,
skip:
isBrowser
);
testWidgets
(
'Floating SnackBar is positioned above FloatingActionButton'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
MaterialApp
(
...
...
packages/flutter/test/material/tab_bar_theme_test.dart
View file @
3ae6abd9
...
...
@@ -270,7 +270,7 @@ void main() {
matchesGoldenFile
(
'tab_bar_theme.tab_indicator_size_tab.png'
),
skip:
!
isLinux
,
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Tab bar theme overrides tab indicator size (label)'
,
(
WidgetTester
tester
)
async
{
const
TabBarTheme
tabBarTheme
=
TabBarTheme
(
indicatorSize:
TabBarIndicatorSize
.
label
);
...
...
@@ -282,7 +282,7 @@ void main() {
matchesGoldenFile
(
'tab_bar_theme.tab_indicator_size_label.png'
),
skip:
!
isLinux
,
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Tab bar theme - custom tab indicator'
,
(
WidgetTester
tester
)
async
{
final
TabBarTheme
tabBarTheme
=
TabBarTheme
(
...
...
@@ -299,7 +299,7 @@ void main() {
matchesGoldenFile
(
'tab_bar_theme.custom_tab_indicator.png'
),
skip:
!
isLinux
,
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Tab bar theme - beveled rect indicator'
,
(
WidgetTester
tester
)
async
{
final
TabBarTheme
tabBarTheme
=
TabBarTheme
(
...
...
@@ -316,5 +316,5 @@ void main() {
matchesGoldenFile
(
'tab_bar_theme.beveled_rect_indicator.png'
),
skip:
!
isLinux
,
);
});
}
,
skip:
isBrowser
);
}
packages/flutter/test/material/tabs_test.dart
View file @
3ae6abd9
...
...
@@ -244,7 +244,7 @@ void main() {
);
expect
(
tester
.
renderObject
<
RenderParagraph
>(
find
.
byType
(
RichText
)).
text
.
style
.
fontFamily
,
'Ahem'
);
expect
(
tester
.
getSize
(
find
.
byType
(
Tab
)),
const
Size
(
14.0
,
46.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Tab sizing - icon and text'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -252,7 +252,7 @@ void main() {
);
expect
(
tester
.
renderObject
<
RenderParagraph
>(
find
.
byType
(
RichText
)).
text
.
style
.
fontFamily
,
'Ahem'
);
expect
(
tester
.
getSize
(
find
.
byType
(
Tab
)),
const
Size
(
14.0
,
72.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Tab sizing - icon and child'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -260,7 +260,7 @@ void main() {
);
expect
(
tester
.
renderObject
<
RenderParagraph
>(
find
.
byType
(
RichText
)).
text
.
style
.
fontFamily
,
'Ahem'
);
expect
(
tester
.
getSize
(
find
.
byType
(
Tab
)),
const
Size
(
14.0
,
72.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Tab color - normal'
,
(
WidgetTester
tester
)
async
{
final
Widget
tabBar
=
TabBar
(
tabs:
const
<
Widget
>[
SizedBox
.
shrink
()],
controller:
TabController
(
length:
1
,
vsync:
tester
));
...
...
@@ -383,7 +383,7 @@ void main() {
// Scrolling the TabBar doesn't change the selection
expect
(
controller
.
index
,
0
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'TabBarView maintains state'
,
(
WidgetTester
tester
)
async
{
final
List
<
String
>
tabs
=
<
String
>[
'AAAAAA'
,
'BBBBBB'
,
'CCCCCC'
,
'DDDDDD'
,
'EEEEEE'
];
...
...
@@ -1639,7 +1639,7 @@ void main() {
expect
(
semantics
,
hasSemantics
(
expectedSemantics
));
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'correct scrolling semantics'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
...
@@ -1903,7 +1903,7 @@ void main() {
expect
(
semantics
,
hasSemantics
(
expectedSemantics
));
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'can be notified of TabBar onTap behavior'
,
(
WidgetTester
tester
)
async
{
int
tabIndex
=
-
1
;
...
...
packages/flutter/test/material/text_field_test.dart
View file @
3ae6abd9
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@TestOn
(
'!chrome'
)
// This whole test suite needs triage.
import
'dart:async'
;
import
'dart:math'
as
math
;
import
'dart:ui'
as
ui
show
window
;
...
...
@@ -490,7 +491,7 @@ void main() {
matchesGoldenFile
(
'text_field_opacity_test.0.2.png'
),
skip:
!
isLinux
,
);
});
}
,
skip:
isBrowser
);
// TODO(hansmuller): restore these tests after the fix for #24876 has landed.
/*
...
...
@@ -2635,7 +2636,7 @@ void main() {
// and the left edge of the input and label.
expect
(
iconRight
+
28.0
,
equals
(
tester
.
getTopLeft
(
find
.
text
(
'label'
)).
dx
));
expect
(
iconRight
+
28.0
,
equals
(
tester
.
getTopLeft
(
find
.
byType
(
EditableText
)).
dx
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Collapsed hint text placement'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
packages/flutter/test/material/time_picker_test.dart
View file @
3ae6abd9
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@TestOn
(
'!chrome'
)
// entire file needs triage.
import
'dart:async'
;
import
'dart:ui'
as
ui
;
...
...
packages/flutter/test/material/tooltip_test.dart
View file @
3ae6abd9
...
...
@@ -139,7 +139,7 @@ void main() {
final
RenderBox
tip
=
tester
.
renderObject
(
find
.
text
(
tooltipText
)).
parent
.
parent
.
parent
.
parent
.
parent
;
expect
(
tip
.
size
.
height
,
equals
(
24.0
));
// 14.0 height + 5.0 padding * 2 (top, bottom)
expect
(
tip
.
localToGlobal
(
tip
.
size
.
topLeft
(
Offset
.
zero
)),
equals
(
const
Offset
(
10.0
,
20.0
)));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Does tooltip end up in the right place - center prefer above fits'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
key
=
GlobalKey
();
...
...
@@ -366,7 +366,7 @@ void main() {
expect
(
tip
.
localToGlobal
(
tip
.
size
.
topLeft
(
Offset
.
zero
)).
dy
,
equals
(
310.0
));
expect
(
tip
.
localToGlobal
(
tip
.
size
.
bottomRight
(
Offset
.
zero
)).
dx
,
equals
(
790.0
));
expect
(
tip
.
localToGlobal
(
tip
.
size
.
bottomRight
(
Offset
.
zero
)).
dy
,
equals
(
324.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Does tooltip end up in the right place - near the edge'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
key
=
GlobalKey
();
...
...
@@ -421,7 +421,7 @@ void main() {
expect
(
tip
.
localToGlobal
(
tip
.
size
.
topLeft
(
Offset
.
zero
)).
dy
,
equals
(
310.0
));
expect
(
tip
.
localToGlobal
(
tip
.
size
.
bottomRight
(
Offset
.
zero
)).
dx
,
equals
(
790.0
));
expect
(
tip
.
localToGlobal
(
tip
.
size
.
bottomRight
(
Offset
.
zero
)).
dy
,
equals
(
324.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Does tooltip end up with the right default size, shape, and color'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
key
=
GlobalKey
();
...
...
@@ -457,7 +457,7 @@ void main() {
rrect:
RRect
.
fromRectAndRadius
(
tip
.
paintBounds
,
const
Radius
.
circular
(
4.0
)),
color:
const
Color
(
0xe6616161
),
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Can tooltip decoration be customized'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
key
=
GlobalKey
();
...
...
@@ -497,7 +497,7 @@ void main() {
expect
(
tip
,
paints
..
path
(
color:
const
Color
(
0x80800000
),
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Tooltip stays around'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -707,7 +707,7 @@ void main() {
expect
(
tester
.
getSize
(
find
.
text
(
tooltipText
)),
equals
(
const
Size
(
168.0
,
56.0
)));
tip
=
tester
.
renderObject
(
find
.
text
(
tooltipText
)).
parent
;
expect
(
tip
.
size
.
height
,
equals
(
56.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Haptic feedback'
,
(
WidgetTester
tester
)
async
{
final
FeedbackTester
feedback
=
FeedbackTester
();
...
...
packages/flutter/test/widgets/image_test.dart
View file @
3ae6abd9
...
...
@@ -1056,7 +1056,7 @@ void main() {
expect
(
chunkEvents
.
length
,
4
);
expect
(
find
.
byType
(
Text
),
findsNothing
);
expect
(
find
.
byType
(
RawImage
),
findsOneWidget
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Image doesn
\'
t rebuild on chunk events if loadingBuilder is null'
,
(
WidgetTester
tester
)
async
{
final
ui
.
Image
image
=
await
tester
.
runAsync
(
createTestImage
);
...
...
@@ -1109,7 +1109,7 @@ void main() {
expect
(
find
.
byType
(
RawImage
),
findsOneWidget
);
expect
(
tester
.
widget
<
Center
>(
find
.
byType
(
Center
)).
child
,
isInstanceOf
<
Padding
>());
expect
(
tester
.
widget
<
Padding
>(
find
.
byType
(
Padding
)).
child
,
isInstanceOf
<
RawImage
>());
});
}
,
skip:
isBrowser
);
testWidgets
(
'Image state handles loadingBuilder update from null to non-null'
,
(
WidgetTester
tester
)
async
{
final
TestImageStreamCompleter
streamCompleter
=
TestImageStreamCompleter
();
...
...
@@ -1141,7 +1141,7 @@ void main() {
await
tester
.
pump
();
expect
(
find
.
byType
(
Center
),
findsOneWidget
);
expect
(
find
.
byType
(
RawImage
),
findsOneWidget
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Image state handles loadingBuilder update from non-null to null'
,
(
WidgetTester
tester
)
async
{
final
TestImageStreamCompleter
streamCompleter
=
TestImageStreamCompleter
();
...
...
@@ -1174,7 +1174,7 @@ void main() {
expect
(
tester
.
state
(
find
.
byType
(
Image
)),
same
(
state
));
streamCompleter
.
setData
(
chunkEvent:
const
ImageChunkEvent
(
cumulativeBytesLoaded:
10
,
expectedTotalBytes:
100
));
expect
(
tester
.
binding
.
hasScheduledFrame
,
isFalse
);
});
}
,
skip:
isBrowser
);
}
class
TestImageProvider
extends
ImageProvider
<
TestImageProvider
>
{
...
...
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