Fix broken Fuchsia test (#20397)

This commit is contained in:
David Worsham 2020-08-11 01:01:38 -07:00 committed by GitHub
parent 8c02e38992
commit fafbcd223b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -582,8 +582,11 @@ std::unique_ptr<flutter::Surface> PlatformView::CreateRenderingSurface() {
// This platform does not repeatly lose and gain a surface connection. So the
// surface is setup once during platform view setup and returned to the
// shell on the initial (and only) |NotifyCreated| call.
auto view_embedder = on_get_view_embedder_callback_();
auto gr_context = on_get_gr_context_callback_();
auto view_embedder = on_get_view_embedder_callback_
? on_get_view_embedder_callback_()
: nullptr;
auto gr_context =
on_get_gr_context_callback_ ? on_get_gr_context_callback_() : nullptr;
return std::make_unique<Surface>(debug_label_, view_embedder, gr_context);
}

View File

@ -555,6 +555,7 @@ TEST_F(PlatformViewTests, GetGrContextTest) {
services_provider.service_directory(), // runner_services
nullptr, // parent_environment_service_provider_handle
nullptr, // session_listener_request
nullptr, // focuser
nullptr, // on_session_listener_error_callback
nullptr, // session_metrics_did_change_callback
nullptr, // session_size_change_hint_callback