[fuchsia] Migrate to new RealmBuilder API (flutter/engine#39175)

See https://fxrev.dev/793422.

Missed in 92fca42e06.
This commit is contained in:
Tamir Duberstein
2023-01-26 20:54:43 -05:00
committed by GitHub
parent 3bf1b22425
commit 3bfa5c5b1d

View File

@@ -142,14 +142,16 @@ bool PortableUITest::HasViewConnected(zx_koid_t view_ref_koid) {
}
void PortableUITest::LaunchClient() {
scene_provider_ = realm_->Connect<fuchsia::ui::test::scene::Controller>();
scene_provider_ =
realm_->component().Connect<fuchsia::ui::test::scene::Controller>();
scene_provider_.set_error_handler([](auto) {
FML_LOG(ERROR) << "Error from test scene provider: "
<< &zx_status_get_string;
});
fuchsia::ui::test::scene::ControllerAttachClientViewRequest request;
request.set_view_provider(realm_->Connect<fuchsia::ui::app::ViewProvider>());
request.set_view_provider(
realm_->component().Connect<fuchsia::ui::app::ViewProvider>());
scene_provider_->RegisterViewTreeWatcher(view_tree_watcher_.NewRequest(),
[]() {});
scene_provider_->AttachClientView(
@@ -214,7 +216,8 @@ void PortableUITest::LaunchClientWithEmbeddedView() {
void PortableUITest::RegisterTouchScreen() {
FML_LOG(INFO) << "Registering fake touch screen";
input_registry_ = realm_->Connect<fuchsia::ui::test::input::Registry>();
input_registry_ =
realm_->component().Connect<fuchsia::ui::test::input::Registry>();
input_registry_.set_error_handler([](auto) {
FML_LOG(ERROR) << "Error from input helper: " << &zx_status_get_string;
});
@@ -232,7 +235,8 @@ void PortableUITest::RegisterTouchScreen() {
void PortableUITest::RegisterMouse() {
FML_LOG(INFO) << "Registering fake mouse";
input_registry_ = realm_->Connect<fuchsia::ui::test::input::Registry>();
input_registry_ =
realm_->component().Connect<fuchsia::ui::test::input::Registry>();
input_registry_.set_error_handler([](auto) {
FML_LOG(ERROR) << "Error from input helper: " << &zx_status_get_string;
});
@@ -249,7 +253,8 @@ void PortableUITest::RegisterMouse() {
void PortableUITest::RegisterKeyboard() {
FML_LOG(INFO) << "Registering fake keyboard";
input_registry_ = realm_->Connect<fuchsia::ui::test::input::Registry>();
input_registry_ =
realm_->component().Connect<fuchsia::ui::test::input::Registry>();
input_registry_.set_error_handler([](auto) {
FML_LOG(ERROR) << "Error from input helper: " << &zx_status_get_string;
});