◆ acessibilityEventsDelegate_forwardsAccessibilityEvents()
void io.flutter.plugin.platform.AccessibilityEventsDelegateTest.acessibilityEventsDelegate_forwardsAccessibilityEvents |
( |
| ) |
|
|
inline |
Definition at line 27 of file AccessibilityEventsDelegateTest.java.
27 {
28 final AccessibilityBridge mockAccessibilityBridge = mock(AccessibilityBridge.class);
29 final View embeddedView = mock(View.class);
30 final View originView = mock(View.class);
31 final AccessibilityEvent event = mock(AccessibilityEvent.class);
32
33 AccessibilityEventsDelegate delegate = new AccessibilityEventsDelegate();
34 delegate.setAccessibilityBridge(mockAccessibilityBridge);
35 when(mockAccessibilityBridge.externalViewRequestSendAccessibilityEvent(
any(),
any(),
any()))
36 .thenReturn(true);
37
38 final boolean handled = delegate.requestSendAccessibilityEvent(embeddedView, originView,
event);
39
40 assertTrue(handled);
41 verify(mockAccessibilityBridge,
times(1))
42 .externalViewRequestSendAccessibilityEvent(embeddedView, originView,
event);
43 }
static SkISize times(const SkISize &size, float factor)
SIT bool any(const Vec< 1, T > &x)
◆ acessibilityEventsDelegate_forwardsHoverEvents()
void io.flutter.plugin.platform.AccessibilityEventsDelegateTest.acessibilityEventsDelegate_forwardsHoverEvents |
( |
| ) |
|
|
inline |
Definition at line 59 of file AccessibilityEventsDelegateTest.java.
59 {
60 final AccessibilityBridge mockAccessibilityBridge = mock(AccessibilityBridge.class);
61 final MotionEvent event = mock(MotionEvent.class);
62
63 AccessibilityEventsDelegate delegate = new AccessibilityEventsDelegate();
64 delegate.setAccessibilityBridge(mockAccessibilityBridge);
65 when(mockAccessibilityBridge.onAccessibilityHoverEvent(
any(), anyBoolean())).thenReturn(
true);
66
67 final boolean handled = delegate.onAccessibilityHoverEvent(
event,
true);
68
69 assertTrue(handled);
70 verify(mockAccessibilityBridge,
times(1)).onAccessibilityHoverEvent(
event,
true);
71 }
◆ acessibilityEventsDelegate_withoutBridge_noopsAccessibilityEvents()
void io.flutter.plugin.platform.AccessibilityEventsDelegateTest.acessibilityEventsDelegate_withoutBridge_noopsAccessibilityEvents |
( |
| ) |
|
|
inline |
Definition at line 46 of file AccessibilityEventsDelegateTest.java.
46 {
47 final View embeddedView = mock(View.class);
48 final View originView = mock(View.class);
49 final AccessibilityEvent event = mock(AccessibilityEvent.class);
50
51 AccessibilityEventsDelegate delegate = new AccessibilityEventsDelegate();
52
53 final boolean handled = delegate.requestSendAccessibilityEvent(embeddedView, originView,
event);
54
55 assertFalse(handled);
56 }
◆ acessibilityEventsDelegate_withoutBridge_noopsHoverEvents()
void io.flutter.plugin.platform.AccessibilityEventsDelegateTest.acessibilityEventsDelegate_withoutBridge_noopsHoverEvents |
( |
| ) |
|
|
inline |
Definition at line 74 of file AccessibilityEventsDelegateTest.java.
74 {
75 final MotionEvent event = mock(MotionEvent.class);
76
77 AccessibilityEventsDelegate delegate = new AccessibilityEventsDelegate();
78
79 final boolean handled = delegate.onAccessibilityHoverEvent(
event,
true);
80
81 assertFalse(handled);
82 }
The documentation for this class was generated from the following file: