| Index: services/ui/ws/window_tree_client_unittest.cc
|
| diff --git a/services/ui/ws/window_tree_client_unittest.cc b/services/ui/ws/window_tree_client_unittest.cc
|
| index 45254d87721434cbe63e7adba2a209063a242415..eb2425f44e05fefe39d172a0763a905b1607ec69 100644
|
| --- a/services/ui/ws/window_tree_client_unittest.cc
|
| +++ b/services/ui/ws/window_tree_client_unittest.cc
|
| @@ -279,13 +279,14 @@ class TestWindowTreeClient : public mojom::WindowTreeClient,
|
| mojom::WindowTreePtr tree,
|
| int64_t display_id,
|
| Id focused_window_id,
|
| - bool drawn) override {
|
| + bool drawn,
|
| + const cc::FrameSinkId& frame_sink_id) override {
|
| // TODO(sky): add coverage of |focused_window_id|.
|
| ASSERT_TRUE(root);
|
| root_window_id_ = root->window_id;
|
| tree_ = std::move(tree);
|
| client_id_ = client_id;
|
| - tracker()->OnEmbed(client_id, std::move(root), drawn);
|
| + tracker()->OnEmbed(client_id, std::move(root), drawn, frame_sink_id);
|
| if (embed_run_loop_)
|
| embed_run_loop_->Quit();
|
| }
|
| @@ -300,8 +301,10 @@ class TestWindowTreeClient : public mojom::WindowTreeClient,
|
| void OnTopLevelCreated(uint32_t change_id,
|
| mojom::WindowDataPtr data,
|
| int64_t display_id,
|
| - bool drawn) override {
|
| - tracker()->OnTopLevelCreated(change_id, std::move(data), drawn);
|
| + bool drawn,
|
| + const cc::FrameSinkId& frame_sink_id) override {
|
| + tracker()->OnTopLevelCreated(change_id, std::move(data), drawn,
|
| + frame_sink_id);
|
| }
|
| void OnWindowBoundsChanged(
|
| Id window_id,
|
| @@ -443,7 +446,8 @@ class TestWindowTreeClient : public mojom::WindowTreeClient,
|
| void OnConnect(uint16_t client_id) override {}
|
| void WmNewDisplayAdded(const display::Display& display,
|
| mojom::WindowDataPtr root_data,
|
| - bool drawn) override {
|
| + bool drawn,
|
| + const cc::FrameSinkId& frame_sink_id) override {
|
| NOTIMPLEMENTED();
|
| }
|
| void WmDisplayRemoved(int64_t display_id) override { NOTIMPLEMENTED(); }
|
| @@ -646,6 +650,9 @@ class WindowTreeClientTest : public WindowServerServiceTestBase {
|
| }
|
| client->WaitForOnEmbed();
|
|
|
| + // TODO(fsamuel): Currently the FrameSinkId maps directly to the server's
|
| + // window ID. This is likely bad from a security perspective and should be
|
| + // fixed.
|
| EXPECT_EQ("OnEmbed",
|
| SingleChangeToDescription(*client->tracker()->changes()));
|
| if (client_id)
|
| @@ -1729,7 +1736,9 @@ TEST_F(WindowTreeClientTest, SetWindowVisibilityNotifications2) {
|
|
|
| // Establish the second client at 1,2.
|
| ASSERT_NO_FATAL_FAILURE(EstablishSecondClientWithRoot(window_1_2));
|
| - EXPECT_EQ("OnEmbed drawn=true", SingleChangeToDescription2(*changes2()));
|
| + EXPECT_EQ(
|
| + base::StringPrintf("OnEmbed FrameSinkId(%d, 0) drawn=true", window_1_2),
|
| + SingleChangeToDescription2(*changes2()));
|
| changes2()->clear();
|
|
|
| // Show 1,2 from client 1. Client 2 should see this.
|
| @@ -1753,8 +1762,13 @@ TEST_F(WindowTreeClientTest, SetWindowVisibilityNotifications3) {
|
| ASSERT_TRUE(wt_client1()->AddWindow(window_1_1, window_1_2));
|
|
|
| // Establish the second client at 1,2.
|
| + // TODO(fsamuel): Currently the FrameSinkId maps directly to the server's
|
| + // window ID. This is likely bad from a security perspective and should be
|
| + // fixed.
|
| ASSERT_NO_FATAL_FAILURE(EstablishSecondClientWithRoot(window_1_2));
|
| - EXPECT_EQ("OnEmbed drawn=false", SingleChangeToDescription2(*changes2()));
|
| + EXPECT_EQ(
|
| + base::StringPrintf("OnEmbed FrameSinkId(%d, 0) drawn=false", window_1_2),
|
| + SingleChangeToDescription2(*changes2()));
|
| changes2()->clear();
|
|
|
| // Show 1,1, drawn should be true for 1,2 (as that is all the child sees).
|
|
|