Commit 3d0c4bcc authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

chromeos: fix id sent to parent in OnFrameSinkIdAllocated()

It was passing in the FrameSinkId, when it should have passed in the window
id.

BUG=837686
TEST=covered by test

Change-Id: I2f6920528403452696d358110605aa85519a0b2d
Reviewed-on: https://chromium-review.googlesource.com/1110748Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569391}
parent 68185c7d
......@@ -763,11 +763,9 @@ bool WindowTree::EmbedImpl(const ClientWindowId& window_id,
if (flags & mojom::kEmbedFlagEmbedderControlsVisibility)
embedding->embedded_tree()->can_change_root_window_visibility_ = false;
ServerWindow* server_window = ServerWindow::GetMayBeNull(window);
const ClientWindowId client_window_id = server_window->frame_sink_id();
server_window->SetEmbedding(std::move(embedding));
window_tree_client_->OnFrameSinkIdAllocated(
ClientWindowIdToTransportId(client_window_id),
server_window->frame_sink_id());
ClientWindowIdToTransportId(window_id), server_window->frame_sink_id());
return true;
}
......
......@@ -1005,6 +1005,11 @@ TEST(WindowTreeTest2, Embed) {
// OnFrameSinkIdAllocated() should called on the parent tree.
ASSERT_EQ(1u, setup.changes()->size());
EXPECT_EQ(CHANGE_TYPE_FRAME_SINK_ID_ALLOCATED, (*setup.changes())[0].type);
const Id embed_window_transport_id =
setup.window_tree_test_helper()->TransportIdForWindow(embed_window);
EXPECT_EQ(embed_window_transport_id, (*setup.changes())[0].window_id);
EXPECT_EQ(ServerWindow::GetMayBeNull(embed_window)->frame_sink_id(),
(*setup.changes())[0].frame_sink_id);
}
// Base class for ScheduleEmbed() related tests. This creates a Window and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment