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
9d724d4c
Unverified
Commit
9d724d4c
authored
Jun 11, 2019
by
Jonah Williams
Committed by
GitHub
Jun 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compatibility pass on flutter/widgets tests for JavaScript compilation. (8) (#33377)
parent
d9c19629
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
102 additions
and
92 deletions
+102
-92
test.dart
dev/bots/test.dart
+1
-0
text_input.dart
packages/flutter/lib/src/services/text_input.dart
+7
-0
actions_test.dart
packages/flutter/test/widgets/actions_test.dart
+1
-1
app_title_test.dart
packages/flutter/test/widgets/app_title_test.dart
+1
-1
backdrop_filter_test.dart
packages/flutter/test/widgets/backdrop_filter_test.dart
+1
-1
baseline_test.dart
packages/flutter/test/widgets/baseline_test.dart
+3
-3
basic_test.dart
packages/flutter/test/widgets/basic_test.dart
+2
-2
clip_test.dart
packages/flutter/test/widgets/clip_test.dart
+13
-13
custom_painter_test.dart
packages/flutter/test/widgets/custom_painter_test.dart
+1
-1
draggable_scrollable_sheet_test.dart
...flutter/test/widgets/draggable_scrollable_sheet_test.dart
+8
-8
draggable_test.dart
packages/flutter/test/widgets/draggable_test.dart
+1
-2
editable_text_cursor_test.dart
packages/flutter/test/widgets/editable_text_cursor_test.dart
+5
-5
editable_text_test.dart
packages/flutter/test/widgets/editable_text_test.dart
+13
-13
image_resolution_test.dart
packages/flutter/test/widgets/image_resolution_test.dart
+1
-0
invert_colors_test.dart
packages/flutter/test/widgets/invert_colors_test.dart
+2
-2
keep_alive_test.dart
packages/flutter/test/widgets/keep_alive_test.dart
+1
-0
list_view_test.dart
packages/flutter/test/widgets/list_view_test.dart
+1
-1
list_wheel_scroll_view_test.dart
...ges/flutter/test/widgets/list_wheel_scroll_view_test.dart
+2
-2
opacity_test.dart
packages/flutter/test/widgets/opacity_test.dart
+2
-2
physical_model_test.dart
packages/flutter/test/widgets/physical_model_test.dart
+3
-3
platform_view_test.dart
packages/flutter/test/widgets/platform_view_test.dart
+1
-1
scrollable_fling_test.dart
packages/flutter/test/widgets/scrollable_fling_test.dart
+2
-2
scrollable_of_test.dart
packages/flutter/test/widgets/scrollable_of_test.dart
+2
-2
scrollable_semantics_test.dart
packages/flutter/test/widgets/scrollable_semantics_test.dart
+1
-1
semantics_clipping_test.dart
packages/flutter/test/widgets/semantics_clipping_test.dart
+2
-2
semantics_test.dart
packages/flutter/test/widgets/semantics_test.dart
+1
-1
semantics_tester_generateTestSemanticsExpressionForCurrentSemanticsTree_test.dart
...eTestSemanticsExpressionForCurrentSemanticsTree_test.dart
+1
-0
shader_mask_test.dart
packages/flutter/test/widgets/shader_mask_test.dart
+2
-2
shadow_test.dart
packages/flutter/test/widgets/shadow_test.dart
+2
-2
shape_decoration_test.dart
packages/flutter/test/widgets/shape_decoration_test.dart
+1
-1
simple_semantics_test.dart
packages/flutter/test/widgets/simple_semantics_test.dart
+2
-2
slivers_appbar_floating_pinned_test.dart
...ter/test/widgets/slivers_appbar_floating_pinned_test.dart
+1
-1
text_test.dart
packages/flutter/test/widgets/text_test.dart
+7
-7
transformed_scrollable_test.dart
...ges/flutter/test/widgets/transformed_scrollable_test.dart
+1
-1
visibility_test.dart
packages/flutter/test/widgets/visibility_test.dart
+1
-1
widget_inspector_test.dart
packages/flutter/test/widgets/widget_inspector_test.dart
+5
-5
wrap_test.dart
packages/flutter/test/widgets/wrap_test.dart
+1
-1
No files found.
dev/bots/test.dart
View file @
9d724d4c
...
@@ -348,6 +348,7 @@ Future<void> _runWebTests() async {
...
@@ -348,6 +348,7 @@ Future<void> _runWebTests() async {
'test/services/'
,
'test/services/'
,
'test/painting/'
,
'test/painting/'
,
'test/scheduler/'
,
'test/scheduler/'
,
'test/widgets/'
,
'test/semantics/'
,
'test/semantics/'
,
]);
]);
}
}
...
...
packages/flutter/lib/src/services/text_input.dart
View file @
9d724d4c
...
@@ -15,6 +15,9 @@ import 'text_editing.dart';
...
@@ -15,6 +15,9 @@ import 'text_editing.dart';
export
'dart:ui'
show
TextAffinity
;
export
'dart:ui'
show
TextAffinity
;
// Whether we're compiled to JavaScript in a web browser.
const
bool
_kIsBrowser
=
identical
(
0
,
0.0
);
/// The type of information for which to optimize the text input control.
/// The type of information for which to optimize the text input control.
///
///
/// On Android, behavior may vary across device and keyboard provider.
/// On Android, behavior may vary across device and keyboard provider.
...
@@ -825,6 +828,10 @@ class TextInput {
...
@@ -825,6 +828,10 @@ class TextInput {
static
bool
_debugEnsureInputActionWorksOnPlatform
(
TextInputAction
inputAction
)
{
static
bool
_debugEnsureInputActionWorksOnPlatform
(
TextInputAction
inputAction
)
{
assert
(()
{
assert
(()
{
if
(
_kIsBrowser
)
{
// TODO(flutterweb): what makes sense here?
return
true
;
}
if
(
Platform
.
isIOS
)
{
if
(
Platform
.
isIOS
)
{
assert
(
assert
(
_iOSSupportedInputActions
.
contains
(
inputAction
),
_iOSSupportedInputActions
.
contains
(
inputAction
),
...
...
packages/flutter/test/widgets/actions_test.dart
View file @
9d724d4c
...
@@ -286,6 +286,6 @@ void main() {
...
@@ -286,6 +286,6 @@ void main() {
expect
(
description
[
0
],
equalsIgnoringHashCodes
(
'dispatcher: ActionDispatcher#00000'
));
expect
(
description
[
0
],
equalsIgnoringHashCodes
(
'dispatcher: ActionDispatcher#00000'
));
expect
(
description
[
1
],
equals
(
'actions: {[<
\'
bar
\'
>]: Closure: () => TestAction}'
));
expect
(
description
[
1
],
equals
(
'actions: {[<
\'
bar
\'
>]: Closure: () => TestAction}'
));
});
}
,
skip:
isBrowser
);
});
});
}
}
packages/flutter/test/widgets/app_title_test.dart
View file @
9d724d4c
...
@@ -55,6 +55,6 @@ void main() {
...
@@ -55,6 +55,6 @@ void main() {
await
tester
.
pump
();
await
tester
.
pump
();
expect
(
tester
.
widget
<
Title
>(
find
.
byType
(
Title
)).
title
,
'en_US'
);
expect
(
tester
.
widget
<
Title
>(
find
.
byType
(
Title
)).
title
,
'en_US'
);
expect
(
tester
.
widget
<
Title
>(
find
.
byType
(
Title
)).
color
,
kTitleColor
);
expect
(
tester
.
widget
<
Title
>(
find
.
byType
(
Title
)).
color
,
kTitleColor
);
});
}
,
skip:
isBrowser
);
}
}
packages/flutter/test/widgets/backdrop_filter_test.dart
View file @
9d724d4c
...
@@ -46,5 +46,5 @@ void main() {
...
@@ -46,5 +46,5 @@ void main() {
matchesGoldenFile
(
'backdrop_filter_test.cull_rect.1.png'
),
matchesGoldenFile
(
'backdrop_filter_test.cull_rect.1.png'
),
skip:
!
isLinux
,
skip:
!
isLinux
,
);
);
});
}
,
skip:
isBrowser
);
}
}
packages/flutter/test/widgets/baseline_test.dart
View file @
9d724d4c
...
@@ -19,7 +19,7 @@ void main() {
...
@@ -19,7 +19,7 @@ void main() {
),
),
);
);
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
text
(
'X'
)).
size
,
const
Size
(
100.0
,
100.0
));
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
text
(
'X'
)).
size
,
const
Size
(
100.0
,
100.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Baseline - position test'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Baseline - position test'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
@@ -40,7 +40,7 @@ void main() {
...
@@ -40,7 +40,7 @@ void main() {
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
text
(
'X'
)).
size
,
const
Size
(
100.0
,
100.0
));
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
text
(
'X'
)).
size
,
const
Size
(
100.0
,
100.0
));
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
byType
(
Baseline
)).
size
,
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
byType
(
Baseline
)).
size
,
within
<
Size
>(
from:
const
Size
(
100.0
,
200.0
),
distance:
0.001
));
within
<
Size
>(
from:
const
Size
(
100.0
,
200.0
),
distance:
0.001
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Chip caches baseline'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Chip caches baseline'
,
(
WidgetTester
tester
)
async
{
int
calls
=
0
;
int
calls
=
0
;
...
@@ -65,7 +65,7 @@ void main() {
...
@@ -65,7 +65,7 @@ void main() {
tester
.
renderObject
<
RenderBaselineDetector
>(
find
.
byType
(
BaselineDetector
)).
dirty
();
tester
.
renderObject
<
RenderBaselineDetector
>(
find
.
byType
(
BaselineDetector
)).
dirty
();
await
tester
.
pump
();
await
tester
.
pump
();
expect
(
calls
,
2
);
expect
(
calls
,
2
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'ListTile caches baseline'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'ListTile caches baseline'
,
(
WidgetTester
tester
)
async
{
int
calls
=
0
;
int
calls
=
0
;
...
...
packages/flutter/test/widgets/basic_test.dart
View file @
9d724d4c
...
@@ -51,7 +51,7 @@ void main() {
...
@@ -51,7 +51,7 @@ void main() {
expect
(
tester
.
hitTestOnBinding
(
const
Offset
(
100.0
,
300.0
)),
hits
(
renderPhysicalShape
));
expect
(
tester
.
hitTestOnBinding
(
const
Offset
(
100.0
,
300.0
)),
hits
(
renderPhysicalShape
));
expect
(
tester
.
hitTestOnBinding
(
const
Offset
(
100.0
,
299.0
)),
doesNotHit
(
renderPhysicalShape
));
expect
(
tester
.
hitTestOnBinding
(
const
Offset
(
100.0
,
299.0
)),
doesNotHit
(
renderPhysicalShape
));
expect
(
tester
.
hitTestOnBinding
(
const
Offset
(
100.0
,
301.0
)),
doesNotHit
(
renderPhysicalShape
));
expect
(
tester
.
hitTestOnBinding
(
const
Offset
(
100.0
,
301.0
)),
doesNotHit
(
renderPhysicalShape
));
});
}
,
skip:
isBrowser
);
});
});
...
@@ -202,7 +202,7 @@ void main() {
...
@@ -202,7 +202,7 @@ void main() {
tester
.
getTopLeft
(
find
.
byKey
(
key2
)).
dy
,
tester
.
getTopLeft
(
find
.
byKey
(
key2
)).
dy
,
closeTo
(
aboveBaseline1
-
aboveBaseline2
,
.
001
),
closeTo
(
aboveBaseline1
-
aboveBaseline2
,
.
001
),
);
);
});
}
,
skip:
isBrowser
);
});
});
test
(
'UnconstrainedBox toString'
,
()
{
test
(
'UnconstrainedBox toString'
,
()
{
...
...
packages/flutter/test/widgets/clip_test.dart
View file @
9d724d4c
...
@@ -358,7 +358,7 @@ void main() {
...
@@ -358,7 +358,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'clip.ClipRect.1.png'
),
matchesGoldenFile
(
'clip.ClipRect.1.png'
),
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'ClipRect save, overlay, and antialiasing'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'ClipRect save, overlay, and antialiasing'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
@@ -398,7 +398,7 @@ void main() {
...
@@ -398,7 +398,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'clip.ClipRectOverlay.1.png'
),
matchesGoldenFile
(
'clip.ClipRectOverlay.1.png'
),
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'ClipRRect painting'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'ClipRRect painting'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
@@ -447,7 +447,7 @@ void main() {
...
@@ -447,7 +447,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'clip.ClipRRect.1.png'
),
matchesGoldenFile
(
'clip.ClipRRect.1.png'
),
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'ClipOval painting'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'ClipOval painting'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
@@ -490,7 +490,7 @@ void main() {
...
@@ -490,7 +490,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'clip.ClipOval.1.png'
),
matchesGoldenFile
(
'clip.ClipOval.1.png'
),
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'ClipPath painting'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'ClipPath painting'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
@@ -538,7 +538,7 @@ void main() {
...
@@ -538,7 +538,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'clip.ClipPath.1.png'
),
matchesGoldenFile
(
'clip.ClipPath.1.png'
),
);
);
});
}
,
skip:
isBrowser
);
Center
genPhysicalModel
(
Clip
clipBehavior
)
{
Center
genPhysicalModel
(
Clip
clipBehavior
)
{
return
Center
(
return
Center
(
...
@@ -583,7 +583,7 @@ void main() {
...
@@ -583,7 +583,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'clip.PhysicalModel.antiAlias.1.png'
),
matchesGoldenFile
(
'clip.PhysicalModel.antiAlias.1.png'
),
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'PhysicalModel painting with Clip.hardEdge'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'PhysicalModel painting with Clip.hardEdge'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
genPhysicalModel
(
Clip
.
hardEdge
));
await
tester
.
pumpWidget
(
genPhysicalModel
(
Clip
.
hardEdge
));
...
@@ -591,7 +591,7 @@ void main() {
...
@@ -591,7 +591,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'clip.PhysicalModel.hardEdge.1.png'
),
matchesGoldenFile
(
'clip.PhysicalModel.hardEdge.1.png'
),
);
);
});
}
,
skip:
isBrowser
);
// There will be bleeding edges on the rect edges, but there shouldn't be any bleeding edges on the
// There will be bleeding edges on the rect edges, but there shouldn't be any bleeding edges on the
// round corners.
// round corners.
...
@@ -601,7 +601,7 @@ void main() {
...
@@ -601,7 +601,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'clip.PhysicalModel.antiAliasWithSaveLayer.png'
),
matchesGoldenFile
(
'clip.PhysicalModel.antiAliasWithSaveLayer.png'
),
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Default PhysicalModel painting'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Default PhysicalModel painting'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
@@ -643,7 +643,7 @@ void main() {
...
@@ -643,7 +643,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'clip.PhysicalModel.default.1.png'
),
matchesGoldenFile
(
'clip.PhysicalModel.default.1.png'
),
);
);
});
}
,
skip:
isBrowser
);
Center
genPhysicalShape
(
Clip
clipBehavior
)
{
Center
genPhysicalShape
(
Clip
clipBehavior
)
{
return
Center
(
return
Center
(
...
@@ -692,7 +692,7 @@ void main() {
...
@@ -692,7 +692,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'clip.PhysicalShape.antiAlias.1.png'
),
matchesGoldenFile
(
'clip.PhysicalShape.antiAlias.1.png'
),
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'PhysicalShape painting with Clip.hardEdge'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'PhysicalShape painting with Clip.hardEdge'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
genPhysicalShape
(
Clip
.
hardEdge
));
await
tester
.
pumpWidget
(
genPhysicalShape
(
Clip
.
hardEdge
));
...
@@ -700,7 +700,7 @@ void main() {
...
@@ -700,7 +700,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'clip.PhysicalShape.hardEdge.1.png'
),
matchesGoldenFile
(
'clip.PhysicalShape.hardEdge.1.png'
),
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'PhysicalShape painting with Clip.antiAliasWithSaveLayer'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'PhysicalShape painting with Clip.antiAliasWithSaveLayer'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
genPhysicalShape
(
Clip
.
antiAliasWithSaveLayer
));
await
tester
.
pumpWidget
(
genPhysicalShape
(
Clip
.
antiAliasWithSaveLayer
));
...
@@ -708,7 +708,7 @@ void main() {
...
@@ -708,7 +708,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'clip.PhysicalShape.antiAliasWithSaveLayer.png'
),
matchesGoldenFile
(
'clip.PhysicalShape.antiAliasWithSaveLayer.png'
),
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'PhysicalShape painting'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'PhysicalShape painting'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
@@ -754,7 +754,7 @@ void main() {
...
@@ -754,7 +754,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'clip.PhysicalShape.default.1.png'
),
matchesGoldenFile
(
'clip.PhysicalShape.default.1.png'
),
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'ClipPath.shape'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'ClipPath.shape'
,
(
WidgetTester
tester
)
async
{
final
List
<
String
>
logs
=
<
String
>[];
final
List
<
String
>
logs
=
<
String
>[];
...
...
packages/flutter/test/widgets/custom_painter_test.dart
View file @
9d724d4c
...
@@ -493,7 +493,7 @@ void _defineTests() {
...
@@ -493,7 +493,7 @@ void _defineTests() {
);
);
expect
(
semantics
,
hasSemantics
(
expectedSemantics
,
ignoreRect:
true
,
ignoreTransform:
true
));
expect
(
semantics
,
hasSemantics
(
expectedSemantics
,
ignoreRect:
true
,
ignoreTransform:
true
));
semantics
.
dispose
();
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
group
(
'diffing'
,
()
{
group
(
'diffing'
,
()
{
testWidgets
(
'complains about duplicate keys'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'complains about duplicate keys'
,
(
WidgetTester
tester
)
async
{
...
...
packages/flutter/test/widgets/draggable_scrollable_sheet_test.dart
View file @
9d724d4c
...
@@ -101,7 +101,7 @@ void main() {
...
@@ -101,7 +101,7 @@ void main() {
expect
(
find
.
text
(
'Item 1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 21'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 21'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 31'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 31'
),
findsOneWidget
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Can be dragged down when not full height'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Can be dragged down when not full height'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
_boilerplate
(
null
));
await
tester
.
pumpWidget
(
_boilerplate
(
null
));
...
@@ -114,7 +114,7 @@ void main() {
...
@@ -114,7 +114,7 @@ void main() {
expect
(
find
.
text
(
'Item 1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 21'
),
findsNothing
);
expect
(
find
.
text
(
'Item 21'
),
findsNothing
);
expect
(
find
.
text
(
'Item 36'
),
findsNothing
);
expect
(
find
.
text
(
'Item 36'
),
findsNothing
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Can be dragged down when list is shorter than full height'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Can be dragged down when list is shorter than full height'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
_boilerplate
(
null
,
itemCount:
30
,
initialChildSize:
.
25
));
await
tester
.
pumpWidget
(
_boilerplate
(
null
,
itemCount:
30
,
initialChildSize:
.
25
));
...
@@ -131,7 +131,7 @@ void main() {
...
@@ -131,7 +131,7 @@ void main() {
await
tester
.
pumpAndSettle
();
await
tester
.
pumpAndSettle
();
expect
(
find
.
text
(
'Item 1'
).
hitTestable
(),
findsOneWidget
);
expect
(
find
.
text
(
'Item 1'
).
hitTestable
(),
findsOneWidget
);
expect
(
find
.
text
(
'Item 29'
).
hitTestable
(),
findsNothing
);
expect
(
find
.
text
(
'Item 29'
).
hitTestable
(),
findsNothing
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Can be dragged up and cover its container and scroll in single motion, and then dragged back down'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Can be dragged up and cover its container and scroll in single motion, and then dragged back down'
,
(
WidgetTester
tester
)
async
{
int
taps
=
0
;
int
taps
=
0
;
...
@@ -160,7 +160,7 @@ void main() {
...
@@ -160,7 +160,7 @@ void main() {
expect
(
find
.
text
(
'Item 1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 18'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 18'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 36'
),
findsNothing
);
expect
(
find
.
text
(
'Item 36'
),
findsNothing
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Can be flung up gently'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Can be flung up gently'
,
(
WidgetTester
tester
)
async
{
int
taps
=
0
;
int
taps
=
0
;
...
@@ -183,7 +183,7 @@ void main() {
...
@@ -183,7 +183,7 @@ void main() {
expect
(
find
.
text
(
'Item 21'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 21'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 36'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 36'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 70'
),
findsNothing
);
expect
(
find
.
text
(
'Item 70'
),
findsNothing
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Can be flung up'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Can be flung up'
,
(
WidgetTester
tester
)
async
{
int
taps
=
0
;
int
taps
=
0
;
...
@@ -204,7 +204,7 @@ void main() {
...
@@ -204,7 +204,7 @@ void main() {
expect
(
find
.
text
(
'Item 1'
),
findsNothing
);
expect
(
find
.
text
(
'Item 1'
),
findsNothing
);
expect
(
find
.
text
(
'Item 21'
),
findsNothing
);
expect
(
find
.
text
(
'Item 21'
),
findsNothing
);
expect
(
find
.
text
(
'Item 70'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 70'
),
findsOneWidget
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Can be flung down when not full height'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Can be flung down when not full height'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
_boilerplate
(
null
));
await
tester
.
pumpWidget
(
_boilerplate
(
null
));
...
@@ -217,7 +217,7 @@ void main() {
...
@@ -217,7 +217,7 @@ void main() {
expect
(
find
.
text
(
'Item 1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 21'
),
findsNothing
);
expect
(
find
.
text
(
'Item 21'
),
findsNothing
);
expect
(
find
.
text
(
'Item 36'
),
findsNothing
);
expect
(
find
.
text
(
'Item 36'
),
findsNothing
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Can be flung up and then back down'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Can be flung up and then back down'
,
(
WidgetTester
tester
)
async
{
int
taps
=
0
;
int
taps
=
0
;
...
@@ -256,7 +256,7 @@ void main() {
...
@@ -256,7 +256,7 @@ void main() {
expect
(
find
.
text
(
'Item 1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 21'
),
findsNothing
);
expect
(
find
.
text
(
'Item 21'
),
findsNothing
);
expect
(
find
.
text
(
'Item 70'
),
findsNothing
);
expect
(
find
.
text
(
'Item 70'
),
findsNothing
);
});
}
,
skip:
isBrowser
);
debugDefaultTargetPlatformOverride
=
null
;
debugDefaultTargetPlatformOverride
=
null
;
});
});
...
...
packages/flutter/test/widgets/draggable_test.dart
View file @
9d724d4c
...
@@ -2085,8 +2085,7 @@ void main() {
...
@@ -2085,8 +2085,7 @@ void main() {
],
],
),
ignoreTransform:
true
,
ignoreRect:
true
));
),
ignoreTransform:
true
,
ignoreRect:
true
));
semantics
.
dispose
();
semantics
.
dispose
();
});
},
skip:
isBrowser
);
}
}
Future
<
void
>
_testLongPressDraggableHapticFeedback
({
WidgetTester
tester
,
bool
hapticFeedbackOnStart
,
int
expectedHapticFeedbackCount
})
async
{
Future
<
void
>
_testLongPressDraggableHapticFeedback
({
WidgetTester
tester
,
bool
hapticFeedbackOnStart
,
int
expectedHapticFeedbackCount
})
async
{
...
...
packages/flutter/test/widgets/editable_text_cursor_test.dart
View file @
9d724d4c
...
@@ -445,7 +445,7 @@ void main() {
...
@@ -445,7 +445,7 @@ void main() {
await
tester
.
pumpAndSettle
();
await
tester
.
pumpAndSettle
();
expect
(
controller
.
selection
.
baseOffset
,
10
);
expect
(
controller
.
selection
.
baseOffset
,
10
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Updating the floating cursor correctly moves the cursor'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Updating the floating cursor correctly moves the cursor'
,
(
WidgetTester
tester
)
async
{
const
String
text
=
'hello world this is fun and cool and awesome!'
;
const
String
text
=
'hello world this is fun and cool and awesome!'
;
...
@@ -501,7 +501,7 @@ void main() {
...
@@ -501,7 +501,7 @@ void main() {
await
tester
.
pumpAndSettle
();
await
tester
.
pumpAndSettle
();
// The cursor has been set.
// The cursor has been set.
expect
(
controller
.
selection
.
baseOffset
,
10
);
expect
(
controller
.
selection
.
baseOffset
,
10
);
});
}
,
skip:
isBrowser
);
// Regression test for https://github.com/flutter/flutter/pull/30475.
// Regression test for https://github.com/flutter/flutter/pull/30475.
testWidgets
(
'Trying to select with the floating cursor does not crash'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Trying to select with the floating cursor does not crash'
,
(
WidgetTester
tester
)
async
{
...
@@ -567,7 +567,7 @@ void main() {
...
@@ -567,7 +567,7 @@ void main() {
offset:
const
Offset
(-
250
,
20
)));
offset:
const
Offset
(-
250
,
20
)));
editableTextState
.
updateFloatingCursor
(
RawFloatingCursorPoint
(
state:
FloatingCursorDragState
.
End
));
editableTextState
.
updateFloatingCursor
(
RawFloatingCursorPoint
(
state:
FloatingCursorDragState
.
End
));
await
tester
.
pumpAndSettle
();
await
tester
.
pumpAndSettle
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'autofocus sets cursor to the end of text'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'autofocus sets cursor to the end of text'
,
(
WidgetTester
tester
)
async
{
const
String
text
=
'hello world'
;
const
String
text
=
'hello world'
;
...
@@ -599,7 +599,7 @@ void main() {
...
@@ -599,7 +599,7 @@ void main() {
expect
(
focusNode
.
hasFocus
,
true
);
expect
(
focusNode
.
hasFocus
,
true
);
expect
(
controller
.
selection
.
isCollapsed
,
true
);
expect
(
controller
.
selection
.
isCollapsed
,
true
);
expect
(
controller
.
selection
.
baseOffset
,
text
.
length
);
expect
(
controller
.
selection
.
baseOffset
,
text
.
length
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Floating cursor is painted on iOS'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Floating cursor is painted on iOS'
,
(
WidgetTester
tester
)
async
{
debugDefaultTargetPlatformOverride
=
TargetPlatform
.
iOS
;
debugDefaultTargetPlatformOverride
=
TargetPlatform
.
iOS
;
...
@@ -687,7 +687,7 @@ void main() {
...
@@ -687,7 +687,7 @@ void main() {
editableTextState
.
updateFloatingCursor
(
RawFloatingCursorPoint
(
state:
FloatingCursorDragState
.
End
));
editableTextState
.
updateFloatingCursor
(
RawFloatingCursorPoint
(
state:
FloatingCursorDragState
.
End
));
await
tester
.
pumpAndSettle
();
await
tester
.
pumpAndSettle
();
debugDefaultTargetPlatformOverride
=
null
;
debugDefaultTargetPlatformOverride
=
null
;
});
}
,
skip:
isBrowser
);
testWidgets
(
'cursor layout iOS'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'cursor layout iOS'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
<
EditableTextState
>
editableTextKey
=
GlobalKey
<
EditableTextState
>();
final
GlobalKey
<
EditableTextState
>
editableTextKey
=
GlobalKey
<
EditableTextState
>();
...
...
packages/flutter/test/widgets/editable_text_test.dart
View file @
9d724d4c
...
@@ -129,7 +129,7 @@ void main() {
...
@@ -129,7 +129,7 @@ void main() {
equals
(
'TextInputType.text'
));
equals
(
'TextInputType.text'
));
expect
(
tester
.
testTextInput
.
setClientArgs
[
'inputAction'
],
expect
(
tester
.
testTextInput
.
setClientArgs
[
'inputAction'
],
equals
(
'TextInputAction.done'
));
equals
(
'TextInputAction.done'
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Keyboard is configured for "unspecified" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Keyboard is configured for "unspecified" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
await
_desiredKeyboardActionIsRequested
(
await
_desiredKeyboardActionIsRequested
(
...
@@ -161,7 +161,7 @@ void main() {
...
@@ -161,7 +161,7 @@ void main() {
action:
TextInputAction
.
send
,
action:
TextInputAction
.
send
,
serializedActionName:
'TextInputAction.send'
,
serializedActionName:
'TextInputAction.send'
,
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Keyboard is configured for "go" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Keyboard is configured for "go" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
await
_desiredKeyboardActionIsRequested
(
await
_desiredKeyboardActionIsRequested
(
...
@@ -185,7 +185,7 @@ void main() {
...
@@ -185,7 +185,7 @@ void main() {
action:
TextInputAction
.
send
,
action:
TextInputAction
.
send
,
serializedActionName:
'TextInputAction.send'
,
serializedActionName:
'TextInputAction.send'
,
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Keyboard is configured for "next" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Keyboard is configured for "next" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
await
_desiredKeyboardActionIsRequested
(
await
_desiredKeyboardActionIsRequested
(
...
@@ -193,7 +193,7 @@ void main() {
...
@@ -193,7 +193,7 @@ void main() {
action:
TextInputAction
.
next
,
action:
TextInputAction
.
next
,
serializedActionName:
'TextInputAction.next'
,
serializedActionName:
'TextInputAction.next'
,
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Keyboard is configured for "previous" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Keyboard is configured for "previous" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
await
_desiredKeyboardActionIsRequested
(
await
_desiredKeyboardActionIsRequested
(
...
@@ -201,7 +201,7 @@ void main() {
...
@@ -201,7 +201,7 @@ void main() {
action:
TextInputAction
.
previous
,
action:
TextInputAction
.
previous
,
serializedActionName:
'TextInputAction.previous'
,
serializedActionName:
'TextInputAction.previous'
,
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Keyboard is configured for "continue" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Keyboard is configured for "continue" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
await
_desiredKeyboardActionIsRequested
(
await
_desiredKeyboardActionIsRequested
(
...
@@ -209,7 +209,7 @@ void main() {
...
@@ -209,7 +209,7 @@ void main() {
action:
TextInputAction
.
continueAction
,
action:
TextInputAction
.
continueAction
,
serializedActionName:
'TextInputAction.continueAction'
,
serializedActionName:
'TextInputAction.continueAction'
,
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Keyboard is configured for "join" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Keyboard is configured for "join" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
await
_desiredKeyboardActionIsRequested
(
await
_desiredKeyboardActionIsRequested
(
...
@@ -217,7 +217,7 @@ void main() {
...
@@ -217,7 +217,7 @@ void main() {
action:
TextInputAction
.
join
,
action:
TextInputAction
.
join
,
serializedActionName:
'TextInputAction.join'
,
serializedActionName:
'TextInputAction.join'
,
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Keyboard is configured for "route" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Keyboard is configured for "route" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
await
_desiredKeyboardActionIsRequested
(
await
_desiredKeyboardActionIsRequested
(
...
@@ -1170,7 +1170,7 @@ void main() {
...
@@ -1170,7 +1170,7 @@ void main() {
expect
(
controller
.
selection
.
extentOffset
,
9
);
expect
(
controller
.
selection
.
extentOffset
,
9
);
semantics
.
dispose
();
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'can extend selection with a11y means - character'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'can extend selection with a11y means - character'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
@@ -1271,7 +1271,7 @@ void main() {
...
@@ -1271,7 +1271,7 @@ void main() {
expect
(
controller
.
selection
.
extentOffset
,
2
);
expect
(
controller
.
selection
.
extentOffset
,
2
);
semantics
.
dispose
();
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'can extend selection with a11y means - word'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'can extend selection with a11y means - word'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
@@ -1373,7 +1373,7 @@ void main() {
...
@@ -1373,7 +1373,7 @@ void main() {
expect
(
controller
.
selection
.
extentOffset
,
9
);
expect
(
controller
.
selection
.
extentOffset
,
9
);
semantics
.
dispose
();
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'password fields have correct semantics'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'password fields have correct semantics'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
@@ -2046,7 +2046,7 @@ void main() {
...
@@ -2046,7 +2046,7 @@ void main() {
// at all. Again, both handles should be invisible.
// at all. Again, both handles should be invisible.
scrollable
.
controller
.
jumpTo
(
0
);
scrollable
.
controller
.
jumpTo
(
0
);
await
verifyVisibility
(
HandlePositionInViewport
.
rightEdge
,
false
,
HandlePositionInViewport
.
rightEdge
,
false
);
await
verifyVisibility
(
HandlePositionInViewport
.
rightEdge
,
false
,
HandlePositionInViewport
.
rightEdge
,
false
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'text selection handle visibility RTL'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'text selection handle visibility RTL'
,
(
WidgetTester
tester
)
async
{
// Text with two separate words to select.
// Text with two separate words to select.
...
@@ -2103,7 +2103,7 @@ void main() {
...
@@ -2103,7 +2103,7 @@ void main() {
expect
(
state
.
selectionOverlay
.
handlesAreVisible
,
isTrue
);
expect
(
state
.
selectionOverlay
.
handlesAreVisible
,
isTrue
);
expect
(
controller
.
selection
.
base
.
offset
,
0
);
expect
(
controller
.
selection
.
base
.
offset
,
0
);
expect
(
controller
.
selection
.
extent
.
offset
,
5
);
expect
(
controller
.
selection
.
extent
.
offset
,
5
);
});
}
,
skip:
isBrowser
);
// Regression test for https://github.com/flutter/flutter/issues/31287
// Regression test for https://github.com/flutter/flutter/issues/31287
testWidgets
(
'iOS text selection handle visibility'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'iOS text selection handle visibility'
,
(
WidgetTester
tester
)
async
{
...
@@ -2273,7 +2273,7 @@ void main() {
...
@@ -2273,7 +2273,7 @@ void main() {
await
verifyVisibility
(
HandlePositionInViewport
.
rightEdge
,
false
,
HandlePositionInViewport
.
rightEdge
,
false
);
await
verifyVisibility
(
HandlePositionInViewport
.
rightEdge
,
false
,
HandlePositionInViewport
.
rightEdge
,
false
);
debugDefaultTargetPlatformOverride
=
null
;
debugDefaultTargetPlatformOverride
=
null
;
});
}
,
skip:
isBrowser
);
}
}
class
MockTextSelectionControls
extends
Mock
implements
TextSelectionControls
{
class
MockTextSelectionControls
extends
Mock
implements
TextSelectionControls
{
...
...
packages/flutter/test/widgets/image_resolution_test.dart
View file @
9d724d4c
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
@TestOn
(
'!chrome'
)
// asset bundle behaves differently.
import
'dart:async'
;
import
'dart:async'
;
import
'dart:typed_data'
;
import
'dart:typed_data'
;
import
'dart:ui'
as
ui
show
Image
,
ImageByteFormat
;
import
'dart:ui'
as
ui
show
Image
,
ImageByteFormat
;
...
...
packages/flutter/test/widgets/invert_colors_test.dart
View file @
9d724d4c
...
@@ -23,7 +23,7 @@ void main() {
...
@@ -23,7 +23,7 @@ void main() {
matchesGoldenFile
(
'invert_colors_test.0.png'
),
matchesGoldenFile
(
'invert_colors_test.0.png'
),
skip:
!
isLinux
,
skip:
!
isLinux
,
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'InvertColors and ColorFilter'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'InvertColors and ColorFilter'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
const
RepaintBoundary
(
await
tester
.
pumpWidget
(
const
RepaintBoundary
(
...
@@ -42,7 +42,7 @@ void main() {
...
@@ -42,7 +42,7 @@ void main() {
matchesGoldenFile
(
'invert_colors_test.1.png'
),
matchesGoldenFile
(
'invert_colors_test.1.png'
),
skip:
!
isLinux
,
skip:
!
isLinux
,
);
);
});
}
,
skip:
isBrowser
);
}
}
// Draws a rectangle sized by the parent widget with [color], [colorFilter],
// Draws a rectangle sized by the parent widget with [color], [colorFilter],
...
...
packages/flutter/test/widgets/keep_alive_test.dart
View file @
9d724d4c
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
@TestOn
(
'!chrome'
)
// diagnostics use Platform.operatingSystem.
import
'dart:io'
show
Platform
;
import
'dart:io'
show
Platform
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
...
packages/flutter/test/widgets/list_view_test.dart
View file @
9d724d4c
...
@@ -212,7 +212,7 @@ void main() {
...
@@ -212,7 +212,7 @@ void main() {
await
tester
.
pumpWidget
(
_StatefulListView
((
int
i
)
=>
i
%
3
==
0
));
await
tester
.
pumpWidget
(
_StatefulListView
((
int
i
)
=>
i
%
3
==
0
));
await
checkAndScroll
(
'0:true'
);
await
checkAndScroll
(
'0:true'
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'ListView can build out of underflow'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'ListView can build out of underflow'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
...
packages/flutter/test/widgets/list_wheel_scroll_view_test.dart
View file @
9d724d4c
...
@@ -538,7 +538,7 @@ void main() {
...
@@ -538,7 +538,7 @@ void main() {
matchesGoldenFile
(
'list_wheel_scroll_view.center_child.magnified.png'
),
matchesGoldenFile
(
'list_wheel_scroll_view.center_child.magnified.png'
),
skip:
!
isLinux
,
skip:
!
isLinux
,
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Default middle transform'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Default middle transform'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
@@ -593,7 +593,7 @@ void main() {
...
@@ -593,7 +593,7 @@ void main() {
matchesGoldenFile
(
'list_wheel_scroll_view.curved_wheel.left.png'
),
matchesGoldenFile
(
'list_wheel_scroll_view.curved_wheel.left.png'
),
skip:
!
isLinux
,
skip:
!
isLinux
,
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Scrolling, diameterRatio, perspective all changes matrix'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Scrolling, diameterRatio, perspective all changes matrix'
,
(
WidgetTester
tester
)
async
{
final
ScrollController
controller
=
ScrollController
(
initialScrollOffset:
200.0
);
final
ScrollController
controller
=
ScrollController
(
initialScrollOffset:
200.0
);
...
...
packages/flutter/test/widgets/opacity_test.dart
View file @
9d724d4c
...
@@ -180,7 +180,7 @@ void main() {
...
@@ -180,7 +180,7 @@ void main() {
matchesGoldenFile
(
'opacity_test.offset.1.png'
),
matchesGoldenFile
(
'opacity_test.offset.1.png'
),
skip:
!
isLinux
,
skip:
!
isLinux
,
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'empty opacity does not crash'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'empty opacity does not crash'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
@@ -190,5 +190,5 @@ void main() {
...
@@ -190,5 +190,5 @@ void main() {
// The following line will send the layer to engine and cause crash if an
// The following line will send the layer to engine and cause crash if an
// empty opacity layer is sent.
// empty opacity layer is sent.
await
element
.
renderObject
.
layer
.
toImage
(
const
Rect
.
fromLTRB
(
0.0
,
0.0
,
1.0
,
1.0
));
await
element
.
renderObject
.
layer
.
toImage
(
const
Rect
.
fromLTRB
(
0.0
,
0.0
,
1.0
,
1.0
));
});
}
,
skip:
isBrowser
);
}
}
packages/flutter/test/widgets/physical_model_test.dart
View file @
9d724d4c
...
@@ -113,7 +113,7 @@ void main() {
...
@@ -113,7 +113,7 @@ void main() {
matchesGoldenFile
(
'physical_model_overflow.png'
),
matchesGoldenFile
(
'physical_model_overflow.png'
),
skip:
!
isLinux
,
skip:
!
isLinux
,
);
);
});
}
,
skip:
isBrowser
);
group
(
'PhysicalModelLayer checks elevation'
,
()
{
group
(
'PhysicalModelLayer checks elevation'
,
()
{
Future
<
void
>
_testStackChildren
(
Future
<
void
>
_testStackChildren
(
...
@@ -278,7 +278,7 @@ void main() {
...
@@ -278,7 +278,7 @@ void main() {
await
_testStackChildren
(
tester
,
children
,
expectedErrorCount:
0
);
await
_testStackChildren
(
tester
,
children
,
expectedErrorCount:
0
);
expect
(
find
.
byType
(
Material
),
findsNWidgets
(
2
));
expect
(
find
.
byType
(
Material
),
findsNWidgets
(
2
));
});
}
,
skip:
isBrowser
);
// Tests:
// Tests:
//
//
...
@@ -485,7 +485,7 @@ void main() {
...
@@ -485,7 +485,7 @@ void main() {
await
_testStackChildren
(
tester
,
children
,
expectedErrorCount:
0
);
await
_testStackChildren
(
tester
,
children
,
expectedErrorCount:
0
);
expect
(
find
.
byType
(
Material
),
findsNWidgets
(
2
));
expect
(
find
.
byType
(
Material
),
findsNWidgets
(
2
));
});
}
,
skip:
isBrowser
);
// Tests:
// Tests:
//
//
...
...
packages/flutter/test/widgets/platform_view_test.dart
View file @
9d724d4c
// Copyright 2018 The Chromium Authors. All rights reserved.
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
@TestOn
(
'!chrome'
)
import
'dart:async'
;
import
'dart:async'
;
import
'dart:typed_data'
;
import
'dart:typed_data'
;
...
...
packages/flutter/test/widgets/scrollable_fling_test.dart
View file @
9d724d4c
...
@@ -83,7 +83,7 @@ void main() {
...
@@ -83,7 +83,7 @@ void main() {
await
tester
.
tap
(
find
.
byType
(
Scrollable
));
await
tester
.
tap
(
find
.
byType
(
Scrollable
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
expect
(
log
,
equals
(<
String
>[
'tap 21'
,
'tap 35'
]));
expect
(
log
,
equals
(<
String
>[
'tap 21'
,
'tap 35'
]));
});
}
,
skip:
isBrowser
);
testWidgets
(
'fling and wait and tap'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'fling and wait and tap'
,
(
WidgetTester
tester
)
async
{
final
List
<
String
>
log
=
<
String
>[];
final
List
<
String
>
log
=
<
String
>[];
...
@@ -110,5 +110,5 @@ void main() {
...
@@ -110,5 +110,5 @@ void main() {
await
tester
.
tap
(
find
.
byType
(
Scrollable
));
await
tester
.
tap
(
find
.
byType
(
Scrollable
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
expect
(
log
,
equals
(<
String
>[
'tap 21'
,
'tap 48'
]));
expect
(
log
,
equals
(<
String
>[
'tap 21'
,
'tap 48'
]));
});
}
,
skip:
isBrowser
);
}
}
packages/flutter/test/widgets/scrollable_of_test.dart
View file @
9d724d4c
...
@@ -24,7 +24,7 @@ class _ScrollPositionListenerState extends State<ScrollPositionListener> {
...
@@ -24,7 +24,7 @@ class _ScrollPositionListenerState extends State<ScrollPositionListener> {
_position
?.
removeListener
(
listener
);
_position
?.
removeListener
(
listener
);
_position
=
Scrollable
.
of
(
context
)?.
position
;
_position
=
Scrollable
.
of
(
context
)?.
position
;
_position
?.
addListener
(
listener
);
_position
?.
addListener
(
listener
);
widget
.
log
(
'didChangeDependencies
${_position?.pixels}
'
);
widget
.
log
(
'didChangeDependencies
${_position?.pixels
?.toStringAsFixed(1)
}
'
);
}
}
@override
@override
...
@@ -37,7 +37,7 @@ class _ScrollPositionListenerState extends State<ScrollPositionListener> {
...
@@ -37,7 +37,7 @@ class _ScrollPositionListenerState extends State<ScrollPositionListener> {
Widget
build
(
BuildContext
context
)
=>
widget
.
child
;
Widget
build
(
BuildContext
context
)
=>
widget
.
child
;
void
listener
()
{
void
listener
()
{
widget
.
log
(
'listener
${_position?.pixels}
'
);
widget
.
log
(
'listener
${_position?.pixels
?.toStringAsFixed(1)
}
'
);
}
}
}
}
...
...
packages/flutter/test/widgets/scrollable_semantics_test.dart
View file @
9d724d4c
...
@@ -259,7 +259,7 @@ void main() {
...
@@ -259,7 +259,7 @@ void main() {
));
));
semantics
.
dispose
();
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'correct scrollProgress for unbound'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'correct scrollProgress for unbound'
,
(
WidgetTester
tester
)
async
{
semantics
=
SemanticsTester
(
tester
);
semantics
=
SemanticsTester
(
tester
);
...
...
packages/flutter/test/widgets/semantics_clipping_test.dart
View file @
9d724d4c
...
@@ -63,7 +63,7 @@ void main() {
...
@@ -63,7 +63,7 @@ void main() {
));
));
semantics
.
dispose
();
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'SemanticsNode is not removed if out of bounds and merged into something within bounds'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'SemanticsNode is not removed if out of bounds and merged into something within bounds'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
@@ -124,5 +124,5 @@ void main() {
...
@@ -124,5 +124,5 @@ void main() {
));
));
semantics
.
dispose
();
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
}
}
packages/flutter/test/widgets/semantics_test.dart
View file @
9d724d4c
...
@@ -536,7 +536,7 @@ void main() {
...
@@ -536,7 +536,7 @@ void main() {
expect
(
semantics
,
hasSemantics
(
expectedSemantics
,
ignoreId:
true
));
expect
(
semantics
,
hasSemantics
(
expectedSemantics
,
ignoreId:
true
));
semantics
.
dispose
();
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'Actions can be replaced without triggering semantics update'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Actions can be replaced without triggering semantics update'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
...
packages/flutter/test/widgets/semantics_tester_generateTestSemanticsExpressionForCurrentSemanticsTree_test.dart
View file @
9d724d4c
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
@TestOn
(
'!chrome'
)
import
'dart:async'
;
import
'dart:async'
;
import
'dart:io'
;
import
'dart:io'
;
...
...
packages/flutter/test/widgets/shader_mask_test.dart
View file @
9d724d4c
...
@@ -21,7 +21,7 @@ void main() {
...
@@ -21,7 +21,7 @@ void main() {
testWidgets
(
'Can be constructed'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Can be constructed'
,
(
WidgetTester
tester
)
async
{
final
Widget
child
=
Container
(
width:
100.0
,
height:
100.0
);
final
Widget
child
=
Container
(
width:
100.0
,
height:
100.0
);
await
tester
.
pumpWidget
(
ShaderMask
(
child:
child
,
shaderCallback:
createShader
));
await
tester
.
pumpWidget
(
ShaderMask
(
child:
child
,
shaderCallback:
createShader
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Bounds rect includes offset'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Bounds rect includes offset'
,
(
WidgetTester
tester
)
async
{
Rect
shaderBounds
;
Rect
shaderBounds
;
...
@@ -45,5 +45,5 @@ void main() {
...
@@ -45,5 +45,5 @@ void main() {
// The shader bounds rectangle should reflect the position of the centered SizedBox.
// The shader bounds rectangle should reflect the position of the centered SizedBox.
expect
(
shaderBounds
,
equals
(
const
Rect
.
fromLTWH
(
200.0
,
100.0
,
400.0
,
400.0
)));
expect
(
shaderBounds
,
equals
(
const
Rect
.
fromLTWH
(
200.0
,
100.0
,
400.0
,
400.0
)));
});
}
,
skip:
isBrowser
);
}
}
packages/flutter/test/widgets/shadow_test.dart
View file @
9d724d4c
...
@@ -34,7 +34,7 @@ void main() {
...
@@ -34,7 +34,7 @@ void main() {
skip:
!
isLinux
skip:
!
isLinux
);
// shadows render differently on different platforms
);
// shadows render differently on different platforms
debugDisableShadows
=
true
;
debugDisableShadows
=
true
;
});
}
,
skip:
isBrowser
);
testWidgets
(
'Shadows on ShapeDecoration'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Shadows on ShapeDecoration'
,
(
WidgetTester
tester
)
async
{
debugDisableShadows
=
false
;
debugDisableShadows
=
false
;
...
@@ -95,7 +95,7 @@ void main() {
...
@@ -95,7 +95,7 @@ void main() {
skip:
!
isLinux
,
skip:
!
isLinux
,
);
// shadows render differently on different platforms
);
// shadows render differently on different platforms
debugDisableShadows
=
true
;
debugDisableShadows
=
true
;
});
}
,
skip:
isBrowser
);
testWidgets
(
'Shadows with PhysicalShape'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Shadows with PhysicalShape'
,
(
WidgetTester
tester
)
async
{
debugDisableShadows
=
false
;
debugDisableShadows
=
false
;
...
...
packages/flutter/test/widgets/shape_decoration_test.dart
View file @
9d724d4c
...
@@ -59,7 +59,7 @@ Future<void> main() async {
...
@@ -59,7 +59,7 @@ Future<void> main() async {
..
rect
(
color:
Colors
.
black
)
..
rect
(
color:
Colors
.
black
)
..
rect
(
color:
Colors
.
white
),
..
rect
(
color:
Colors
.
white
),
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'TestBorder and Directionality - 1'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'TestBorder and Directionality - 1'
,
(
WidgetTester
tester
)
async
{
final
List
<
String
>
log
=
<
String
>[];
final
List
<
String
>
log
=
<
String
>[];
...
...
packages/flutter/test/widgets/simple_semantics_test.dart
View file @
9d724d4c
...
@@ -34,7 +34,7 @@ void main() {
...
@@ -34,7 +34,7 @@ void main() {
)));
)));
semantics
.
dispose
();
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'Simple tree is simple - material'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Simple tree is simple - material'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
@@ -78,5 +78,5 @@ void main() {
...
@@ -78,5 +78,5 @@ void main() {
)));
)));
semantics
.
dispose
();
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
}
}
packages/flutter/test/widgets/slivers_appbar_floating_pinned_test.dart
View file @
9d724d4c
...
@@ -66,7 +66,7 @@ void main() {
...
@@ -66,7 +66,7 @@ void main() {
// initial position of E was 200 + 56 + cSize.height + cSize.height + 500
// initial position of E was 200 + 56 + cSize.height + cSize.height + 500
// we've scrolled that up by 600.0, meaning it's at that minus 600 now:
// we've scrolled that up by 600.0, meaning it's at that minus 600 now:
expect
(
tester
.
getTopLeft
(
find
.
text
(
'E'
)),
Offset
(
0.0
,
200.0
+
56.0
+
cSize
.
height
*
2.0
+
500.0
-
600.0
));
expect
(
tester
.
getTopLeft
(
find
.
text
(
'E'
)),
Offset
(
0.0
,
200.0
+
56.0
+
cSize
.
height
*
2.0
+
500.0
-
600.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Does not crash when there is less than minExtent remainingPaintExtent'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Does not crash when there is less than minExtent remainingPaintExtent'
,
(
WidgetTester
tester
)
async
{
// Regression test for https://github.com/flutter/flutter/issues/21887.
// Regression test for https://github.com/flutter/flutter/issues/21887.
...
...
packages/flutter/test/widgets/text_test.dart
View file @
9d724d4c
...
@@ -55,7 +55,7 @@ void main() {
...
@@ -55,7 +55,7 @@ void main() {
final
Size
largeSize
=
tester
.
getSize
(
find
.
byType
(
RichText
));
final
Size
largeSize
=
tester
.
getSize
(
find
.
byType
(
RichText
));
expect
(
largeSize
.
width
,
105.0
);
expect
(
largeSize
.
width
,
105.0
);
expect
(
largeSize
.
height
,
equals
(
21.0
));
expect
(
largeSize
.
height
,
equals
(
21.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Text respects textScaleFactor with explicit font size'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Text respects textScaleFactor with explicit font size'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
const
Center
(
await
tester
.
pumpWidget
(
const
Center
(
...
@@ -83,7 +83,7 @@ void main() {
...
@@ -83,7 +83,7 @@ void main() {
final
Size
largeSize
=
tester
.
getSize
(
find
.
byType
(
RichText
));
final
Size
largeSize
=
tester
.
getSize
(
find
.
byType
(
RichText
));
expect
(
largeSize
.
width
,
anyOf
(
131.0
,
130.0
));
expect
(
largeSize
.
width
,
anyOf
(
131.0
,
130.0
));
expect
(
largeSize
.
height
,
equals
(
26.0
));
expect
(
largeSize
.
height
,
equals
(
26.0
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Text throws a nice error message if there
\'
s no Directionality'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Text throws a nice error message if there
\'
s no Directionality'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
const
Text
(
'Hello'
));
await
tester
.
pumpWidget
(
const
Text
(
'Hello'
));
...
@@ -227,7 +227,7 @@ void main() {
...
@@ -227,7 +227,7 @@ void main() {
);
);
expect
(
semantics
,
hasSemantics
(
expectedSemantics
,
ignoreTransform:
true
,
ignoreId:
true
,
ignoreRect:
true
));
expect
(
semantics
,
hasSemantics
(
expectedSemantics
,
ignoreTransform:
true
,
ignoreId:
true
,
ignoreRect:
true
));
semantics
.
dispose
();
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'recognizers split semantic node - bidi'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'recognizers split semantic node - bidi'
,
(
WidgetTester
tester
)
async
{
...
@@ -356,7 +356,7 @@ void main() {
...
@@ -356,7 +356,7 @@ void main() {
);
);
expect
(
semantics
,
hasSemantics
(
expectedSemantics
,
ignoreTransform:
true
,
ignoreId:
true
,
ignoreRect:
true
));
expect
(
semantics
,
hasSemantics
(
expectedSemantics
,
ignoreTransform:
true
,
ignoreId:
true
,
ignoreRect:
true
));
semantics
.
dispose
();
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'inline widgets semantic nodes scale'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'inline widgets semantic nodes scale'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
@@ -427,7 +427,7 @@ void main() {
...
@@ -427,7 +427,7 @@ void main() {
);
);
expect
(
semantics
,
hasSemantics
(
expectedSemantics
,
ignoreTransform:
true
,
ignoreId:
true
,));
expect
(
semantics
,
hasSemantics
(
expectedSemantics
,
ignoreTransform:
true
,
ignoreId:
true
,));
semantics
.
dispose
();
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
testWidgets
(
'Overflow is clipping correctly - short text with overflow: clip'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Overflow is clipping correctly - short text with overflow: clip'
,
(
WidgetTester
tester
)
async
{
await
_pumpTextWidget
(
await
_pumpTextWidget
(
...
@@ -447,7 +447,7 @@ void main() {
...
@@ -447,7 +447,7 @@ void main() {
);
);
expect
(
find
.
byType
(
Text
),
paints
..
clipRect
(
rect:
const
Rect
.
fromLTWH
(
0
,
0
,
50
,
50
)));
expect
(
find
.
byType
(
Text
),
paints
..
clipRect
(
rect:
const
Rect
.
fromLTWH
(
0
,
0
,
50
,
50
)));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Overflow is clipping correctly - short text with overflow: ellipsis'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Overflow is clipping correctly - short text with overflow: ellipsis'
,
(
WidgetTester
tester
)
async
{
await
_pumpTextWidget
(
await
_pumpTextWidget
(
...
@@ -534,7 +534,7 @@ void main() {
...
@@ -534,7 +534,7 @@ void main() {
final
Size
textSizeLongestLine
=
tester
.
getSize
(
find
.
byType
(
Text
));
final
Size
textSizeLongestLine
=
tester
.
getSize
(
find
.
byType
(
Text
));
expect
(
textSizeLongestLine
.
width
,
equals
(
630.0
));
expect
(
textSizeLongestLine
.
width
,
equals
(
630.0
));
expect
(
textSizeLongestLine
.
height
,
equals
(
fontHeight
*
2
));
expect
(
textSizeLongestLine
.
height
,
equals
(
fontHeight
*
2
));
});
}
,
skip:
isBrowser
);
}
}
Future
<
void
>
_pumpTextWidget
({
WidgetTester
tester
,
String
text
,
TextOverflow
overflow
})
{
Future
<
void
>
_pumpTextWidget
({
WidgetTester
tester
,
String
text
,
TextOverflow
overflow
})
{
...
...
packages/flutter/test/widgets/transformed_scrollable_test.dart
View file @
9d724d4c
...
@@ -214,5 +214,5 @@ void main() {
...
@@ -214,5 +214,5 @@ void main() {
// coordinate space of the screen, the scroll view actually moved far more
// coordinate space of the screen, the scroll view actually moved far more
// pixels in its local coordinate system due to the perspective transform.
// pixels in its local coordinate system due to the perspective transform.
expect
(
controller
.
offset
,
greaterThan
(
100
));
expect
(
controller
.
offset
,
greaterThan
(
100
));
});
}
,
skip:
isBrowser
);
}
}
packages/flutter/test/widgets/visibility_test.dart
View file @
9d724d4c
...
@@ -309,5 +309,5 @@ void main() {
...
@@ -309,5 +309,5 @@ void main() {
log
.
clear
();
log
.
clear
();
semantics
.
dispose
();
semantics
.
dispose
();
});
}
,
skip:
isBrowser
);
}
}
packages/flutter/test/widgets/widget_inspector_test.dart
View file @
9d724d4c
...
@@ -930,7 +930,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -930,7 +930,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
expect
(
json
.
decode
(
service
.
getSelectedWidget
(
null
,
'my-group'
)),
contains
(
'createdByLocalProject'
));
expect
(
json
.
decode
(
service
.
getSelectedWidget
(
null
,
'my-group'
)),
contains
(
'createdByLocalProject'
));
service
.
setSelection
(
richText
,
'my-group'
);
service
.
setSelection
(
richText
,
'my-group'
);
expect
(
json
.
decode
(
service
.
getSelectedWidget
(
null
,
'my-group'
)),
contains
(
'createdByLocalProject'
));
expect
(
json
.
decode
(
service
.
getSelectedWidget
(
null
,
'my-group'
)),
contains
(
'createdByLocalProject'
));
},
skip:
!
WidgetInspectorService
.
instance
.
isWidgetCreationTracked
());
// Test requires --track-widget-creation flag.
},
skip:
!
WidgetInspectorService
.
instance
.
isWidgetCreationTracked
()
||
isBrowser
);
// Test requires --track-widget-creation flag.
test
(
'ext.flutter.inspector.disposeGroup'
,
()
async
{
test
(
'ext.flutter.inspector.disposeGroup'
,
()
async
{
final
Object
a
=
Object
();
final
Object
a
=
Object
();
...
@@ -1490,7 +1490,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -1490,7 +1490,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
expect
(
await
service
.
testExtension
(
'getSelectedWidget'
,
<
String
,
String
>{
'objectGroup'
:
'my-group'
}),
contains
(
'createdByLocalProject'
));
expect
(
await
service
.
testExtension
(
'getSelectedWidget'
,
<
String
,
String
>{
'objectGroup'
:
'my-group'
}),
contains
(
'createdByLocalProject'
));
service
.
setSelection
(
richText
,
'my-group'
);
service
.
setSelection
(
richText
,
'my-group'
);
expect
(
await
service
.
testExtension
(
'getSelectedWidget'
,
<
String
,
String
>{
'objectGroup'
:
'my-group'
}),
contains
(
'createdByLocalProject'
));
expect
(
await
service
.
testExtension
(
'getSelectedWidget'
,
<
String
,
String
>{
'objectGroup'
:
'my-group'
}),
contains
(
'createdByLocalProject'
));
},
skip:
!
WidgetInspectorService
.
instance
.
isWidgetCreationTracked
());
// Test requires --track-widget-creation flag.
},
skip:
!
WidgetInspectorService
.
instance
.
isWidgetCreationTracked
()
||
isBrowser
);
// Test requires --track-widget-creation flag.
testWidgets
(
'ext.flutter.inspector.trackRebuildDirtyWidgets'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'ext.flutter.inspector.trackRebuildDirtyWidgets'
,
(
WidgetTester
tester
)
async
{
service
.
rebuildCount
=
0
;
service
.
rebuildCount
=
0
;
...
@@ -2152,7 +2152,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2152,7 +2152,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
matchesGoldenFile
(
'inspector.sizedBox_debugPaint_margin.png'
),
matchesGoldenFile
(
'inspector.sizedBox_debugPaint_margin.png'
),
skip:
!
isLinux
,
skip:
!
isLinux
,
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Screenshot of composited transforms - only offsets'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Screenshot of composited transforms - only offsets'
,
(
WidgetTester
tester
)
async
{
// Composited transforms are challenging to take screenshots of as the
// Composited transforms are challenging to take screenshots of as the
...
@@ -2250,7 +2250,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2250,7 +2250,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
matchesGoldenFile
(
'inspector.composited_transform.only_offsets_target.png'
),
matchesGoldenFile
(
'inspector.composited_transform.only_offsets_target.png'
),
skip:
!
isLinux
,
skip:
!
isLinux
,
);
);
});
}
,
skip:
isBrowser
);
testWidgets
(
'Screenshot composited transforms - with rotations'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Screenshot composited transforms - with rotations'
,
(
WidgetTester
tester
)
async
{
final
LayerLink
link
=
LayerLink
();
final
LayerLink
link
=
LayerLink
();
...
@@ -2360,7 +2360,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2360,7 +2360,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
expect
(
identical
(
key2
.
currentContext
.
findRenderObject
(),
box2
),
isTrue
);
expect
(
identical
(
key2
.
currentContext
.
findRenderObject
(),
box2
),
isTrue
);
expect
(
box1
.
localToGlobal
(
Offset
.
zero
),
equals
(
position1
));
expect
(
box1
.
localToGlobal
(
Offset
.
zero
),
equals
(
position1
));
expect
(
box2
.
localToGlobal
(
Offset
.
zero
),
equals
(
position2
));
expect
(
box2
.
localToGlobal
(
Offset
.
zero
),
equals
(
position2
));
});
}
,
skip:
isBrowser
);
}
}
}
}
...
...
packages/flutter/test/widgets/wrap_test.dart
View file @
9d724d4c
...
@@ -827,7 +827,7 @@ void main() {
...
@@ -827,7 +827,7 @@ void main() {
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
text
(
'X'
)).
size
,
const
Size
(
100.0
,
100.0
));
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
text
(
'X'
)).
size
,
const
Size
(
100.0
,
100.0
));
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
byType
(
Baseline
)).
size
,
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
byType
(
Baseline
)).
size
,
within
<
Size
>(
from:
const
Size
(
100.0
,
200.0
),
distance:
0.001
));
within
<
Size
>(
from:
const
Size
(
100.0
,
200.0
),
distance:
0.001
));
});
}
,
skip:
isBrowser
);
testWidgets
(
'Spacing with slight overflow'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Spacing with slight overflow'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
Wrap
(
await
tester
.
pumpWidget
(
Wrap
(
...
...
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