5package io.flutter.plugin.platform;
7import static junit.framework.TestCase.assertFalse;
8import static junit.framework.TestCase.assertTrue;
9import static org.mockito.ArgumentMatchers.any;
10import static org.mockito.ArgumentMatchers.anyBoolean;
11import static org.mockito.Mockito.mock;
12import static org.mockito.Mockito.times;
13import static org.mockito.Mockito.verify;
14import static org.mockito.Mockito.when;
18import android.view.accessibility.AccessibilityEvent;
19import androidx.test.ext.junit.runners.AndroidJUnit4;
20import io.flutter.view.AccessibilityBridge;
22import org.junit.runner.RunWith;
24@RunWith(AndroidJUnit4.class)
29 final View embeddedView = mock(View.class);
30 final View originView = mock(View.class);
31 final AccessibilityEvent
event = mock(AccessibilityEvent.class);
35 when(mockAccessibilityBridge.externalViewRequestSendAccessibilityEvent(
any(),
any(),
any()))
41 verify(mockAccessibilityBridge,
times(1))
42 .externalViewRequestSendAccessibilityEvent(embeddedView, originView,
event);
47 final View embeddedView = mock(View.class);
48 final View originView = mock(View.class);
49 final AccessibilityEvent
event = mock(AccessibilityEvent.class);
61 final MotionEvent
event = mock(MotionEvent.class);
65 when(mockAccessibilityBridge.onAccessibilityHoverEvent(
any(), anyBoolean())).thenReturn(
true);
70 verify(mockAccessibilityBridge,
times(1)).onAccessibilityHoverEvent(
event,
true);
75 final MotionEvent
event = mock(MotionEvent.class);
static SkISize times(const SkISize &size, float factor)
SIT bool any(const Vec< 1, T > &x)