Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
io.flutter.embedding.engine.systemchannels.AccessibilityChannelTest Class Reference

Public Member Functions

void repliesWhenNoAccessibilityHandler () throws JSONException
 
void handleFocus () throws JSONException
 

Detailed Description

Definition at line 24 of file AccessibilityChannelTest.java.

Member Function Documentation

◆ handleFocus()

void io.flutter.embedding.engine.systemchannels.AccessibilityChannelTest.handleFocus ( ) throws JSONException
inline

Definition at line 37 of file AccessibilityChannelTest.java.

37 {
38 AccessibilityChannel accessibilityChannel =
39 new AccessibilityChannel(mock(DartExecutor.class), mock(FlutterJNI.class));
40 HashMap<String, Object> arguments = new HashMap<>();
41 arguments.put("type", "focus");
42 arguments.put("nodeId", 123);
43 AccessibilityChannel.AccessibilityMessageHandler handler =
44 mock(AccessibilityChannel.AccessibilityMessageHandler.class);
45 accessibilityChannel.setAccessibilityMessageHandler(handler);
46 BasicMessageChannel.Reply reply = mock(BasicMessageChannel.Reply.class);
47 accessibilityChannel.parsingMessageHandler.onMessage(arguments, reply);
48 verify(handler).onFocus(123);
49 }

◆ repliesWhenNoAccessibilityHandler()

void io.flutter.embedding.engine.systemchannels.AccessibilityChannelTest.repliesWhenNoAccessibilityHandler ( ) throws JSONException
inline

Definition at line 26 of file AccessibilityChannelTest.java.

26 {
27 AccessibilityChannel accessibilityChannel =
28 new AccessibilityChannel(mock(DartExecutor.class), mock(FlutterJNI.class));
29 JSONObject arguments = new JSONObject();
30 arguments.put("type", "announce");
31 BasicMessageChannel.Reply reply = mock(BasicMessageChannel.Reply.class);
32 accessibilityChannel.parsingMessageHandler.onMessage(arguments, reply);
33 verify(reply).reply(null);
34 }

The documentation for this class was generated from the following file: