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
cd1d40a7
Unverified
Commit
cd1d40a7
authored
Jun 03, 2019
by
Jonah Williams
Committed by
GitHub
Jun 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Add web safe indirection to Platform.isPlatform getters (#33406)" (#33776)
This reverts commit
d92b3b40
.
parent
d92b3b40
Changes
32
Show whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
147 additions
and
145 deletions
+147
-145
tween_test.dart
packages/flutter/test/animation/tween_test.dart
+3
-1
date_picker_test.dart
packages/flutter/test/cupertino/date_picker_test.dart
+3
-2
nav_bar_test.dart
packages/flutter/test/cupertino/nav_bar_test.dart
+4
-2
segmented_control_test.dart
packages/flutter/test/cupertino/segmented_control_test.dart
+4
-2
text_field_test.dart
packages/flutter/test/cupertino/text_field_test.dart
+3
-2
bottom_app_bar_theme_test.dart
...ages/flutter/test/material/bottom_app_bar_theme_test.dart
+3
-1
bottom_navigation_bar_test.dart
...ges/flutter/test/material/bottom_navigation_bar_test.dart
+2
-1
card_theme_test.dart
packages/flutter/test/material/card_theme_test.dart
+3
-1
date_picker_test.dart
packages/flutter/test/material/date_picker_test.dart
+2
-1
dialog_theme_test.dart
packages/flutter/test/material/dialog_theme_test.dart
+3
-1
dropdown_test.dart
packages/flutter/test/material/dropdown_test.dart
+3
-2
floating_action_button_test.dart
...es/flutter/test/material/floating_action_button_test.dart
+2
-1
input_decorator_test.dart
packages/flutter/test/material/input_decorator_test.dart
+4
-3
material_test.dart
packages/flutter/test/material/material_test.dart
+4
-2
radio_test.dart
packages/flutter/test/material/radio_test.dart
+2
-1
tab_bar_theme_test.dart
packages/flutter/test/material/tab_bar_theme_test.dart
+6
-4
text_field_test.dart
packages/flutter/test/material/text_field_test.dart
+4
-3
continous_rectangle_border_test.dart
...lutter/test/painting/continous_rectangle_border_test.dart
+4
-3
text_painter_rtl_test.dart
packages/flutter/test/painting/text_painter_rtl_test.dart
+3
-1
localized_fonts_test.dart
packages/flutter/test/rendering/localized_fonts_test.dart
+5
-3
paragraph_test.dart
packages/flutter/test/rendering/paragraph_test.dart
+3
-2
backdrop_filter_test.dart
packages/flutter/test/widgets/backdrop_filter_test.dart
+2
-1
editable_text_cursor_test.dart
packages/flutter/test/widgets/editable_text_cursor_test.dart
+5
-3
invert_colors_test.dart
packages/flutter/test/widgets/invert_colors_test.dart
+4
-2
list_wheel_scroll_view_test.dart
...ges/flutter/test/widgets/list_wheel_scroll_view_test.dart
+4
-2
opacity_test.dart
packages/flutter/test/widgets/opacity_test.dart
+3
-1
physical_model_test.dart
packages/flutter/test/widgets/physical_model_test.dart
+2
-1
shadow_test.dart
packages/flutter/test/widgets/shadow_test.dart
+18
-12
text_golden_test.dart
packages/flutter/test/widgets/text_golden_test.dart
+8
-6
widget_inspector_test.dart
packages/flutter/test/widgets/widget_inspector_test.dart
+31
-30
flutter_test.dart
packages/flutter_test/lib/flutter_test.dart
+0
-1
platform.dart
packages/flutter_test/lib/src/platform.dart
+0
-47
No files found.
packages/flutter/test/animation/tween_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter/animation.dart'
;
import
'package:flutter/animation.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter/widgets.dart'
;
...
@@ -83,7 +85,7 @@ void main() {
...
@@ -83,7 +85,7 @@ void main() {
),
),
moreOrLessEquals
(
0.0
),
moreOrLessEquals
(
0.0
),
);
);
},
skip:
isWindows
);
// floating point math not quite deterministic on Windows?
},
skip:
Platform
.
isWindows
);
// floating point math not quite deterministic on Windows?
test
(
'ConstantTween'
,
()
{
test
(
'ConstantTween'
,
()
{
final
ConstantTween
<
double
>
tween
=
ConstantTween
<
double
>(
100.0
);
final
ConstantTween
<
double
>
tween
=
ConstantTween
<
double
>(
100.0
);
...
...
packages/flutter/test/cupertino/date_picker_test.dart
View file @
cd1d40a7
...
@@ -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.
import
'dart:io'
show
Platform
;
import
'dart:ui'
;
import
'dart:ui'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
...
@@ -844,7 +845,7 @@ void main() {
...
@@ -844,7 +845,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byType
(
CupertinoDatePicker
),
find
.
byType
(
CupertinoDatePicker
),
matchesGoldenFile
(
'date_picker_test.datetime.initial.1.png'
),
matchesGoldenFile
(
'date_picker_test.datetime.initial.1.png'
),
skip:
!
isLinux
skip:
!
Platform
.
isLinux
);
);
// Slightly drag the hour component to make the current hour off-center.
// Slightly drag the hour component to make the current hour off-center.
...
@@ -854,7 +855,7 @@ void main() {
...
@@ -854,7 +855,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byType
(
CupertinoDatePicker
),
find
.
byType
(
CupertinoDatePicker
),
matchesGoldenFile
(
'date_picker_test.datetime.drag.1.png'
),
matchesGoldenFile
(
'date_picker_test.datetime.drag.1.png'
),
skip:
!
isLinux
skip:
!
Platform
.
isLinux
);
);
});
});
});
});
...
...
packages/flutter/test/cupertino/nav_bar_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
...
@@ -804,7 +806,7 @@ void main() {
...
@@ -804,7 +806,7 @@ void main() {
},
},
// TODO(xster): remove once https://github.com/flutter/flutter/issues/17483
// TODO(xster): remove once https://github.com/flutter/flutter/issues/17483
// is fixed.
// is fixed.
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
testWidgets
(
testWidgets
(
...
@@ -838,7 +840,7 @@ void main() {
...
@@ -838,7 +840,7 @@ void main() {
},
},
// TODO(xster): remove once https://github.com/flutter/flutter/issues/17483
// TODO(xster): remove once https://github.com/flutter/flutter/issues/17483
// is fixed.
// is fixed.
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
...
...
packages/flutter/test/cupertino/segmented_control_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
@@ -1327,7 +1329,7 @@ void main() {
...
@@ -1327,7 +1329,7 @@ void main() {
find
.
byType
(
RepaintBoundary
),
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'segmented_control_test.0.0.png'
),
matchesGoldenFile
(
'segmented_control_test.0.0.png'
),
);
);
},
skip:
!
isLinux
);
},
skip:
!
Platform
.
isLinux
);
testWidgets
(
'Golden Test Pressed State'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Golden Test Pressed State'
,
(
WidgetTester
tester
)
async
{
final
Map
<
int
,
Widget
>
children
=
<
int
,
Widget
>{};
final
Map
<
int
,
Widget
>
children
=
<
int
,
Widget
>{};
...
@@ -1365,5 +1367,5 @@ void main() {
...
@@ -1365,5 +1367,5 @@ void main() {
find
.
byType
(
RepaintBoundary
),
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'segmented_control_test.1.0.png'
),
matchesGoldenFile
(
'segmented_control_test.1.0.png'
),
);
);
},
skip:
!
isLinux
);
},
skip:
!
Platform
.
isLinux
);
}
}
packages/flutter/test/cupertino/text_field_test.dart
View file @
cd1d40a7
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:async'
;
import
'dart:io'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
...
@@ -375,7 +376,7 @@ void main() {
...
@@ -375,7 +376,7 @@ void main() {
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
matchesGoldenFile
(
'text_field_cursor_test.0.2.png'
),
matchesGoldenFile
(
'text_field_cursor_test.0.2.png'
),
);
);
},
skip:
!
isLinux
);
},
skip:
!
Platform
.
isLinux
);
testWidgets
(
'cursor iOS golden'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'cursor iOS golden'
,
(
WidgetTester
tester
)
async
{
debugDefaultTargetPlatformOverride
=
TargetPlatform
.
iOS
;
debugDefaultTargetPlatformOverride
=
TargetPlatform
.
iOS
;
...
@@ -405,7 +406,7 @@ void main() {
...
@@ -405,7 +406,7 @@ void main() {
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
matchesGoldenFile
(
'text_field_cursor_test.1.2.png'
),
matchesGoldenFile
(
'text_field_cursor_test.1.2.png'
),
);
);
},
skip:
!
isLinux
);
},
skip:
!
Platform
.
isLinux
);
testWidgets
(
testWidgets
(
'can control text content via controller'
,
'can control text content via controller'
,
...
...
packages/flutter/test/material/bottom_app_bar_theme_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
@@ -81,7 +83,7 @@ void main() {
...
@@ -81,7 +83,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
_painterKey
),
find
.
byKey
(
_painterKey
),
matchesGoldenFile
(
'bottom_app_bar_theme.custom_shape.png'
),
matchesGoldenFile
(
'bottom_app_bar_theme.custom_shape.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
...
packages/flutter/test/material/bottom_navigation_bar_test.dart
View file @
cd1d40a7
...
@@ -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.
import
'dart:io'
;
import
'dart:ui'
;
import
'dart:ui'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
...
@@ -1435,7 +1436,7 @@ void main() {
...
@@ -1435,7 +1436,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byType
(
BottomNavigationBar
),
find
.
byType
(
BottomNavigationBar
),
matchesGoldenFile
(
'bottom_navigation_bar.shifting_transition.2.
$pump
.png'
),
matchesGoldenFile
(
'bottom_navigation_bar.shifting_transition.2.
$pump
.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
}
}
});
});
...
...
packages/flutter/test/material/card_theme_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
@@ -138,7 +140,7 @@ void main() {
...
@@ -138,7 +140,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
painterKey
),
find
.
byKey
(
painterKey
),
matchesGoldenFile
(
'card_theme.custom_shape.png'
),
matchesGoldenFile
(
'card_theme.custom_shape.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
}
}
...
...
packages/flutter/test/material/date_picker_test.dart
View file @
cd1d40a7
...
@@ -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.
import
'dart:io'
;
import
'dart:ui'
;
import
'dart:ui'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
...
@@ -19,7 +20,7 @@ void main() {
...
@@ -19,7 +20,7 @@ void main() {
},
},
// Skip on Windows because this test is quite flaky when run on Windows,
// Skip on Windows because this test is quite flaky when run on Windows,
// until https://github.com/flutter/flutter/issues/19696 is fixed.
// until https://github.com/flutter/flutter/issues/19696 is fixed.
skip:
isWindows
,
skip:
Platform
.
isWindows
,
);
);
}
}
...
...
packages/flutter/test/material/dialog_theme_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
@@ -131,7 +133,7 @@ void main() {
...
@@ -131,7 +133,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
_painterKey
),
find
.
byKey
(
_painterKey
),
matchesGoldenFile
(
'dialog_theme.dialog_with_custom_border.png'
),
matchesGoldenFile
(
'dialog_theme.dialog_with_custom_border.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
...
packages/flutter/test/material/dropdown_test.dart
View file @
cd1d40a7
...
@@ -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.
import
'dart:io'
;
import
'dart:math'
as
math
;
import
'dart:math'
as
math
;
import
'dart:ui'
show
window
;
import
'dart:ui'
show
window
;
...
@@ -141,7 +142,7 @@ void main() {
...
@@ -141,7 +142,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
ancestor
(
of:
buttonFinder
,
matching:
find
.
byType
(
RepaintBoundary
)).
first
,
find
.
ancestor
(
of:
buttonFinder
,
matching:
find
.
byType
(
RepaintBoundary
)).
first
,
matchesGoldenFile
(
'dropdown_test.default.0.png'
),
matchesGoldenFile
(
'dropdown_test.default.0.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
@@ -154,7 +155,7 @@ void main() {
...
@@ -154,7 +155,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
ancestor
(
of:
buttonFinder
,
matching:
find
.
byType
(
RepaintBoundary
)).
first
,
find
.
ancestor
(
of:
buttonFinder
,
matching:
find
.
byType
(
RepaintBoundary
)).
first
,
matchesGoldenFile
(
'dropdown_test.expanded.0.png'
),
matchesGoldenFile
(
'dropdown_test.expanded.0.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
...
packages/flutter/test/material/floating_action_button_test.dart
View file @
cd1d40a7
...
@@ -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.
import
'dart:io'
;
import
'dart:ui'
;
import
'dart:ui'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
...
@@ -736,7 +737,7 @@ void main() {
...
@@ -736,7 +737,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
key
),
find
.
byKey
(
key
),
matchesGoldenFile
(
'floating_action_button_test.clip.2.png'
),
// .clip.1.png is obsolete and can be removed
matchesGoldenFile
(
'floating_action_button_test.clip.2.png'
),
// .clip.1.png is obsolete and can be removed
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
...
packages/flutter/test/material/input_decorator_test.dart
View file @
cd1d40a7
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:async'
;
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
...
@@ -2030,17 +2031,17 @@ void main() {
...
@@ -2030,17 +2031,17 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byType
(
InputDecorator
),
find
.
byType
(
InputDecorator
),
matchesGoldenFile
(
'input_decorator.outline_icon_label.ltr.png'
),
matchesGoldenFile
(
'input_decorator.outline_icon_label.ltr.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
await
tester
.
pumpWidget
(
buildFrame
(
TextDirection
.
rtl
));
await
tester
.
pumpWidget
(
buildFrame
(
TextDirection
.
rtl
));
await
expectLater
(
await
expectLater
(
find
.
byType
(
InputDecorator
),
find
.
byType
(
InputDecorator
),
matchesGoldenFile
(
'input_decorator.outline_icon_label.rtl.png'
),
matchesGoldenFile
(
'input_decorator.outline_icon_label.rtl.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
},
},
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
testWidgets
(
'InputDecorator draws and animates hoverColor'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'InputDecorator draws and animates hoverColor'
,
(
WidgetTester
tester
)
async
{
...
...
packages/flutter/test/material/material_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/painting.dart'
;
import
'package:flutter/painting.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
...
@@ -617,7 +619,7 @@ void main() {
...
@@ -617,7 +619,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
painterKey
),
find
.
byKey
(
painterKey
),
matchesGoldenFile
(
'material.border_paint_above.png'
),
matchesGoldenFile
(
'material.border_paint_above.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
@@ -658,7 +660,7 @@ void main() {
...
@@ -658,7 +660,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
painterKey
),
find
.
byKey
(
painterKey
),
matchesGoldenFile
(
'material.border_paint_below.png'
),
matchesGoldenFile
(
'material.border_paint_below.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
});
});
...
...
packages/flutter/test/material/radio_test.dart
View file @
cd1d40a7
...
@@ -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.
import
'dart:io'
show
Platform
;
import
'dart:ui'
;
import
'dart:ui'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
...
@@ -277,7 +278,7 @@ void main() {
...
@@ -277,7 +278,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
painterKey
),
find
.
byKey
(
painterKey
),
matchesGoldenFile
(
'radio.ink_ripple.png'
),
matchesGoldenFile
(
'radio.ink_ripple.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
}
}
...
...
packages/flutter/test/material/tab_bar_theme_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
@@ -268,7 +270,7 @@ void main() {
...
@@ -268,7 +270,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
_painterKey
),
find
.
byKey
(
_painterKey
),
matchesGoldenFile
(
'tab_bar_theme.tab_indicator_size_tab.png'
),
matchesGoldenFile
(
'tab_bar_theme.tab_indicator_size_tab.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
@@ -280,7 +282,7 @@ void main() {
...
@@ -280,7 +282,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
_painterKey
),
find
.
byKey
(
_painterKey
),
matchesGoldenFile
(
'tab_bar_theme.tab_indicator_size_label.png'
),
matchesGoldenFile
(
'tab_bar_theme.tab_indicator_size_label.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
@@ -297,7 +299,7 @@ void main() {
...
@@ -297,7 +299,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
_painterKey
),
find
.
byKey
(
_painterKey
),
matchesGoldenFile
(
'tab_bar_theme.custom_tab_indicator.png'
),
matchesGoldenFile
(
'tab_bar_theme.custom_tab_indicator.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
@@ -314,7 +316,7 @@ void main() {
...
@@ -314,7 +316,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
_painterKey
),
find
.
byKey
(
_painterKey
),
matchesGoldenFile
(
'tab_bar_theme.beveled_rect_indicator.png'
),
matchesGoldenFile
(
'tab_bar_theme.beveled_rect_indicator.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
}
}
packages/flutter/test/material/text_field_test.dart
View file @
cd1d40a7
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:async'
;
import
'dart:io'
;
import
'dart:math'
as
math
;
import
'dart:math'
as
math
;
import
'dart:ui'
as
ui
show
window
;
import
'dart:ui'
as
ui
show
window
;
...
@@ -404,7 +405,7 @@ void main() {
...
@@ -404,7 +405,7 @@ void main() {
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
matchesGoldenFile
(
'text_field_cursor_test.0.0.png'
),
matchesGoldenFile
(
'text_field_cursor_test.0.0.png'
),
);
);
},
skip:
!
isLinux
);
},
skip:
!
Platform
.
isLinux
);
testWidgets
(
'cursor iOS golden'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'cursor iOS golden'
,
(
WidgetTester
tester
)
async
{
debugDefaultTargetPlatformOverride
=
TargetPlatform
.
iOS
;
debugDefaultTargetPlatformOverride
=
TargetPlatform
.
iOS
;
...
@@ -433,7 +434,7 @@ void main() {
...
@@ -433,7 +434,7 @@ void main() {
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
matchesGoldenFile
(
'text_field_cursor_test.1.0.png'
),
matchesGoldenFile
(
'text_field_cursor_test.1.0.png'
),
);
);
},
skip:
!
isLinux
);
},
skip:
!
Platform
.
isLinux
);
testWidgets
(
'text field selection toolbar renders correctly inside opacity'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'text field selection toolbar renders correctly inside opacity'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
@@ -483,7 +484,7 @@ void main() {
...
@@ -483,7 +484,7 @@ void main() {
// The toolbar exists in the Overlay above the MaterialApp.
// The toolbar exists in the Overlay above the MaterialApp.
find
.
byType
(
Overlay
),
find
.
byType
(
Overlay
),
matchesGoldenFile
(
'text_field_opacity_test.0.2.png'
),
matchesGoldenFile
(
'text_field_opacity_test.0.2.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
...
packages/flutter/test/painting/continous_rectangle_border_test.dart
View file @
cd1d40a7
...
@@ -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.
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/painting.dart'
;
import
'package:flutter/painting.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
@@ -72,7 +73,7 @@ void main() {
...
@@ -72,7 +73,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byType
(
RepaintBoundary
),
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'continuous_rectangle_border.golden_test_even_radii.png'
),
matchesGoldenFile
(
'continuous_rectangle_border.golden_test_even_radii.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
@@ -94,7 +95,7 @@ void main() {
...
@@ -94,7 +95,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byType
(
RepaintBoundary
),
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'continuous_rectangle_border.golden_test_varying_radii.png'
),
matchesGoldenFile
(
'continuous_rectangle_border.golden_test_varying_radii.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
@@ -113,7 +114,7 @@ void main() {
...
@@ -113,7 +114,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byType
(
RepaintBoundary
),
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'continuous_rectangle_border.golden_test_large_radii.png'
),
matchesGoldenFile
(
'continuous_rectangle_border.golden_test_large_radii.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
...
packages/flutter/test/painting/text_painter_rtl_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/painting.dart'
;
import
'package:flutter/painting.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
@@ -319,7 +321,7 @@ void main() {
...
@@ -319,7 +321,7 @@ void main() {
);
);
},
},
// Ahem-based tests don't yet quite work on Windows or some MacOS environments
// Ahem-based tests don't yet quite work on Windows or some MacOS environments
skip:
!
isLinux
);
skip:
Platform
.
isWindows
||
Platform
.
isMacOS
);
test
(
'TextPainter - line wrap mid-word'
,
()
{
test
(
'TextPainter - line wrap mid-word'
,
()
{
final
TextPainter
painter
=
TextPainter
()
final
TextPainter
painter
=
TextPainter
()
...
...
packages/flutter/test/rendering/localized_fonts_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
@@ -52,7 +54,7 @@ void main() {
...
@@ -52,7 +54,7 @@ void main() {
matchesGoldenFile
(
'localized_fonts.rich_text.styled_text_span.png'
),
matchesGoldenFile
(
'localized_fonts.rich_text.styled_text_span.png'
),
);
);
},
},
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
testWidgets
(
testWidgets
(
...
@@ -104,7 +106,7 @@ void main() {
...
@@ -104,7 +106,7 @@ void main() {
matchesGoldenFile
(
'localized_fonts.text_ambient_locale.chars.png'
),
matchesGoldenFile
(
'localized_fonts.text_ambient_locale.chars.png'
),
);
);
},
},
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
testWidgets
(
testWidgets
(
...
@@ -148,7 +150,7 @@ void main() {
...
@@ -148,7 +150,7 @@ void main() {
matchesGoldenFile
(
'localized_fonts.text_explicit_locale.chars.png'
),
matchesGoldenFile
(
'localized_fonts.text_explicit_locale.chars.png'
),
);
);
},
},
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
}
}
packages/flutter/test/rendering/paragraph_test.dart
View file @
cd1d40a7
...
@@ -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.
import
'dart:io'
;
import
'dart:ui'
as
ui
show
TextBox
;
import
'dart:ui'
as
ui
show
TextBox
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
...
@@ -70,7 +71,7 @@ void main() {
...
@@ -70,7 +71,7 @@ void main() {
expect
(
boxes
.
any
((
ui
.
TextBox
box
)
=>
box
.
right
==
100
&&
box
.
top
==
10
),
isTrue
);
expect
(
boxes
.
any
((
ui
.
TextBox
box
)
=>
box
.
right
==
100
&&
box
.
top
==
10
),
isTrue
);
},
},
// Ahem-based tests don't yet quite work on Windows or some MacOS environments
// Ahem-based tests don't yet quite work on Windows or some MacOS environments
skip:
isLinux
);
skip:
Platform
.
isWindows
||
Platform
.
isMacOS
);
test
(
'getWordBoundary control test'
,
()
{
test
(
'getWordBoundary control test'
,
()
{
final
RenderParagraph
paragraph
=
RenderParagraph
(
final
RenderParagraph
paragraph
=
RenderParagraph
(
...
@@ -192,7 +193,7 @@ void main() {
...
@@ -192,7 +193,7 @@ void main() {
layoutAt
(
3
);
layoutAt
(
3
);
expect
(
paragraph
.
size
.
height
,
30.0
);
expect
(
paragraph
.
size
.
height
,
30.0
);
},
skip:
isWindows
);
// Ahem-based tests don't yet quite work on Windows
},
skip:
Platform
.
isWindows
);
// Ahem-based tests don't yet quite work on Windows
test
(
'changing color does not do layout'
,
()
{
test
(
'changing color does not do layout'
,
()
{
final
RenderParagraph
paragraph
=
RenderParagraph
(
final
RenderParagraph
paragraph
=
RenderParagraph
(
...
...
packages/flutter/test/widgets/backdrop_filter_test.dart
View file @
cd1d40a7
...
@@ -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.
import
'dart:io'
;
import
'dart:ui'
;
import
'dart:ui'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter/widgets.dart'
;
...
@@ -43,7 +44,7 @@ void main() {
...
@@ -43,7 +44,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'backdrop_filter_test.cull_rect.1.png'
),
matchesGoldenFile
(
'backdrop_filter_test.cull_rect.1.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
}
}
packages/flutter/test/widgets/editable_text_cursor_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
@@ -92,7 +94,7 @@ void main() {
...
@@ -92,7 +94,7 @@ void main() {
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
matchesGoldenFile
(
'editable_text_test.0.3.png'
),
matchesGoldenFile
(
'editable_text_test.0.3.png'
),
);
);
},
skip:
!
isLinux
);
},
skip:
!
Platform
.
isLinux
);
testWidgets
(
'cursor layout has correct radius'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'cursor layout has correct radius'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
<
EditableTextState
>
editableTextKey
=
GlobalKey
<
EditableTextState
>();
final
GlobalKey
<
EditableTextState
>
editableTextKey
=
GlobalKey
<
EditableTextState
>();
...
@@ -143,7 +145,7 @@ void main() {
...
@@ -143,7 +145,7 @@ void main() {
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
matchesGoldenFile
(
'editable_text_test.1.3.png'
),
matchesGoldenFile
(
'editable_text_test.1.3.png'
),
);
);
},
skip:
!
isLinux
);
},
skip:
!
Platform
.
isLinux
);
testWidgets
(
'Cursor animates on iOS'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Cursor animates on iOS'
,
(
WidgetTester
tester
)
async
{
final
Widget
widget
=
MaterialApp
(
final
Widget
widget
=
MaterialApp
(
...
@@ -722,6 +724,6 @@ void main() {
...
@@ -722,6 +724,6 @@ void main() {
matchesGoldenFile
(
'editable_text_test.2.0.png'
),
matchesGoldenFile
(
'editable_text_test.2.0.png'
),
);
);
debugDefaultTargetPlatformOverride
=
null
;
debugDefaultTargetPlatformOverride
=
null
;
},
skip:
!
isLinux
);
},
skip:
!
Platform
.
isLinux
);
}
}
packages/flutter/test/widgets/invert_colors_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
@@ -21,7 +23,7 @@ void main() {
...
@@ -21,7 +23,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byType
(
RepaintBoundary
),
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'invert_colors_test.0.png'
),
matchesGoldenFile
(
'invert_colors_test.0.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
@@ -40,7 +42,7 @@ void main() {
...
@@ -40,7 +42,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byType
(
RepaintBoundary
),
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'invert_colors_test.1.png'
),
matchesGoldenFile
(
'invert_colors_test.1.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
}
}
...
...
packages/flutter/test/widgets/list_wheel_scroll_view_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
...
@@ -536,7 +538,7 @@ void main() {
...
@@ -536,7 +538,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
const
Key
(
'list_wheel_scroll_view'
)),
find
.
byKey
(
const
Key
(
'list_wheel_scroll_view'
)),
matchesGoldenFile
(
'list_wheel_scroll_view.center_child.magnified.png'
),
matchesGoldenFile
(
'list_wheel_scroll_view.center_child.magnified.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
@@ -591,7 +593,7 @@ void main() {
...
@@ -591,7 +593,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
const
Key
(
'list_wheel_scroll_view'
)),
find
.
byKey
(
const
Key
(
'list_wheel_scroll_view'
)),
matchesGoldenFile
(
'list_wheel_scroll_view.curved_wheel.left.png'
),
matchesGoldenFile
(
'list_wheel_scroll_view.curved_wheel.left.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
...
packages/flutter/test/widgets/opacity_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
...
@@ -178,7 +180,7 @@ void main() {
...
@@ -178,7 +180,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'opacity_test.offset.1.png'
),
matchesGoldenFile
(
'opacity_test.offset.1.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
...
packages/flutter/test/widgets/physical_model_test.dart
View file @
cd1d40a7
...
@@ -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.
import
'dart:io'
show
Platform
;
import
'dart:math'
as
math
show
pi
;
import
'dart:math'
as
math
show
pi
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
...
@@ -111,7 +112,7 @@ void main() {
...
@@ -111,7 +112,7 @@ void main() {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
key
),
find
.
byKey
(
key
),
matchesGoldenFile
(
'physical_model_overflow.png'
),
matchesGoldenFile
(
'physical_model_overflow.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
...
packages/flutter/test/widgets/shadow_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
show
Platform
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
...
@@ -28,11 +30,13 @@ void main() {
...
@@ -28,11 +30,13 @@ void main() {
debugDisableShadows
=
false
;
debugDisableShadows
=
false
;
tester
.
binding
.
reassembleApplication
();
tester
.
binding
.
reassembleApplication
();
await
tester
.
pump
();
await
tester
.
pump
();
if
(
Platform
.
isLinux
)
{
// TODO(ianh): use the skip argument instead once that doesn't hang, https://github.com/dart-lang/test/issues/830
await
expectLater
(
await
expectLater
(
find
.
byType
(
Container
),
find
.
byType
(
Container
),
matchesGoldenFile
(
'shadow.BoxDecoration.enabled.png'
),
matchesGoldenFile
(
'shadow.BoxDecoration.enabled.png'
),
skip:
!
isLinux
);
// shadows render differently on different platforms
);
// shadows render differently on different platforms
}
debugDisableShadows
=
true
;
debugDisableShadows
=
true
;
});
});
...
@@ -61,7 +65,7 @@ void main() {
...
@@ -61,7 +65,7 @@ void main() {
);
);
}
}
debugDisableShadows
=
true
;
debugDisableShadows
=
true
;
},
skip:
!
isLinux
);
// shadows render differently on different platforms
},
skip:
!
Platform
.
isLinux
);
// shadows render differently on different platforms
testWidgets
(
'Shadows with PhysicalLayer'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Shadows with PhysicalLayer'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
@@ -89,11 +93,13 @@ void main() {
...
@@ -89,11 +93,13 @@ void main() {
debugDisableShadows
=
false
;
debugDisableShadows
=
false
;
tester
.
binding
.
reassembleApplication
();
tester
.
binding
.
reassembleApplication
();
await
tester
.
pump
();
await
tester
.
pump
();
if
(
Platform
.
isLinux
)
{
// TODO(ianh): use the skip argument instead once that doesn't hang, https://github.com/dart-lang/test/issues/830
await
expectLater
(
await
expectLater
(
find
.
byType
(
Container
),
find
.
byType
(
Container
),
matchesGoldenFile
(
'shadow.PhysicalModel.enabled.png'
),
matchesGoldenFile
(
'shadow.PhysicalModel.enabled.png'
),
skip:
!
isLinux
,
);
// shadows render differently on different platforms
);
// shadows render differently on different platforms
}
debugDisableShadows
=
true
;
debugDisableShadows
=
true
;
});
});
...
@@ -126,5 +132,5 @@ void main() {
...
@@ -126,5 +132,5 @@ void main() {
);
);
}
}
debugDisableShadows
=
true
;
debugDisableShadows
=
true
;
},
skip:
!
isLinux
);
// shadows render differently on different platforms
},
skip:
!
Platform
.
isLinux
);
// shadows render differently on different platforms
}
}
packages/flutter/test/widgets/text_golden_test.dart
View file @
cd1d40a7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// 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.
import
'dart:io'
show
Platform
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter/widgets.dart'
;
...
@@ -55,7 +57,7 @@ void main() {
...
@@ -55,7 +57,7 @@ void main() {
find
.
byType
(
Container
),
find
.
byType
(
Container
),
matchesGoldenFile
(
'text_golden.Centered.wrap.png'
),
matchesGoldenFile
(
'text_golden.Centered.wrap.png'
),
);
);
},
skip:
!
isLinux
);
},
skip:
!
Platform
.
isLinux
);
testWidgets
(
'Text Foreground'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Text Foreground'
,
(
WidgetTester
tester
)
async
{
...
@@ -131,7 +133,7 @@ void main() {
...
@@ -131,7 +133,7 @@ void main() {
find
.
byType
(
RepaintBoundary
),
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'text_golden.Foreground.stroke_and_gradient.png'
),
matchesGoldenFile
(
'text_golden.Foreground.stroke_and_gradient.png'
),
);
);
},
skip:
!
isLinux
);
},
skip:
!
Platform
.
isLinux
);
// TODO(garyq): This test requires an update when the background
// TODO(garyq): This test requires an update when the background
// drawing from the beginning of the line bug is fixed. The current
// drawing from the beginning of the line bug is fixed. The current
...
@@ -181,7 +183,7 @@ void main() {
...
@@ -181,7 +183,7 @@ void main() {
find
.
byType
(
RepaintBoundary
),
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'text_golden.Background.png'
),
matchesGoldenFile
(
'text_golden.Background.png'
),
);
);
},
skip:
!
isLinux
);
},
skip:
!
Platform
.
isLinux
);
testWidgets
(
'Text Fade'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Text Fade'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
@@ -217,7 +219,7 @@ void main() {
...
@@ -217,7 +219,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'text_golden.Fade.1.png'
),
matchesGoldenFile
(
'text_golden.Fade.1.png'
),
);
);
},
skip:
!
isLinux
);
},
skip:
!
Platform
.
isLinux
);
testWidgets
(
'Default Strut text'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Default Strut text'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
@@ -478,7 +480,7 @@ void main() {
...
@@ -478,7 +480,7 @@ void main() {
find
.
byType
(
Container
),
find
.
byType
(
Container
),
matchesGoldenFile
(
'text_golden.Decoration.1.0.png'
),
matchesGoldenFile
(
'text_golden.Decoration.1.0.png'
),
);
);
},
skip:
!
isLinux
);
// Coretext uses different thicknesses for decoration
},
skip:
!
Platform
.
isLinux
);
// Coretext uses different thicknesses for decoration
testWidgets
(
'Decoration thickness'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Decoration thickness'
,
(
WidgetTester
tester
)
async
{
final
TextDecoration
allDecorations
=
TextDecoration
.
combine
(
final
TextDecoration
allDecorations
=
TextDecoration
.
combine
(
...
@@ -517,5 +519,5 @@ void main() {
...
@@ -517,5 +519,5 @@ void main() {
find
.
byType
(
Container
),
find
.
byType
(
Container
),
matchesGoldenFile
(
'text_golden.DecorationThickness.1.0.png'
),
matchesGoldenFile
(
'text_golden.DecorationThickness.1.0.png'
),
);
);
},
skip:
!
isLinux
);
// Coretext uses different thicknesses for decoration
},
skip:
!
Platform
.
isLinux
);
// Coretext uses different thicknesses for decoration
}
}
packages/flutter/test/widgets/widget_inspector_test.dart
View file @
cd1d40a7
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
import
'dart:async'
;
import
'dart:async'
;
import
'dart:convert'
;
import
'dart:convert'
;
import
'dart:io'
show
Platform
;
import
'dart:math'
;
import
'dart:math'
;
import
'dart:ui'
as
ui
;
import
'dart:ui'
as
ui
;
...
@@ -1582,7 +1583,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -1582,7 +1583,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
_CreationLocation
location
=
knownLocations
[
id
];
_CreationLocation
location
=
knownLocations
[
id
];
expect
(
location
.
file
,
equals
(
file
));
expect
(
location
.
file
,
equals
(
file
));
// ClockText widget.
// ClockText widget.
expect
(
location
.
line
,
equals
(
5
0
));
expect
(
location
.
line
,
equals
(
5
1
));
expect
(
location
.
column
,
equals
(
9
));
expect
(
location
.
column
,
equals
(
9
));
expect
(
count
,
equals
(
1
));
expect
(
count
,
equals
(
1
));
...
@@ -1591,7 +1592,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -1591,7 +1592,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
location
=
knownLocations
[
id
];
location
=
knownLocations
[
id
];
expect
(
location
.
file
,
equals
(
file
));
expect
(
location
.
file
,
equals
(
file
));
// Text widget in _ClockTextState build method.
// Text widget in _ClockTextState build method.
expect
(
location
.
line
,
equals
(
8
8
));
expect
(
location
.
line
,
equals
(
8
9
));
expect
(
location
.
column
,
equals
(
12
));
expect
(
location
.
column
,
equals
(
12
));
expect
(
count
,
equals
(
1
));
expect
(
count
,
equals
(
1
));
...
@@ -1616,7 +1617,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -1616,7 +1617,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
location
=
knownLocations
[
id
];
location
=
knownLocations
[
id
];
expect
(
location
.
file
,
equals
(
file
));
expect
(
location
.
file
,
equals
(
file
));
// ClockText widget.
// ClockText widget.
expect
(
location
.
line
,
equals
(
5
0
));
expect
(
location
.
line
,
equals
(
5
1
));
expect
(
location
.
column
,
equals
(
9
));
expect
(
location
.
column
,
equals
(
9
));
expect
(
count
,
equals
(
3
));
// 3 clock widget instances rebuilt.
expect
(
count
,
equals
(
3
));
// 3 clock widget instances rebuilt.
...
@@ -1625,7 +1626,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -1625,7 +1626,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
location
=
knownLocations
[
id
];
location
=
knownLocations
[
id
];
expect
(
location
.
file
,
equals
(
file
));
expect
(
location
.
file
,
equals
(
file
));
// Text widget in _ClockTextState build method.
// Text widget in _ClockTextState build method.
expect
(
location
.
line
,
equals
(
8
8
));
expect
(
location
.
line
,
equals
(
8
9
));
expect
(
location
.
column
,
equals
(
12
));
expect
(
location
.
column
,
equals
(
12
));
expect
(
count
,
equals
(
3
));
// 3 clock widget instances rebuilt.
expect
(
count
,
equals
(
3
));
// 3 clock widget instances rebuilt.
...
@@ -1896,7 +1897,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -1896,7 +1897,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
await
expectLater
(
await
expectLater
(
layer
.
toImage
(
renderObject
.
semanticBounds
.
inflate
(
50.0
)),
layer
.
toImage
(
renderObject
.
semanticBounds
.
inflate
(
50.0
)),
matchesGoldenFile
(
'inspector.repaint_boundary_margin.png'
),
matchesGoldenFile
(
'inspector.repaint_boundary_margin.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
// Regression test for how rendering with a pixel scale other than 1.0
// Regression test for how rendering with a pixel scale other than 1.0
...
@@ -1907,7 +1908,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -1907,7 +1908,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
pixelRatio:
0.5
,
pixelRatio:
0.5
,
),
),
matchesGoldenFile
(
'inspector.repaint_boundary_margin_small.png'
),
matchesGoldenFile
(
'inspector.repaint_boundary_margin_small.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
await
expectLater
(
await
expectLater
(
...
@@ -1916,7 +1917,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -1916,7 +1917,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
pixelRatio:
2.0
,
pixelRatio:
2.0
,
),
),
matchesGoldenFile
(
'inspector.repaint_boundary_margin_large.png'
),
matchesGoldenFile
(
'inspector.repaint_boundary_margin_large.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
final
Layer
layerParent
=
layer
.
parent
;
final
Layer
layerParent
=
layer
.
parent
;
...
@@ -1932,7 +1933,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -1932,7 +1933,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height:
300.0
,
height:
300.0
,
),
),
matchesGoldenFile
(
'inspector.repaint_boundary.png'
),
matchesGoldenFile
(
'inspector.repaint_boundary.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
// Verify that taking a screenshot didn't change the layers associated with
// Verify that taking a screenshot didn't change the layers associated with
...
@@ -1950,7 +1951,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -1950,7 +1951,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
margin:
50.0
,
margin:
50.0
,
),
),
matchesGoldenFile
(
'inspector.repaint_boundary_margin.png'
),
matchesGoldenFile
(
'inspector.repaint_boundary_margin.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
// Verify that taking a screenshot didn't change the layers associated with
// Verify that taking a screenshot didn't change the layers associated with
...
@@ -1971,7 +1972,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -1971,7 +1972,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
debugPaint:
true
,
debugPaint:
true
,
),
),
matchesGoldenFile
(
'inspector.repaint_boundary_debugPaint.png'
),
matchesGoldenFile
(
'inspector.repaint_boundary_debugPaint.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
// Verify that taking a screenshot with debug paint on did not change
// Verify that taking a screenshot with debug paint on did not change
// the number of children the layer has.
// the number of children the layer has.
...
@@ -1982,7 +1983,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -1982,7 +1983,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
await
expectLater
(
await
expectLater
(
find
.
byType
(
RepaintBoundaryWithDebugPaint
),
find
.
byType
(
RepaintBoundaryWithDebugPaint
),
matchesGoldenFile
(
'inspector.repaint_boundary.png'
),
matchesGoldenFile
(
'inspector.repaint_boundary.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
expect
(
renderObject
.
debugLayer
,
equals
(
layer
));
expect
(
renderObject
.
debugLayer
,
equals
(
layer
));
...
@@ -1996,7 +1997,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -1996,7 +1997,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height:
100.0
,
height:
100.0
,
),
),
matchesGoldenFile
(
'inspector.container.png'
),
matchesGoldenFile
(
'inspector.container.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
await
expectLater
(
await
expectLater
(
...
@@ -2007,7 +2008,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2007,7 +2008,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
debugPaint:
true
,
debugPaint:
true
,
),
),
matchesGoldenFile
(
'inspector.container_debugPaint.png'
),
matchesGoldenFile
(
'inspector.container_debugPaint.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
{
{
...
@@ -2028,7 +2029,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2028,7 +2029,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
debugPaint:
true
,
debugPaint:
true
,
),
),
matchesGoldenFile
(
'inspector.container_debugPaint.png'
),
matchesGoldenFile
(
'inspector.container_debugPaint.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
expect
(
container
.
debugNeedsLayout
,
isFalse
);
expect
(
container
.
debugNeedsLayout
,
isFalse
);
}
}
...
@@ -2041,7 +2042,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2041,7 +2042,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height:
100.0
,
height:
100.0
,
),
),
matchesGoldenFile
(
'inspector.container_small.png'
),
matchesGoldenFile
(
'inspector.container_small.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
await
expectLater
(
await
expectLater
(
...
@@ -2052,7 +2053,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2052,7 +2053,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
maxPixelRatio:
3.0
,
maxPixelRatio:
3.0
,
),
),
matchesGoldenFile
(
'inspector.container_large.png'
),
matchesGoldenFile
(
'inspector.container_large.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
// This screenshot will show the clip rect debug paint but no other
// This screenshot will show the clip rect debug paint but no other
...
@@ -2065,7 +2066,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2065,7 +2066,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
debugPaint:
true
,
debugPaint:
true
,
),
),
matchesGoldenFile
(
'inspector.clipRect_debugPaint.png'
),
matchesGoldenFile
(
'inspector.clipRect_debugPaint.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
final
Element
clipRect
=
find
.
byType
(
ClipRRect
).
evaluate
().
single
;
final
Element
clipRect
=
find
.
byType
(
ClipRRect
).
evaluate
().
single
;
...
@@ -2082,7 +2083,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2082,7 +2083,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
await
expectLater
(
await
expectLater
(
clipRectScreenshot
,
clipRectScreenshot
,
matchesGoldenFile
(
'inspector.clipRect_debugPaint_margin.png'
),
matchesGoldenFile
(
'inspector.clipRect_debugPaint_margin.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
// Verify we get the same image if we go through the service extension
// Verify we get the same image if we go through the service extension
...
@@ -2110,7 +2111,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2110,7 +2111,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
await
expectLater
(
await
expectLater
(
screenshotImage
,
screenshotImage
,
matchesReferenceImage
(
await
clipRectScreenshot
),
matchesReferenceImage
(
await
clipRectScreenshot
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
// Test with a very visible debug paint
// Test with a very visible debug paint
...
@@ -2122,7 +2123,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2122,7 +2123,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
debugPaint:
true
,
debugPaint:
true
,
),
),
matchesGoldenFile
(
'inspector.padding_debugPaint.png'
),
matchesGoldenFile
(
'inspector.padding_debugPaint.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
// The bounds for this box crop its rendered content.
// The bounds for this box crop its rendered content.
...
@@ -2134,7 +2135,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2134,7 +2135,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
debugPaint:
true
,
debugPaint:
true
,
),
),
matchesGoldenFile
(
'inspector.sizedBox_debugPaint.1.png'
),
matchesGoldenFile
(
'inspector.sizedBox_debugPaint.1.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
// Verify that setting a margin includes the previously cropped content.
// Verify that setting a margin includes the previously cropped content.
...
@@ -2147,7 +2148,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2147,7 +2148,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
debugPaint:
true
,
debugPaint:
true
,
),
),
matchesGoldenFile
(
'inspector.sizedBox_debugPaint_margin.png'
),
matchesGoldenFile
(
'inspector.sizedBox_debugPaint_margin.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
@@ -2219,7 +2220,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2219,7 +2220,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
mainStackKey
),
find
.
byKey
(
mainStackKey
),
matchesGoldenFile
(
'inspector.composited_transform.only_offsets.png'
),
matchesGoldenFile
(
'inspector.composited_transform.only_offsets.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
await
expectLater
(
await
expectLater
(
...
@@ -2229,13 +2230,13 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2229,13 +2230,13 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height:
500.0
,
height:
500.0
,
),
),
matchesGoldenFile
(
'inspector.composited_transform.only_offsets_follower.png'
),
matchesGoldenFile
(
'inspector.composited_transform.only_offsets_follower.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
await
expectLater
(
await
expectLater
(
WidgetInspectorService
.
instance
.
screenshot
(
find
.
byType
(
Stack
).
evaluate
().
first
,
width:
300.0
,
height:
300.0
),
WidgetInspectorService
.
instance
.
screenshot
(
find
.
byType
(
Stack
).
evaluate
().
first
,
width:
300.0
,
height:
300.0
),
matchesGoldenFile
(
'inspector.composited_transform.only_offsets_small.1.png'
),
matchesGoldenFile
(
'inspector.composited_transform.only_offsets_small.1.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
await
expectLater
(
await
expectLater
(
...
@@ -2245,7 +2246,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2245,7 +2246,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height:
500.0
,
height:
500.0
,
),
),
matchesGoldenFile
(
'inspector.composited_transform.only_offsets_target.png'
),
matchesGoldenFile
(
'inspector.composited_transform.only_offsets_target.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
});
});
...
@@ -2318,7 +2319,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2318,7 +2319,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
await
expectLater
(
await
expectLater
(
find
.
byKey
(
mainStackKey
),
find
.
byKey
(
mainStackKey
),
matchesGoldenFile
(
'inspector.composited_transform.with_rotations.png'
),
matchesGoldenFile
(
'inspector.composited_transform.with_rotations.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
await
expectLater
(
await
expectLater
(
...
@@ -2328,7 +2329,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2328,7 +2329,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height:
500.0
,
height:
500.0
,
),
),
matchesGoldenFile
(
'inspector.composited_transform.with_rotations_small.png'
),
matchesGoldenFile
(
'inspector.composited_transform.with_rotations_small.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
await
expectLater
(
await
expectLater
(
...
@@ -2338,7 +2339,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2338,7 +2339,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height:
500.0
,
height:
500.0
,
),
),
matchesGoldenFile
(
'inspector.composited_transform.with_rotations_target.png'
),
matchesGoldenFile
(
'inspector.composited_transform.with_rotations_target.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
await
expectLater
(
await
expectLater
(
...
@@ -2348,7 +2349,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
...
@@ -2348,7 +2349,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height:
500.0
,
height:
500.0
,
),
),
matchesGoldenFile
(
'inspector.composited_transform.with_rotations_follower.png'
),
matchesGoldenFile
(
'inspector.composited_transform.with_rotations_follower.png'
),
skip:
!
isLinux
,
skip:
!
Platform
.
isLinux
,
);
);
// Make sure taking screenshots hasn't modified the positions of the
// Make sure taking screenshots hasn't modified the positions of the
...
...
packages/flutter_test/lib/flutter_test.dart
View file @
cd1d40a7
...
@@ -54,7 +54,6 @@ export 'src/finders.dart';
...
@@ -54,7 +54,6 @@ export 'src/finders.dart';
export
'src/goldens.dart'
;
export
'src/goldens.dart'
;
export
'src/matchers.dart'
;
export
'src/matchers.dart'
;
export
'src/nonconst.dart'
;
export
'src/nonconst.dart'
;
export
'src/platform.dart'
;
export
'src/stack_manipulation.dart'
;
export
'src/stack_manipulation.dart'
;
export
'src/test_async_utils.dart'
;
export
'src/test_async_utils.dart'
;
export
'src/test_compat.dart'
;
export
'src/test_compat.dart'
;
...
...
packages/flutter_test/lib/src/platform.dart
deleted
100644 → 0
View file @
d92b3b40
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
// Whether the current dart code is running in an environment that was compiled
// to JavaScript.
const
bool
_kIsCompiledToJavaScript
=
identical
(
0
,
0.0
);
/// Whether the test is running on the Windows operating system.
///
/// This does not include test compiled to JavaScript running in a browser on
/// the Windows operating system.
bool
get
isWindows
{
if
(
_kIsCompiledToJavaScript
)
{
return
false
;
}
return
Platform
.
isWindows
;
}
/// Whether the test is running on the macOS operating system.
///
/// This does not include test compiled to JavaScript running in a browser on
/// the macOS operating system.
bool
get
isMacOS
{
if
(
_kIsCompiledToJavaScript
)
{
return
false
;
}
return
Platform
.
isMacOS
;
}
/// Whether the test is running on the Linux operating system.
///
/// This does not include test compiled to JavaScript running in a browser on
/// the Linux operating system.
bool
get
isLinux
{
if
(
_kIsCompiledToJavaScript
)
{
return
false
;
}
return
Platform
.
isLinux
;
}
/// Whether the test is running in a web browser compiled to JavaScript.
bool
get
isBrowser
{
return
_kIsCompiledToJavaScript
;
}
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