Unverified Commit c3b2175a authored by Qun Cheng's avatar Qun Cheng Committed by GitHub

Update golden tests (#128914)

parent c7167765
...@@ -20,6 +20,7 @@ class TextMagnifierExampleApp extends StatelessWidget { ...@@ -20,6 +20,7 @@ class TextMagnifierExampleApp extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MaterialApp( return MaterialApp(
theme: ThemeData(useMaterial3: false),
home: Scaffold( home: Scaffold(
body: Padding( body: Padding(
padding: const EdgeInsets.symmetric(horizontal: 48.0), padding: const EdgeInsets.symmetric(horizontal: 48.0),
......
...@@ -20,8 +20,9 @@ void main() { ...@@ -20,8 +20,9 @@ void main() {
testWidgets('gradient matches golden', (WidgetTester tester) async { testWidgets('gradient matches golden', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const MaterialApp( MaterialApp(
home: SizedBox( theme: ThemeData(useMaterial3: false),
home: const SizedBox(
width: 800, width: 800,
height: 600, height: 600,
child: RepaintBoundary( child: RepaintBoundary(
......
...@@ -1183,6 +1183,7 @@ void main() { ...@@ -1183,6 +1183,7 @@ void main() {
testWidgets('Default cupertino dialog golden', (WidgetTester tester) async { testWidgets('Default cupertino dialog golden', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
createAppWithButtonThatLaunchesDialog( createAppWithButtonThatLaunchesDialog(
useMaterial3: false,
dialogBuilder: (BuildContext context) { dialogBuilder: (BuildContext context) {
return MediaQuery( return MediaQuery(
data: MediaQuery.of(context).copyWith(textScaleFactor: 3.0), data: MediaQuery.of(context).copyWith(textScaleFactor: 3.0),
...@@ -1523,8 +1524,10 @@ RenderBox findScrollableActionsSectionRenderBox(WidgetTester tester) { ...@@ -1523,8 +1524,10 @@ RenderBox findScrollableActionsSectionRenderBox(WidgetTester tester) {
Widget createAppWithButtonThatLaunchesDialog({ Widget createAppWithButtonThatLaunchesDialog({
required WidgetBuilder dialogBuilder, required WidgetBuilder dialogBuilder,
bool? useMaterial3,
}) { }) {
return MaterialApp( return MaterialApp(
theme: ThemeData(useMaterial3: useMaterial3),
home: Material( home: Material(
child: Center( child: Center(
child: Builder(builder: (BuildContext context) { child: Builder(builder: (BuildContext context) {
......
...@@ -20,6 +20,7 @@ void main() { ...@@ -20,6 +20,7 @@ void main() {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
theme: ThemeData(useMaterial3: false),
supportedLocales: const <Locale>[ supportedLocales: const <Locale>[
Locale('en', 'US'), Locale('en', 'US'),
Locale('ja'), Locale('ja'),
...@@ -64,6 +65,7 @@ void main() { ...@@ -64,6 +65,7 @@ void main() {
(WidgetTester tester) async { (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
theme: ThemeData(useMaterial3: false),
supportedLocales: const <Locale>[ supportedLocales: const <Locale>[
Locale('en', 'US'), Locale('en', 'US'),
Locale('ja'), Locale('ja'),
...@@ -115,6 +117,7 @@ void main() { ...@@ -115,6 +117,7 @@ void main() {
(WidgetTester tester) async { (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
theme: ThemeData(useMaterial3: false),
supportedLocales: const <Locale>[ supportedLocales: const <Locale>[
Locale('en', 'US'), Locale('en', 'US'),
Locale('ja'), Locale('ja'),
......
...@@ -16,6 +16,7 @@ void main() { ...@@ -16,6 +16,7 @@ void main() {
testWidgets("BackdropFilter's cull rect does not shrink", (WidgetTester tester) async { testWidgets("BackdropFilter's cull rect does not shrink", (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
theme: ThemeData(useMaterial3: false),
home: Scaffold( home: Scaffold(
body: Stack( body: Stack(
fit: StackFit.expand, fit: StackFit.expand,
...@@ -53,6 +54,7 @@ void main() { ...@@ -53,6 +54,7 @@ void main() {
testWidgets('BackdropFilter blendMode on saveLayer', (WidgetTester tester) async { testWidgets('BackdropFilter blendMode on saveLayer', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
theme: ThemeData(useMaterial3: false),
home: Scaffold( home: Scaffold(
body: Opacity( body: Opacity(
opacity: 0.9, opacity: 0.9,
......
...@@ -18,6 +18,7 @@ class TestPage extends StatelessWidget { ...@@ -18,6 +18,7 @@ class TestPage extends StatelessWidget {
return MaterialApp( return MaterialApp(
title: 'Test', title: 'Test',
theme: ThemeData( theme: ThemeData(
useMaterial3: false,
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
), ),
home: const HomePage(), home: const HomePage(),
......
...@@ -5080,8 +5080,9 @@ void main() { ...@@ -5080,8 +5080,9 @@ void main() {
testWidgets('text selection style 1', (WidgetTester tester) async { testWidgets('text selection style 1', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const MaterialApp( MaterialApp(
home: Material( theme: ThemeData(useMaterial3: false),
home: const Material(
child: Center( child: Center(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
...@@ -5132,8 +5133,9 @@ void main() { ...@@ -5132,8 +5133,9 @@ void main() {
testWidgets('text selection style 2', (WidgetTester tester) async { testWidgets('text selection style 2', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const MaterialApp( MaterialApp(
home: Material( theme: ThemeData(useMaterial3: false),
home: const Material(
child: Center( child: Center(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
......
...@@ -788,7 +788,9 @@ void main() { ...@@ -788,7 +788,9 @@ void main() {
testWidgets('Text Inline widget baseline', (WidgetTester tester) async { testWidgets('Text Inline widget baseline', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
Center( Theme(
data: ThemeData(useMaterial3: false),
child: Center(
child: RepaintBoundary( child: RepaintBoundary(
child: Material( child: Material(
child: Directionality( child: Directionality(
...@@ -886,6 +888,7 @@ void main() { ...@@ -886,6 +888,7 @@ void main() {
), ),
), ),
), ),
),
); );
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
...@@ -895,7 +898,9 @@ void main() { ...@@ -895,7 +898,9 @@ void main() {
testWidgets('Text Inline widget aboveBaseline', (WidgetTester tester) async { testWidgets('Text Inline widget aboveBaseline', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
Center( Theme(
data: ThemeData(useMaterial3: false),
child: Center(
child: RepaintBoundary( child: RepaintBoundary(
child: Material( child: Material(
child: Directionality( child: Directionality(
...@@ -993,6 +998,7 @@ void main() { ...@@ -993,6 +998,7 @@ void main() {
), ),
), ),
), ),
),
); );
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
...@@ -1002,7 +1008,9 @@ void main() { ...@@ -1002,7 +1008,9 @@ void main() {
testWidgets('Text Inline widget belowBaseline', (WidgetTester tester) async { testWidgets('Text Inline widget belowBaseline', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
Center( Theme(
data: ThemeData(useMaterial3: false),
child: Center(
child: RepaintBoundary( child: RepaintBoundary(
child: Material( child: Material(
child: Directionality( child: Directionality(
...@@ -1100,6 +1108,7 @@ void main() { ...@@ -1100,6 +1108,7 @@ void main() {
), ),
), ),
), ),
),
); );
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
...@@ -1109,7 +1118,9 @@ void main() { ...@@ -1109,7 +1118,9 @@ void main() {
testWidgets('Text Inline widget top', (WidgetTester tester) async { testWidgets('Text Inline widget top', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
Center( Theme(
data: ThemeData(useMaterial3: false),
child: Center(
child: RepaintBoundary( child: RepaintBoundary(
child: Material( child: Material(
child: Directionality( child: Directionality(
...@@ -1207,6 +1218,7 @@ void main() { ...@@ -1207,6 +1218,7 @@ void main() {
), ),
), ),
), ),
),
); );
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
...@@ -1216,7 +1228,9 @@ void main() { ...@@ -1216,7 +1228,9 @@ void main() {
testWidgets('Text Inline widget middle', (WidgetTester tester) async { testWidgets('Text Inline widget middle', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
Center( Theme(
data: ThemeData(useMaterial3: false),
child: Center(
child: RepaintBoundary( child: RepaintBoundary(
child: Material( child: Material(
child: Directionality( child: Directionality(
...@@ -1314,6 +1328,7 @@ void main() { ...@@ -1314,6 +1328,7 @@ void main() {
), ),
), ),
), ),
),
); );
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
......
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