From 2698fe852e5c3c3fa5c62ece00bad41b97d72a52 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Fri, 29 Sep 2017 11:18:53 -0700 Subject: [PATCH] Delete a duplicate EditableText test (#12325) In 85c425ac88, a test was added to ensure that widget.onChanged was fired when the contents of an EditableText changed via system paste events (e.g. triggered from a TextSelectionOverlay). Due to a long stack of rebases and (less-than-perfect) manual merge conflict merge resolution, it was inadvertently added twice. --- .../test/widgets/editable_text_test.dart | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/packages/flutter/test/widgets/editable_text_test.dart b/packages/flutter/test/widgets/editable_text_test.dart index afc87e03ff..2907a00103 100644 --- a/packages/flutter/test/widgets/editable_text_test.dart +++ b/packages/flutter/test/widgets/editable_text_test.dart @@ -250,43 +250,4 @@ void main() { }), ]); }); - - testWidgets('Fires onChanged when text changes via TextSelectionOverlay', (WidgetTester tester) async { - final GlobalKey editableTextKey = new GlobalKey(); - - String changedValue; - final Widget widget = new MaterialApp( - home: new EditableText( - key: editableTextKey, - controller: new TextEditingController(), - focusNode: new FocusNode(), - style: new Typography(platform: TargetPlatform.android).black.subhead, - cursorColor: Colors.blue, - selectionControls: materialTextSelectionControls, - keyboardType: TextInputType.text, - onChanged: (String value) { - changedValue = value; - }, - ), - ); - await tester.pumpWidget(widget); - - // Populate a fake clipboard. - const String clipboardContent = 'Dobunezumi mitai ni utsukushiku naritai'; - SystemChannels.platform.setMockMethodCallHandler((MethodCall methodCall) async { - if (methodCall.method == 'Clipboard.getData') - return const { 'text': clipboardContent }; - return null; - }); - - // Long-press to bring up the text editing controls. - final Finder textFinder = find.byKey(editableTextKey); - await tester.longPress(textFinder); - await tester.pump(); - - await tester.tap(find.text('PASTE')); - await tester.pump(); - - expect(changedValue, clipboardContent); - }); }