From 7defaca9c95c66ea8eeef3bd5a2c45e1e85a25db Mon Sep 17 00:00:00 2001 From: Amir Hardon Date: Tue, 7 Aug 2018 12:59:26 -0700 Subject: [PATCH] fix formatting for test/widgets/platform_view_test.dart --- .../test/widgets/platform_view_test.dart | 254 +++++++++--------- 1 file changed, 127 insertions(+), 127 deletions(-) diff --git a/packages/flutter/test/widgets/platform_view_test.dart b/packages/flutter/test/widgets/platform_view_test.dart index 6390bba13e..ea40775d7d 100644 --- a/packages/flutter/test/widgets/platform_view_test.dart +++ b/packages/flutter/test/widgets/platform_view_test.dart @@ -18,20 +18,20 @@ void main() { viewsController.registerViewType('webview'); await tester.pumpWidget( - const Center( - child: SizedBox( - width: 200.0, - height: 100.0, - child: AndroidView(viewType: 'webview'), - ) - ) + const Center( + child: SizedBox( + width: 200.0, + height: 100.0, + child: AndroidView(viewType: 'webview'), + ), + ), ); expect( viewsController.views, unorderedEquals([ new FakePlatformView(currentViewId + 1, 'webview', const Size(200.0, 100.0)) - ]) + ]), ); }); @@ -40,30 +40,30 @@ void main() { final FakePlatformViewsController viewsController = new FakePlatformViewsController(TargetPlatform.android); viewsController.registerViewType('webview'); await tester.pumpWidget( - const Center( - child: SizedBox( - width: 200.0, - height: 100.0, - child: AndroidView(viewType: 'webview'), - ) - ) + const Center( + child: SizedBox( + width: 200.0, + height: 100.0, + child: AndroidView(viewType: 'webview'), + ), + ), ); await tester.pumpWidget( - const Center( - child: SizedBox( - width: 400.0, - height: 200.0, - child: AndroidView(viewType: 'webview'), - ) - ) + const Center( + child: SizedBox( + width: 400.0, + height: 200.0, + child: AndroidView(viewType: 'webview'), + ), + ), ); expect( - viewsController.views, - unorderedEquals([ - new FakePlatformView(currentViewId + 1, 'webview', const Size(400.0, 200.0)) - ]) + viewsController.views, + unorderedEquals([ + new FakePlatformView(currentViewId + 1, 'webview', const Size(400.0, 200.0)) + ]), ); }); @@ -73,30 +73,30 @@ void main() { viewsController.registerViewType('webview'); viewsController.registerViewType('maps'); await tester.pumpWidget( - const Center( - child: SizedBox( - width: 200.0, - height: 100.0, - child: AndroidView(viewType: 'webview'), - ) - ) + const Center( + child: SizedBox( + width: 200.0, + height: 100.0, + child: AndroidView(viewType: 'webview'), + ), + ), ); await tester.pumpWidget( - const Center( - child: SizedBox( - width: 200.0, - height: 100.0, - child: AndroidView(viewType: 'maps'), - ) - ) + const Center( + child: SizedBox( + width: 200.0, + height: 100.0, + child: AndroidView(viewType: 'maps'), + ), + ), ); expect( - viewsController.views, - unorderedEquals([ - new FakePlatformView(currentViewId + 2, 'maps', const Size(200.0, 100.0)) - ]) + viewsController.views, + unorderedEquals([ + new FakePlatformView(currentViewId + 2, 'maps', const Size(200.0, 100.0)) + ]), ); }); @@ -104,22 +104,22 @@ void main() { final FakePlatformViewsController viewsController = new FakePlatformViewsController(TargetPlatform.android); viewsController.registerViewType('webview'); await tester.pumpWidget( - const Center( - child: SizedBox( - width: 200.0, - height: 100.0, - child: AndroidView(viewType: 'webview'), - ) - ) + const Center( + child: SizedBox( + width: 200.0, + height: 100.0, + child: AndroidView(viewType: 'webview'), + ), + ), ); await tester.pumpWidget( - const Center( - child: SizedBox( - width: 200.0, - height: 100.0, - ) - ) + const Center( + child: SizedBox( + width: 200.0, + height: 100.0, + ), + ), ); expect( @@ -134,13 +134,13 @@ void main() { viewsController.registerViewType('webview'); final GlobalKey key = new GlobalKey(); await tester.pumpWidget( - new Center( - child: new SizedBox( - width: 200.0, - height: 100.0, - child: new AndroidView(viewType: 'webview', key: key), - ) - ) + new Center( + child: new SizedBox( + width: 200.0, + height: 100.0, + child: new AndroidView(viewType: 'webview', key: key), + ), + ), ); await tester.pumpWidget( @@ -156,10 +156,10 @@ void main() { ); expect( - viewsController.views, - unorderedEquals([ - new FakePlatformView(currentViewId + 1, 'webview', const Size(200.0, 100.0)) - ]) + viewsController.views, + unorderedEquals([ + new FakePlatformView(currentViewId + 1, 'webview', const Size(200.0, 100.0)) + ]), ); }); @@ -168,14 +168,14 @@ void main() { final FakePlatformViewsController viewsController = new FakePlatformViewsController(TargetPlatform.android); viewsController.registerViewType('webview'); await tester.pumpWidget( - const Align( - alignment: Alignment.topLeft, - child: SizedBox( - width: 200.0, - height: 100.0, - child: AndroidView(viewType: 'webview'), - ) - ) + const Align( + alignment: Alignment.topLeft, + child: SizedBox( + width: 200.0, + height: 100.0, + child: AndroidView(viewType: 'webview'), + ), + ), ); final TestGesture gesture = await tester.startGesture(const Offset(50.0, 50.0)); @@ -186,7 +186,7 @@ void main() { orderedEquals( [ const FakeMotionEvent(AndroidViewController.kActionDown, [0], [Offset(50.0, 50.0)]), const FakeMotionEvent(AndroidViewController.kActionUp, [0], [Offset(50.0, 50.0)]), - ]) + ]), ); }); @@ -206,14 +206,14 @@ void main() { onPointerDown: (PointerDownEvent e) { numPointerDownsOnParent++; }, ), const Positioned( - child: SizedBox( - width: 200.0, - height: 100.0, - child: AndroidView( - viewType: 'webview', - hitTestBehavior: PlatformViewHitTestBehavior.transparent, - ), - ) + child: SizedBox( + width: 200.0, + height: 100.0, + child: AndroidView( + viewType: 'webview', + hitTestBehavior: PlatformViewHitTestBehavior.transparent, + ), + ), ), ], ), @@ -223,12 +223,12 @@ void main() { await tester.startGesture(const Offset(50.0, 50.0)); expect( - viewsController.motionEvents[currentViewId + 1], - isNull, + viewsController.motionEvents[currentViewId + 1], + isNull, ); expect( - numPointerDownsOnParent, - 1 + numPointerDownsOnParent, + 1 ); }); @@ -248,14 +248,14 @@ void main() { onPointerDown: (PointerDownEvent e) { numPointerDownsOnParent++; }, ), const Positioned( - child: SizedBox( - width: 200.0, - height: 100.0, - child: AndroidView( - viewType: 'webview', - hitTestBehavior: PlatformViewHitTestBehavior.translucent, - ), - ) + child: SizedBox( + width: 200.0, + height: 100.0, + child: AndroidView( + viewType: 'webview', + hitTestBehavior: PlatformViewHitTestBehavior.translucent, + ), + ), ), ], ), @@ -266,9 +266,9 @@ void main() { expect( viewsController.motionEvents[currentViewId + 1], - orderedEquals( [ - const FakeMotionEvent(AndroidViewController.kActionDown, [0], [Offset(50.0, 50.0)]), - ]) + orderedEquals( [ + const FakeMotionEvent(AndroidViewController.kActionDown, [0], [Offset(50.0, 50.0)]), + ]), ); expect( numPointerDownsOnParent, @@ -292,14 +292,14 @@ void main() { onPointerDown: (PointerDownEvent e) { numPointerDownsOnParent++; }, ), const Positioned( - child: SizedBox( - width: 200.0, - height: 100.0, - child: AndroidView( - viewType: 'webview', - hitTestBehavior: PlatformViewHitTestBehavior.opaque, - ), - ) + child: SizedBox( + width: 200.0, + height: 100.0, + child: AndroidView( + viewType: 'webview', + hitTestBehavior: PlatformViewHitTestBehavior.opaque, + ), + ), ), ], ), @@ -309,10 +309,10 @@ void main() { await tester.startGesture(const Offset(50.0, 50.0)); expect( - viewsController.motionEvents[currentViewId + 1], - orderedEquals( [ - const FakeMotionEvent(AndroidViewController.kActionDown, [0], [Offset(50.0, 50.0)]), - ]) + viewsController.motionEvents[currentViewId + 1], + orderedEquals( [ + const FakeMotionEvent(AndroidViewController.kActionDown, [0], [Offset(50.0, 50.0)]), + ]), ); expect( numPointerDownsOnParent, @@ -325,28 +325,28 @@ void main() { final FakePlatformViewsController viewsController = new FakePlatformViewsController(TargetPlatform.android); viewsController.registerViewType('webview'); await tester.pumpWidget( - new Align( - alignment: Alignment.topLeft, - child: new Container( - margin: const EdgeInsets.all(10.0), - child: const SizedBox( - width: 200.0, - height: 100.0, - child: AndroidView(viewType: 'webview'), - ), + new Align( + alignment: Alignment.topLeft, + child: new Container( + margin: const EdgeInsets.all(10.0), + child: const SizedBox( + width: 200.0, + height: 100.0, + child: AndroidView(viewType: 'webview'), ), - ) + ), + ), ); final TestGesture gesture = await tester.startGesture(const Offset(50.0, 50.0)); await gesture.up(); expect( - viewsController.motionEvents[currentViewId + 1], - orderedEquals( [ - const FakeMotionEvent(AndroidViewController.kActionDown, [0], [Offset(40.0, 40.0)]), - const FakeMotionEvent(AndroidViewController.kActionUp, [0], [Offset(40.0, 40.0)]), - ]) + viewsController.motionEvents[currentViewId + 1], + orderedEquals( [ + const FakeMotionEvent(AndroidViewController.kActionDown, [0], [Offset(40.0, 40.0)]), + const FakeMotionEvent(AndroidViewController.kActionUp, [0], [Offset(40.0, 40.0)]), + ]), ); }); }