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
d92b3b40
Unverified
Commit
d92b3b40
authored
Jun 03, 2019
by
Jonah Williams
Committed by
GitHub
Jun 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add web safe indirection to Platform.isPlatform getters (#33406)
parent
c4f5f42a
Changes
32
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
145 additions
and
147 deletions
+145
-147
tween_test.dart
packages/flutter/test/animation/tween_test.dart
+1
-3
date_picker_test.dart
packages/flutter/test/cupertino/date_picker_test.dart
+2
-3
nav_bar_test.dart
packages/flutter/test/cupertino/nav_bar_test.dart
+2
-4
segmented_control_test.dart
packages/flutter/test/cupertino/segmented_control_test.dart
+2
-4
text_field_test.dart
packages/flutter/test/cupertino/text_field_test.dart
+2
-3
bottom_app_bar_theme_test.dart
...ages/flutter/test/material/bottom_app_bar_theme_test.dart
+1
-3
bottom_navigation_bar_test.dart
...ges/flutter/test/material/bottom_navigation_bar_test.dart
+1
-2
card_theme_test.dart
packages/flutter/test/material/card_theme_test.dart
+1
-3
date_picker_test.dart
packages/flutter/test/material/date_picker_test.dart
+1
-2
dialog_theme_test.dart
packages/flutter/test/material/dialog_theme_test.dart
+1
-3
dropdown_test.dart
packages/flutter/test/material/dropdown_test.dart
+2
-3
floating_action_button_test.dart
...es/flutter/test/material/floating_action_button_test.dart
+1
-2
input_decorator_test.dart
packages/flutter/test/material/input_decorator_test.dart
+3
-4
material_test.dart
packages/flutter/test/material/material_test.dart
+2
-4
radio_test.dart
packages/flutter/test/material/radio_test.dart
+1
-2
tab_bar_theme_test.dart
packages/flutter/test/material/tab_bar_theme_test.dart
+4
-6
text_field_test.dart
packages/flutter/test/material/text_field_test.dart
+3
-4
continous_rectangle_border_test.dart
...lutter/test/painting/continous_rectangle_border_test.dart
+3
-4
text_painter_rtl_test.dart
packages/flutter/test/painting/text_painter_rtl_test.dart
+1
-3
localized_fonts_test.dart
packages/flutter/test/rendering/localized_fonts_test.dart
+3
-5
paragraph_test.dart
packages/flutter/test/rendering/paragraph_test.dart
+2
-3
backdrop_filter_test.dart
packages/flutter/test/widgets/backdrop_filter_test.dart
+1
-2
editable_text_cursor_test.dart
packages/flutter/test/widgets/editable_text_cursor_test.dart
+3
-5
invert_colors_test.dart
packages/flutter/test/widgets/invert_colors_test.dart
+2
-4
list_wheel_scroll_view_test.dart
...ges/flutter/test/widgets/list_wheel_scroll_view_test.dart
+2
-4
opacity_test.dart
packages/flutter/test/widgets/opacity_test.dart
+1
-3
physical_model_test.dart
packages/flutter/test/widgets/physical_model_test.dart
+1
-2
shadow_test.dart
packages/flutter/test/widgets/shadow_test.dart
+12
-18
text_golden_test.dart
packages/flutter/test/widgets/text_golden_test.dart
+6
-8
widget_inspector_test.dart
packages/flutter/test/widgets/widget_inspector_test.dart
+30
-31
flutter_test.dart
packages/flutter_test/lib/flutter_test.dart
+1
-0
platform.dart
packages/flutter_test/lib/src/platform.dart
+47
-0
No files found.
packages/flutter/test/animation/tween_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter/animation.dart'
;
import
'package:flutter/widgets.dart'
;
...
...
@@ -85,7 +83,7 @@ void main() {
),
moreOrLessEquals
(
0.0
),
);
},
skip:
Platform
.
isWindows
);
// floating point math not quite deterministic on Windows?
},
skip:
isWindows
);
// floating point math not quite deterministic on Windows?
test
(
'ConstantTween'
,
()
{
final
ConstantTween
<
double
>
tween
=
ConstantTween
<
double
>(
100.0
);
...
...
packages/flutter/test/cupertino/date_picker_test.dart
View file @
d92b3b40
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
show
Platform
;
import
'dart:ui'
;
import
'package:flutter/cupertino.dart'
;
...
...
@@ -845,7 +844,7 @@ void main() {
await
expectLater
(
find
.
byType
(
CupertinoDatePicker
),
matchesGoldenFile
(
'date_picker_test.datetime.initial.1.png'
),
skip:
!
Platform
.
isLinux
skip:
!
isLinux
);
// Slightly drag the hour component to make the current hour off-center.
...
...
@@ -855,7 +854,7 @@ void main() {
await
expectLater
(
find
.
byType
(
CupertinoDatePicker
),
matchesGoldenFile
(
'date_picker_test.datetime.drag.1.png'
),
skip:
!
Platform
.
isLinux
skip:
!
isLinux
);
});
});
...
...
packages/flutter/test/cupertino/nav_bar_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/services.dart'
;
...
...
@@ -806,7 +804,7 @@ void main() {
},
// TODO(xster): remove once https://github.com/flutter/flutter/issues/17483
// is fixed.
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
testWidgets
(
...
...
@@ -840,7 +838,7 @@ void main() {
},
// TODO(xster): remove once https://github.com/flutter/flutter/issues/17483
// is fixed.
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
...
...
packages/flutter/test/cupertino/segmented_control_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
...
@@ -1329,7 +1327,7 @@ void main() {
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'segmented_control_test.0.0.png'
),
);
},
skip:
!
Platform
.
isLinux
);
},
skip:
!
isLinux
);
testWidgets
(
'Golden Test Pressed State'
,
(
WidgetTester
tester
)
async
{
final
Map
<
int
,
Widget
>
children
=
<
int
,
Widget
>{};
...
...
@@ -1367,5 +1365,5 @@ void main() {
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'segmented_control_test.1.0.png'
),
);
},
skip:
!
Platform
.
isLinux
);
},
skip:
!
isLinux
);
}
packages/flutter/test/cupertino/text_field_test.dart
View file @
d92b3b40
...
...
@@ -3,7 +3,6 @@
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:io'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/rendering.dart'
;
...
...
@@ -376,7 +375,7 @@ void main() {
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
matchesGoldenFile
(
'text_field_cursor_test.0.2.png'
),
);
},
skip:
!
Platform
.
isLinux
);
},
skip:
!
isLinux
);
testWidgets
(
'cursor iOS golden'
,
(
WidgetTester
tester
)
async
{
debugDefaultTargetPlatformOverride
=
TargetPlatform
.
iOS
;
...
...
@@ -406,7 +405,7 @@ void main() {
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
matchesGoldenFile
(
'text_field_cursor_test.1.2.png'
),
);
},
skip:
!
Platform
.
isLinux
);
},
skip:
!
isLinux
);
testWidgets
(
'can control text content via controller'
,
...
...
packages/flutter/test/material/bottom_app_bar_theme_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
...
@@ -83,7 +81,7 @@ void main() {
await
expectLater
(
find
.
byKey
(
_painterKey
),
matchesGoldenFile
(
'bottom_app_bar_theme.custom_shape.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
packages/flutter/test/material/bottom_navigation_bar_test.dart
View file @
d92b3b40
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
import
'dart:ui'
;
import
'package:flutter/material.dart'
;
...
...
@@ -1436,7 +1435,7 @@ void main() {
await
expectLater
(
find
.
byType
(
BottomNavigationBar
),
matchesGoldenFile
(
'bottom_navigation_bar.shifting_transition.2.
$pump
.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
}
});
...
...
packages/flutter/test/material/card_theme_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
...
@@ -140,7 +138,7 @@ void main() {
await
expectLater
(
find
.
byKey
(
painterKey
),
matchesGoldenFile
(
'card_theme.custom_shape.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
}
...
...
packages/flutter/test/material/date_picker_test.dart
View file @
d92b3b40
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
import
'dart:ui'
;
import
'package:flutter/rendering.dart'
;
...
...
@@ -20,7 +19,7 @@ void main() {
},
// Skip on Windows because this test is quite flaky when run on Windows,
// until https://github.com/flutter/flutter/issues/19696 is fixed.
skip:
Platform
.
isWindows
,
skip:
isWindows
,
);
}
...
...
packages/flutter/test/material/dialog_theme_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
...
@@ -133,7 +131,7 @@ void main() {
await
expectLater
(
find
.
byKey
(
_painterKey
),
matchesGoldenFile
(
'dialog_theme.dialog_with_custom_border.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
packages/flutter/test/material/dropdown_test.dart
View file @
d92b3b40
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
import
'dart:math'
as
math
;
import
'dart:ui'
show
window
;
...
...
@@ -142,7 +141,7 @@ void main() {
await
expectLater
(
find
.
ancestor
(
of:
buttonFinder
,
matching:
find
.
byType
(
RepaintBoundary
)).
first
,
matchesGoldenFile
(
'dropdown_test.default.0.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
@@ -155,7 +154,7 @@ void main() {
await
expectLater
(
find
.
ancestor
(
of:
buttonFinder
,
matching:
find
.
byType
(
RepaintBoundary
)).
first
,
matchesGoldenFile
(
'dropdown_test.expanded.0.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
packages/flutter/test/material/floating_action_button_test.dart
View file @
d92b3b40
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
import
'dart:ui'
;
import
'package:flutter/material.dart'
;
...
...
@@ -737,7 +736,7 @@ void main() {
await
expectLater
(
find
.
byKey
(
key
),
matchesGoldenFile
(
'floating_action_button_test.clip.2.png'
),
// .clip.1.png is obsolete and can be removed
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
packages/flutter/test/material/input_decorator_test.dart
View file @
d92b3b40
...
...
@@ -3,7 +3,6 @@
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
...
...
@@ -2031,17 +2030,17 @@ void main() {
await
expectLater
(
find
.
byType
(
InputDecorator
),
matchesGoldenFile
(
'input_decorator.outline_icon_label.ltr.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
await
tester
.
pumpWidget
(
buildFrame
(
TextDirection
.
rtl
));
await
expectLater
(
find
.
byType
(
InputDecorator
),
matchesGoldenFile
(
'input_decorator.outline_icon_label.rtl.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
},
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
testWidgets
(
'InputDecorator draws and animates hoverColor'
,
(
WidgetTester
tester
)
async
{
...
...
packages/flutter/test/material/material_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter/painting.dart'
;
import
'package:flutter/rendering.dart'
;
...
...
@@ -619,7 +617,7 @@ void main() {
await
expectLater
(
find
.
byKey
(
painterKey
),
matchesGoldenFile
(
'material.border_paint_above.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
@@ -660,7 +658,7 @@ void main() {
await
expectLater
(
find
.
byKey
(
painterKey
),
matchesGoldenFile
(
'material.border_paint_below.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
});
...
...
packages/flutter/test/material/radio_test.dart
View file @
d92b3b40
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
show
Platform
;
import
'dart:ui'
;
import
'package:flutter/rendering.dart'
;
...
...
@@ -278,7 +277,7 @@ void main() {
await
expectLater
(
find
.
byKey
(
painterKey
),
matchesGoldenFile
(
'radio.ink_ripple.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
}
...
...
packages/flutter/test/material/tab_bar_theme_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
...
@@ -270,7 +268,7 @@ void main() {
await
expectLater
(
find
.
byKey
(
_painterKey
),
matchesGoldenFile
(
'tab_bar_theme.tab_indicator_size_tab.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
@@ -282,7 +280,7 @@ void main() {
await
expectLater
(
find
.
byKey
(
_painterKey
),
matchesGoldenFile
(
'tab_bar_theme.tab_indicator_size_label.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
@@ -299,7 +297,7 @@ void main() {
await
expectLater
(
find
.
byKey
(
_painterKey
),
matchesGoldenFile
(
'tab_bar_theme.custom_tab_indicator.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
@@ -316,7 +314,7 @@ void main() {
await
expectLater
(
find
.
byKey
(
_painterKey
),
matchesGoldenFile
(
'tab_bar_theme.beveled_rect_indicator.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
}
packages/flutter/test/material/text_field_test.dart
View file @
d92b3b40
...
...
@@ -3,7 +3,6 @@
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:io'
;
import
'dart:math'
as
math
;
import
'dart:ui'
as
ui
show
window
;
...
...
@@ -405,7 +404,7 @@ void main() {
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
matchesGoldenFile
(
'text_field_cursor_test.0.0.png'
),
);
},
skip:
!
Platform
.
isLinux
);
},
skip:
!
isLinux
);
testWidgets
(
'cursor iOS golden'
,
(
WidgetTester
tester
)
async
{
debugDefaultTargetPlatformOverride
=
TargetPlatform
.
iOS
;
...
...
@@ -434,7 +433,7 @@ void main() {
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
matchesGoldenFile
(
'text_field_cursor_test.1.0.png'
),
);
},
skip:
!
Platform
.
isLinux
);
},
skip:
!
isLinux
);
testWidgets
(
'text field selection toolbar renders correctly inside opacity'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -484,7 +483,7 @@ void main() {
// The toolbar exists in the Overlay above the MaterialApp.
find
.
byType
(
Overlay
),
matchesGoldenFile
(
'text_field_opacity_test.0.2.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
packages/flutter/test/painting/continous_rectangle_border_test.dart
View file @
d92b3b40
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter/painting.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
...
@@ -73,7 +72,7 @@ void main() {
await
expectLater
(
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'continuous_rectangle_border.golden_test_even_radii.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
@@ -95,7 +94,7 @@ void main() {
await
expectLater
(
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'continuous_rectangle_border.golden_test_varying_radii.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
@@ -114,7 +113,7 @@ void main() {
await
expectLater
(
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'continuous_rectangle_border.golden_test_large_radii.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
packages/flutter/test/painting/text_painter_rtl_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/painting.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
...
@@ -321,7 +319,7 @@ void main() {
);
},
// Ahem-based tests don't yet quite work on Windows or some MacOS environments
skip:
Platform
.
isWindows
||
Platform
.
isMacOS
);
skip:
!
isLinux
);
test
(
'TextPainter - line wrap mid-word'
,
()
{
final
TextPainter
painter
=
TextPainter
()
...
...
packages/flutter/test/rendering/localized_fonts_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
show
Platform
;
import
'package:flutter/material.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
...
@@ -54,7 +52,7 @@ void main() {
matchesGoldenFile
(
'localized_fonts.rich_text.styled_text_span.png'
),
);
},
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
testWidgets
(
...
...
@@ -106,7 +104,7 @@ void main() {
matchesGoldenFile
(
'localized_fonts.text_ambient_locale.chars.png'
),
);
},
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
testWidgets
(
...
...
@@ -150,7 +148,7 @@ void main() {
matchesGoldenFile
(
'localized_fonts.text_explicit_locale.chars.png'
),
);
},
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
}
packages/flutter/test/rendering/paragraph_test.dart
View file @
d92b3b40
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
import
'dart:ui'
as
ui
show
TextBox
;
import
'package:flutter/rendering.dart'
;
...
...
@@ -71,7 +70,7 @@ void main() {
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
skip:
Platform
.
isWindows
||
Platform
.
isMacOS
);
skip:
isLinux
);
test
(
'getWordBoundary control test'
,
()
{
final
RenderParagraph
paragraph
=
RenderParagraph
(
...
...
@@ -193,7 +192,7 @@ void main() {
layoutAt
(
3
);
expect
(
paragraph
.
size
.
height
,
30.0
);
},
skip:
Platform
.
isWindows
);
// Ahem-based tests don't yet quite work on Windows
},
skip:
isWindows
);
// Ahem-based tests don't yet quite work on Windows
test
(
'changing color does not do layout'
,
()
{
final
RenderParagraph
paragraph
=
RenderParagraph
(
...
...
packages/flutter/test/widgets/backdrop_filter_test.dart
View file @
d92b3b40
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
import
'dart:ui'
;
import
'package:flutter/widgets.dart'
;
...
...
@@ -44,7 +43,7 @@ void main() {
await
expectLater
(
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'backdrop_filter_test.cull_rect.1.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
}
packages/flutter/test/widgets/editable_text_cursor_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
...
@@ -94,7 +92,7 @@ void main() {
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
matchesGoldenFile
(
'editable_text_test.0.3.png'
),
);
},
skip:
!
Platform
.
isLinux
);
},
skip:
!
isLinux
);
testWidgets
(
'cursor layout has correct radius'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
<
EditableTextState
>
editableTextKey
=
GlobalKey
<
EditableTextState
>();
...
...
@@ -145,7 +143,7 @@ void main() {
find
.
byKey
(
const
ValueKey
<
int
>(
1
)),
matchesGoldenFile
(
'editable_text_test.1.3.png'
),
);
},
skip:
!
Platform
.
isLinux
);
},
skip:
!
isLinux
);
testWidgets
(
'Cursor animates on iOS'
,
(
WidgetTester
tester
)
async
{
final
Widget
widget
=
MaterialApp
(
...
...
@@ -724,6 +722,6 @@ void main() {
matchesGoldenFile
(
'editable_text_test.2.0.png'
),
);
debugDefaultTargetPlatformOverride
=
null
;
},
skip:
!
Platform
.
isLinux
);
},
skip:
!
isLinux
);
}
packages/flutter/test/widgets/invert_colors_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
...
@@ -23,7 +21,7 @@ void main() {
await
expectLater
(
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'invert_colors_test.0.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
@@ -42,7 +40,7 @@ void main() {
await
expectLater
(
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'invert_colors_test.1.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
}
...
...
packages/flutter/test/widgets/list_wheel_scroll_view_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/rendering.dart'
;
...
...
@@ -538,7 +536,7 @@ void main() {
await
expectLater
(
find
.
byKey
(
const
Key
(
'list_wheel_scroll_view'
)),
matchesGoldenFile
(
'list_wheel_scroll_view.center_child.magnified.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
@@ -593,7 +591,7 @@ void main() {
await
expectLater
(
find
.
byKey
(
const
Key
(
'list_wheel_scroll_view'
)),
matchesGoldenFile
(
'list_wheel_scroll_view.curved_wheel.left.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
packages/flutter/test/widgets/opacity_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter/material.dart'
;
...
...
@@ -180,7 +178,7 @@ void main() {
await
expectLater
(
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'opacity_test.offset.1.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
packages/flutter/test/widgets/physical_model_test.dart
View file @
d92b3b40
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
show
Platform
;
import
'dart:math'
as
math
show
pi
;
import
'package:flutter/material.dart'
;
...
...
@@ -112,7 +111,7 @@ void main() {
await
expectLater
(
find
.
byKey
(
key
),
matchesGoldenFile
(
'physical_model_overflow.png'
),
skip:
!
Platform
.
isLinux
,
skip:
!
isLinux
,
);
});
...
...
packages/flutter/test/widgets/shadow_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
show
Platform
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter/material.dart'
;
...
...
@@ -30,13 +28,11 @@ void main() {
debugDisableShadows
=
false
;
tester
.
binding
.
reassembleApplication
();
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
(
find
.
byType
(
Container
),
matchesGoldenFile
(
'shadow.BoxDecoration.enabled.png'
),
);
// shadows render differently on different platforms
}
await
expectLater
(
find
.
byType
(
Container
),
matchesGoldenFile
(
'shadow.BoxDecoration.enabled.png'
),
skip:
!
isLinux
);
// shadows render differently on different platforms
debugDisableShadows
=
true
;
});
...
...
@@ -65,7 +61,7 @@ void main() {
);
}
debugDisableShadows
=
true
;
},
skip:
!
Platform
.
isLinux
);
// shadows render differently on different platforms
},
skip:
!
isLinux
);
// shadows render differently on different platforms
testWidgets
(
'Shadows with PhysicalLayer'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -93,13 +89,11 @@ void main() {
debugDisableShadows
=
false
;
tester
.
binding
.
reassembleApplication
();
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
(
find
.
byType
(
Container
),
matchesGoldenFile
(
'shadow.PhysicalModel.enabled.png'
),
);
// shadows render differently on different platforms
}
await
expectLater
(
find
.
byType
(
Container
),
matchesGoldenFile
(
'shadow.PhysicalModel.enabled.png'
),
skip:
!
isLinux
,
);
// shadows render differently on different platforms
debugDisableShadows
=
true
;
});
...
...
@@ -132,5 +126,5 @@ void main() {
);
}
debugDisableShadows
=
true
;
},
skip:
!
Platform
.
isLinux
);
// shadows render differently on different platforms
},
skip:
!
isLinux
);
// shadows render differently on different platforms
}
packages/flutter/test/widgets/text_golden_test.dart
View file @
d92b3b40
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
show
Platform
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/widgets.dart'
;
...
...
@@ -57,7 +55,7 @@ void main() {
find
.
byType
(
Container
),
matchesGoldenFile
(
'text_golden.Centered.wrap.png'
),
);
},
skip:
!
Platform
.
isLinux
);
},
skip:
!
isLinux
);
testWidgets
(
'Text Foreground'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -133,7 +131,7 @@ void main() {
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'text_golden.Foreground.stroke_and_gradient.png'
),
);
},
skip:
!
Platform
.
isLinux
);
},
skip:
!
isLinux
);
// TODO(garyq): This test requires an update when the background
// drawing from the beginning of the line bug is fixed. The current
...
...
@@ -183,7 +181,7 @@ void main() {
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'text_golden.Background.png'
),
);
},
skip:
!
Platform
.
isLinux
);
},
skip:
!
isLinux
);
testWidgets
(
'Text Fade'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -219,7 +217,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'text_golden.Fade.1.png'
),
);
},
skip:
!
Platform
.
isLinux
);
},
skip:
!
isLinux
);
testWidgets
(
'Default Strut text'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -480,7 +478,7 @@ void main() {
find
.
byType
(
Container
),
matchesGoldenFile
(
'text_golden.Decoration.1.0.png'
),
);
},
skip:
!
Platform
.
isLinux
);
// Coretext uses different thicknesses for decoration
},
skip:
!
isLinux
);
// Coretext uses different thicknesses for decoration
testWidgets
(
'Decoration thickness'
,
(
WidgetTester
tester
)
async
{
final
TextDecoration
allDecorations
=
TextDecoration
.
combine
(
...
...
@@ -519,5 +517,5 @@ void main() {
find
.
byType
(
Container
),
matchesGoldenFile
(
'text_golden.DecorationThickness.1.0.png'
),
);
},
skip:
!
Platform
.
isLinux
);
// Coretext uses different thicknesses for decoration
},
skip:
!
isLinux
);
// Coretext uses different thicknesses for decoration
}
packages/flutter/test/widgets/widget_inspector_test.dart
View file @
d92b3b40
This diff is collapsed.
Click to expand it.
packages/flutter_test/lib/flutter_test.dart
View file @
d92b3b40
...
...
@@ -54,6 +54,7 @@ export 'src/finders.dart';
export
'src/goldens.dart'
;
export
'src/matchers.dart'
;
export
'src/nonconst.dart'
;
export
'src/platform.dart'
;
export
'src/stack_manipulation.dart'
;
export
'src/test_async_utils.dart'
;
export
'src/test_compat.dart'
;
...
...
packages/flutter_test/lib/src/platform.dart
0 → 100644
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