5#ifndef FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_TESTS_FAKES_FOCUSER_H_
6#define FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_TESTS_FAKES_FOCUSER_H_
8#include <fuchsia/ui/views/cpp/fidl.h>
9#include <fuchsia/ui/views/cpp/fidl_test_base.h>
13#include "flutter/fml/logging.h"
19class FakeFocuser :
public fuchsia::ui::views::testing::Focuser_TestBase {
24 fail_request_focus_ = fail_request;
28 void RequestFocus(fuchsia::ui::views::ViewRef view_ref,
29 RequestFocusCallback
callback)
override {
30 request_focus_called_ =
true;
33 ? fuchsia::ui::views::Focuser_RequestFocus_Result::WithErr(
34 fuchsia::ui::views::Error::DENIED)
35 :
fuchsia::
ui::views::Focuser_RequestFocus_Result::WithResponse(
36 fuchsia::
ui::views::Focuser_RequestFocus_Response());
40 void NotImplemented_(
const std::string&
name) {
41 FML_LOG(
FATAL) <<
"flutter_runner::Testing::FakeFocuser does not implement "
45 bool request_focus_called_ =
false;
46 bool fail_request_focus_ =
false;
void fail_request_focus(bool fail_request=true)
bool request_focus_called() const
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
#define FML_LOG(severity)
fuchsia::ui::views::Focuser Focuser
DEF_SWITCHES_START aot vmservice shared library name