Unverified Commit 3ae6abd9 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Compatibility pass on flutter/material tests for JavaScript compilation. (9) (#33378)

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