From d3e36807fe96855f0c8ad0ab27469e8743d7c760 Mon Sep 17 00:00:00 2001 From: Gary Qian Date: Mon, 10 Sep 2018 10:46:52 -0700 Subject: [PATCH] Update goldens, and new Golden test for ClipRect (#21575) --- packages/flutter/test/widgets/clip_test.dart | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/packages/flutter/test/widgets/clip_test.dart b/packages/flutter/test/widgets/clip_test.dart index 6ed6a5237e..544e63de31 100644 --- a/packages/flutter/test/widgets/clip_test.dart +++ b/packages/flutter/test/widgets/clip_test.dart @@ -291,6 +291,46 @@ void main() { ); }); + testWidgets('ClipRect save, overlay, and antialiasing', (WidgetTester tester) async { + await tester.pumpWidget( + new RepaintBoundary( + child: new Stack( + textDirection: TextDirection.ltr, + children: [ + new Positioned( + top: 0.0, + left: 0.0, + width: 100.0, + height: 100.0, + child: new ClipRect( + child: new Container( + color: Colors.blue, + ), + clipBehavior: Clip.hardEdge, + ), + ), + new Positioned( + top: 50.0, + left: 50.0, + width: 100.0, + height: 100.0, + child: new Transform.rotate( + angle: 1.0, + child: new Container( + color: Colors.red, + ), + ), + ), + ], + ), + ), + ); + await expectLater( + find.byType(RepaintBoundary).first, + matchesGoldenFile('clip.ClipRectOverlay.1.png'), + ); + }); + testWidgets('ClipRRect painting', (WidgetTester tester) async { await tester.pumpWidget( new Center(