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>[
......
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