1package io.flutter.embedding.engine.systemchannels;
3import static io.flutter.Build.API_LEVELS;
4import static org.mockito.Mockito.mock;
5import static org.mockito.Mockito.verify;
7import android.annotation.TargetApi;
8import io.flutter.embedding.engine.FlutterJNI;
9import io.flutter.embedding.engine.dart.DartExecutor;
10import io.flutter.plugin.common.BasicMessageChannel;
11import java.util.HashMap;
12import org.json.JSONException;
13import org.json.JSONObject;
15import org.junit.runner.RunWith;
16import org.robolectric.RobolectricTestRunner;
17import org.robolectric.annotation.Config;
22@RunWith(RobolectricTestRunner.class)
23@TargetApi(API_LEVELS.API_24)
29 JSONObject arguments =
new JSONObject();
30 arguments.put(
"type",
"announce");
33 verify(reply).reply(
null);
40 HashMap<String, Object> arguments =
new HashMap<>();
41 arguments.put(
"type",
"focus");
42 arguments.put(
"nodeId", 123);
43 AccessibilityChannel.AccessibilityMessageHandler handler =
48 verify(handler).onFocus(123);
void repliesWhenNoAccessibilityHandler()
final BasicMessageChannel.MessageHandler< Object > parsingMessageHandler
void setAccessibilityMessageHandler(@Nullable AccessibilityMessageHandler handler)