@@ -436,38 +436,6 @@ - (void)testInputHiderOverlapWithTextWhenScribbleIsDisabledAfterIOS17AndDoesNotO
436436 }
437437}
438438
439- - (void )testSetSelectionRectsNotifiesTextChangeAfterIOS17AndDoesNotNotifyBeforeIOS17 {
440- FlutterTextInputPlugin* myInputPlugin =
441- [[FlutterTextInputPlugin alloc ] initWithDelegate: OCMClassMock ([FlutterEngine class ])];
442-
443- FlutterMethodCall* setClientCall =
444- [FlutterMethodCall methodCallWithMethodName: @" TextInput.setClient"
445- arguments: @[ @(123 ), self .mutableTemplateCopy ]];
446- [myInputPlugin handleMethodCall: setClientCall
447- result: ^(id _Nullable result){
448- }];
449-
450- id mockInputDelegate = OCMProtocolMock (@protocol (UITextInputDelegate));
451- myInputPlugin.activeView .inputDelegate = mockInputDelegate;
452-
453- NSArray <NSNumber *>* selectionRect = [NSArray arrayWithObjects: @0 , @0 , @100 , @100 , @0 , @1 , nil ];
454- NSArray * selectionRects = [NSArray arrayWithObjects: selectionRect, nil ];
455- FlutterMethodCall* methodCall =
456- [FlutterMethodCall methodCallWithMethodName: @" Scribble.setSelectionRects"
457- arguments: selectionRects];
458- [myInputPlugin handleMethodCall: methodCall
459- result: ^(id _Nullable result){
460- }];
461-
462- if (@available (iOS 17.0 , *)) {
463- OCMVerify ([mockInputDelegate textWillChange: myInputPlugin.activeView]);
464- OCMVerify ([mockInputDelegate textDidChange: myInputPlugin.activeView]);
465- } else {
466- OCMVerify (never (), [mockInputDelegate textWillChange: myInputPlugin.activeView]);
467- OCMVerify (never (), [mockInputDelegate textDidChange: myInputPlugin.activeView]);
468- }
469- }
470-
471439- (void )testTextRangeFromPositionMatchesUITextViewBehavior {
472440 FlutterTextInputView* inputView = [[FlutterTextInputView alloc ] initWithOwner: textInputPlugin];
473441 FlutterTextPosition* fromPosition = [FlutterTextPosition positionWithIndex: 2 ];
0 commit comments