Skip to content

Commit add7e81

Browse files
Reverts "Wide gamut framework gradient test (#153976)" (#157615)
Reverts: flutter/flutter#153976 Initiated by: jonahwilliams Reason for reverting: failing on postsubmit Original PR Author: gaaclarke Reviewed By: {jonahwilliams} This change reverts the following previous change: issue: flutter/flutter#127855 depends on flutter/engine#54748 being rolled into the framework
1 parent 4f66f13 commit add7e81

File tree

2 files changed

+2
-144
lines changed

2 files changed

+2
-144
lines changed

dev/integration_tests/wide_gamut_test/integration_test/app_test.dart

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -175,45 +175,5 @@ void main() {
175175
await channel.invokeMethod('test') as List<Object?>;
176176
expect(_findColor(result, _deepRed), isTrue);
177177
});
178-
179-
testWidgets('draw wide gamut linear gradient works', (WidgetTester tester) async {
180-
app.run(app.Setup.linearGradient);
181-
await tester.pumpAndSettle(const Duration(seconds: 2));
182-
183-
const MethodChannel channel = MethodChannel('flutter/screenshot');
184-
final List<Object?> result =
185-
await channel.invokeMethod('test') as List<Object?>;
186-
expect(_findColor(result, _deepRed), isTrue);
187-
});
188-
189-
testWidgets('draw wide gamut radial gradient works', (WidgetTester tester) async {
190-
app.run(app.Setup.radialGradient);
191-
await tester.pumpAndSettle(const Duration(seconds: 2));
192-
193-
const MethodChannel channel = MethodChannel('flutter/screenshot');
194-
final List<Object?> result =
195-
await channel.invokeMethod('test') as List<Object?>;
196-
expect(_findColor(result, _deepRed), isTrue);
197-
});
198-
199-
testWidgets('draw wide gamut conical gradient works', (WidgetTester tester) async {
200-
app.run(app.Setup.conicalGradient);
201-
await tester.pumpAndSettle(const Duration(seconds: 2));
202-
203-
const MethodChannel channel = MethodChannel('flutter/screenshot');
204-
final List<Object?> result =
205-
await channel.invokeMethod('test') as List<Object?>;
206-
expect(_findColor(result, _deepRed), isTrue);
207-
});
208-
209-
testWidgets('draw wide gamut sweep gradient works', (WidgetTester tester) async {
210-
app.run(app.Setup.sweepGradient);
211-
await tester.pumpAndSettle(const Duration(seconds: 2));
212-
213-
const MethodChannel channel = MethodChannel('flutter/screenshot');
214-
final List<Object?> result =
215-
await channel.invokeMethod('test') as List<Object?>;
216-
expect(_findColor(result, _deepRed), isTrue);
217-
});
218178
});
219179
}

dev/integration_tests/wide_gamut_test/lib/main.dart

Lines changed: 2 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ const String _displayP3Logo =
137137
'gr3yrjmlwqXLjmWw1O2I5Wmp9Xxjyh+AVIZ6ADIAqcwClakzeMgApDILVKbO4CED'
138138
'kMosUJk6g4dUBuRfvf1am9VRqzYAAAAASUVORK5CYII=';
139139

140-
void main() => run(Setup.sweepGradient);
140+
void main() => run(Setup.container);
141141

142142
enum Setup {
143143
none,
@@ -146,10 +146,6 @@ enum Setup {
146146
blur,
147147
drawnImage,
148148
container,
149-
linearGradient,
150-
radialGradient,
151-
conicalGradient,
152-
sweepGradient,
153149
}
154150

155151
void run(Setup setup) {
@@ -269,14 +265,7 @@ class _MyHomePageState extends State<MyHomePage> {
269265
_loadImage().then((ui.Image? value) => setState(() { _image = value; }));
270266
case Setup.drawnImage:
271267
_drawImage().then((ui.Image? value) => setState(() { _image = value; }));
272-
case Setup.image ||
273-
Setup.blur ||
274-
Setup.none ||
275-
Setup.container ||
276-
Setup.linearGradient ||
277-
Setup.radialGradient ||
278-
Setup.conicalGradient ||
279-
Setup.sweepGradient:
268+
case Setup.image || Setup.blur || Setup.none || Setup.container:
280269
break;
281270
}
282271
super.initState();
@@ -319,97 +308,6 @@ class _MyHomePageState extends State<MyHomePage> {
319308
green: 0,
320309
blue: 0,
321310
colorSpace: ui.ColorSpace.displayP3));
322-
case Setup.linearGradient:
323-
imageWidget = Container(
324-
width: 100,
325-
height: 100,
326-
decoration: const BoxDecoration(
327-
gradient: LinearGradient(
328-
begin: Alignment.topLeft,
329-
end: Alignment.bottomRight,
330-
colors: <Color>[
331-
Color.from(
332-
alpha: 1,
333-
red: 1,
334-
green: 0,
335-
blue: 0,
336-
colorSpace: ui.ColorSpace.displayP3),
337-
Color.from(
338-
alpha: 1,
339-
red: 0,
340-
green: 1,
341-
blue: 0,
342-
colorSpace: ui.ColorSpace.displayP3)],
343-
),
344-
),
345-
);
346-
case Setup.radialGradient:
347-
imageWidget = Container(
348-
width: 100,
349-
height: 100,
350-
decoration: const BoxDecoration(
351-
gradient: RadialGradient(
352-
colors: <Color>[
353-
Color.from(
354-
alpha: 1,
355-
red: 1,
356-
green: 0,
357-
blue: 0,
358-
colorSpace: ui.ColorSpace.displayP3),
359-
Color.from(
360-
alpha: 1,
361-
red: 0,
362-
green: 1,
363-
blue: 0,
364-
colorSpace: ui.ColorSpace.displayP3)],
365-
),
366-
),
367-
);
368-
case Setup.conicalGradient:
369-
imageWidget = Container(
370-
width: 100,
371-
height: 100,
372-
decoration: const BoxDecoration(
373-
gradient: RadialGradient(
374-
focal: Alignment(0.2, 0.2),
375-
colors: <Color>[
376-
Color.from(
377-
alpha: 1,
378-
red: 1,
379-
green: 0,
380-
blue: 0,
381-
colorSpace: ui.ColorSpace.displayP3),
382-
Color.from(
383-
alpha: 1,
384-
red: 0,
385-
green: 1,
386-
blue: 0,
387-
colorSpace: ui.ColorSpace.displayP3)],
388-
),
389-
),
390-
);
391-
case Setup.sweepGradient:
392-
imageWidget = Container(
393-
width: 100,
394-
height: 100,
395-
decoration: const BoxDecoration(
396-
gradient: SweepGradient(
397-
colors: <Color>[
398-
Color.from(
399-
alpha: 1,
400-
red: 1,
401-
green: 0,
402-
blue: 0,
403-
colorSpace: ui.ColorSpace.displayP3),
404-
Color.from(
405-
alpha: 1,
406-
red: 0,
407-
green: 1,
408-
blue: 0,
409-
colorSpace: ui.ColorSpace.displayP3)],
410-
),
411-
),
412-
);
413311
}
414312

415313
return Scaffold(

0 commit comments

Comments
 (0)