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); - }); }