Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: services/ui/ws/window_tree_unittest.cc

Issue 2582823002: WIP: Surface Synchronization System
Patch Set: Only create ClientSurfaceEmbedder if window is visible. Trash it otherwise. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/ui/ws/window_tree_unittest.cc
diff --git a/services/ui/ws/window_tree_unittest.cc b/services/ui/ws/window_tree_unittest.cc
index c82e7d0799aa610f34166a4ee0d68467ea54ad2f..925a792d1afe93ef751ef1fe8e76ce2deda51185 100644
--- a/services/ui/ws/window_tree_unittest.cc
+++ b/services/ui/ws/window_tree_unittest.cc
@@ -212,8 +212,8 @@ void WindowTreeTest::SetupEventTargeting(TestWindowTreeClient** out_client,
// Verifies focus correctly changes on pointer events.
TEST_F(WindowTreeTest, FocusOnPointer) {
const ClientWindowId embed_window_id = BuildClientWindowId(wm_tree(), 1);
- EXPECT_TRUE(
- wm_tree()->NewWindow(embed_window_id, ServerWindow::Properties()));
+ EXPECT_TRUE(wm_tree()->NewWindow(embed_window_id, ServerWindow::Properties(),
+ cc::LocalFrameId()));
ServerWindow* embed_window = wm_tree()->GetWindowByClientId(embed_window_id);
ASSERT_TRUE(embed_window);
EXPECT_TRUE(wm_tree()->SetWindowVisibility(embed_window_id, true));
@@ -222,9 +222,10 @@ TEST_F(WindowTreeTest, FocusOnPointer) {
EXPECT_TRUE(wm_tree()->AddWindow(wm_root_id, embed_window_id));
ServerWindow* wm_root = FirstRoot(wm_tree());
ASSERT_TRUE(wm_root);
- wm_root->SetBounds(gfx::Rect(0, 0, 100, 100));
+ wm_root->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
EnableHitTest(wm_root);
- display()->root_window()->SetBounds(gfx::Rect(0, 0, 100, 100));
+ display()->root_window()->SetBounds(gfx::Rect(0, 0, 100, 100),
+ cc::LocalFrameId());
mojom::WindowTreeClientPtr client;
mojom::WindowTreeClientRequest client_request(&client);
wm_client()->Bind(std::move(client_request));
@@ -234,16 +235,17 @@ TEST_F(WindowTreeTest, FocusOnPointer) {
ASSERT_TRUE(tree1 != nullptr);
ASSERT_NE(tree1, wm_tree());
- embed_window->SetBounds(gfx::Rect(0, 0, 50, 50));
+ embed_window->SetBounds(gfx::Rect(0, 0, 50, 50), cc::LocalFrameId());
const ClientWindowId child1_id(BuildClientWindowId(tree1, 1));
- EXPECT_TRUE(tree1->NewWindow(child1_id, ServerWindow::Properties()));
+ EXPECT_TRUE(tree1->NewWindow(child1_id, ServerWindow::Properties(),
+ cc::LocalFrameId()));
EXPECT_TRUE(tree1->AddWindow(ClientWindowIdForWindow(tree1, embed_window),
child1_id));
ServerWindow* child1 = tree1->GetWindowByClientId(child1_id);
ASSERT_TRUE(child1);
child1->SetVisible(true);
- child1->SetBounds(gfx::Rect(20, 20, 20, 20));
+ child1->SetBounds(gfx::Rect(20, 20, 20, 20), cc::LocalFrameId());
EnableHitTest(child1);
TestWindowTreeClient* tree1_client = last_window_tree_client();
@@ -558,11 +560,11 @@ TEST_F(WindowTreeTest, ChangingWindowBoundsChangesCursor) {
// Expand the bounds of the window so they now include where the cursor now
// is.
- window->SetBounds(gfx::Rect(20, 20, 25, 25));
+ window->SetBounds(gfx::Rect(20, 20, 25, 25), cc::LocalFrameId());
EXPECT_EQ(mojom::Cursor::IBEAM, cursor_id());
// Contract the bounds again.
- window->SetBounds(gfx::Rect(20, 20, 20, 20));
+ window->SetBounds(gfx::Rect(20, 20, 20, 20), cc::LocalFrameId());
EXPECT_EQ(mojom::Cursor::CURSOR_NULL, cursor_id());
}
@@ -575,12 +577,13 @@ TEST_F(WindowTreeTest, WindowReorderingChangesCursor) {
// Create a second window right over the first.
const ClientWindowId embed_window_id(FirstRootId(tree));
const ClientWindowId child2_id(BuildClientWindowId(tree, 2));
- EXPECT_TRUE(tree->NewWindow(child2_id, ServerWindow::Properties()));
+ EXPECT_TRUE(tree->NewWindow(child2_id, ServerWindow::Properties(),
+ cc::LocalFrameId()));
ServerWindow* child2 = tree->GetWindowByClientId(child2_id);
ASSERT_TRUE(child2);
EXPECT_TRUE(tree->AddWindow(embed_window_id, child2_id));
child2->SetVisible(true);
- child2->SetBounds(gfx::Rect(20, 20, 20, 20));
+ child2->SetBounds(gfx::Rect(20, 20, 20, 20), cc::LocalFrameId());
EnableHitTest(child2);
// Give each window a different cursor.
@@ -598,15 +601,15 @@ TEST_F(WindowTreeTest, WindowReorderingChangesCursor) {
TEST_F(WindowTreeTest, EventAck) {
const ClientWindowId embed_window_id = BuildClientWindowId(wm_tree(), 1);
- EXPECT_TRUE(
- wm_tree()->NewWindow(embed_window_id, ServerWindow::Properties()));
+ EXPECT_TRUE(wm_tree()->NewWindow(embed_window_id, ServerWindow::Properties(),
+ cc::LocalFrameId()));
EXPECT_TRUE(wm_tree()->SetWindowVisibility(embed_window_id, true));
ASSERT_TRUE(FirstRoot(wm_tree()));
EXPECT_TRUE(wm_tree()->AddWindow(FirstRootId(wm_tree()), embed_window_id));
ASSERT_EQ(1u, display()->root_window()->children().size());
ServerWindow* wm_root = FirstRoot(wm_tree());
ASSERT_TRUE(wm_root);
- wm_root->SetBounds(gfx::Rect(0, 0, 100, 100));
+ wm_root->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
EnableHitTest(wm_root);
wm_client()->tracker()->changes()->clear();
@@ -654,8 +657,8 @@ TEST_F(WindowTreeTest, NewTopLevelWindow) {
// Create the window for |embed_window_id2_in_child|.
const ClientWindowId embed_window_id2 = BuildClientWindowId(wm_tree(), 2);
- EXPECT_TRUE(
- wm_tree()->NewWindow(embed_window_id2, ServerWindow::Properties()));
+ EXPECT_TRUE(wm_tree()->NewWindow(embed_window_id2, ServerWindow::Properties(),
+ cc::LocalFrameId()));
EXPECT_TRUE(wm_tree()->SetWindowVisibility(embed_window_id2, true));
EXPECT_TRUE(wm_tree()->AddWindow(FirstRootId(wm_tree()), embed_window_id2));
@@ -700,7 +703,7 @@ TEST_F(WindowTreeTest, ExplicitSetCapture) {
EXPECT_NO_FATAL_FAILURE(SetupEventTargeting(&embed_client, &tree, &window));
const ServerWindow* root_window = *tree->roots().begin();
tree->AddWindow(FirstRootId(tree), ClientWindowIdForWindow(tree, window));
- window->SetBounds(gfx::Rect(0, 0, 100, 100));
+ window->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
ASSERT_TRUE(tree->GetDisplay(window));
// Set capture.
@@ -727,7 +730,7 @@ TEST_F(WindowTreeTest, CaptureWindowMustBeVisible) {
ServerWindow* window = nullptr;
EXPECT_NO_FATAL_FAILURE(SetupEventTargeting(&embed_client, &tree, &window));
tree->AddWindow(FirstRootId(tree), ClientWindowIdForWindow(tree, window));
- window->SetBounds(gfx::Rect(0, 0, 100, 100));
+ window->SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
ASSERT_TRUE(tree->GetDisplay(window));
DispatchEventWithoutAck(CreatePointerDownEvent(10, 10));
@@ -744,7 +747,7 @@ TEST_F(WindowTreeTest, ShowModalWindowWithDescendantCapture) {
ServerWindow* w1 = nullptr;
EXPECT_NO_FATAL_FAILURE(SetupEventTargeting(&embed_client, &tree, &w1));
- w1->SetBounds(gfx::Rect(10, 10, 30, 30));
+ w1->SetBounds(gfx::Rect(10, 10, 30, 30), cc::LocalFrameId());
const ServerWindow* root_window = *tree->roots().begin();
ClientWindowId root_window_id = ClientWindowIdForWindow(tree, root_window);
ClientWindowId w1_id = ClientWindowIdForWindow(tree, w1);
@@ -752,18 +755,20 @@ TEST_F(WindowTreeTest, ShowModalWindowWithDescendantCapture) {
// Create |w11| as a child of |w1| and make it visible.
ClientWindowId w11_id = BuildClientWindowId(tree, 11);
- ASSERT_TRUE(tree->NewWindow(w11_id, ServerWindow::Properties()));
+ ASSERT_TRUE(
+ tree->NewWindow(w11_id, ServerWindow::Properties(), cc::LocalFrameId()));
ServerWindow* w11 = tree->GetWindowByClientId(w11_id);
- w11->SetBounds(gfx::Rect(10, 10, 10, 10));
+ w11->SetBounds(gfx::Rect(10, 10, 10, 10), cc::LocalFrameId());
ASSERT_TRUE(tree->AddWindow(w1_id, w11_id));
ASSERT_TRUE(tree->SetWindowVisibility(w11_id, true));
// Create |w2| as a child of |root_window| and modal to |w1| and leave it
// hidden.
ClientWindowId w2_id = BuildClientWindowId(tree, 2);
- ASSERT_TRUE(tree->NewWindow(w2_id, ServerWindow::Properties()));
+ ASSERT_TRUE(
+ tree->NewWindow(w2_id, ServerWindow::Properties(), cc::LocalFrameId()));
ServerWindow* w2 = tree->GetWindowByClientId(w2_id);
- w2->SetBounds(gfx::Rect(50, 10, 10, 10));
+ w2->SetBounds(gfx::Rect(50, 10, 10, 10), cc::LocalFrameId());
ASSERT_TRUE(tree->AddWindow(root_window_id, w2_id));
ASSERT_TRUE(tree->AddTransientWindow(w1_id, w2_id));
ASSERT_TRUE(tree->SetModal(w2_id));
@@ -788,7 +793,7 @@ TEST_F(WindowTreeTest, VisibleWindowToModalWithDescendantCapture) {
ServerWindow* w1 = nullptr;
EXPECT_NO_FATAL_FAILURE(SetupEventTargeting(&embed_client, &tree, &w1));
- w1->SetBounds(gfx::Rect(10, 10, 30, 30));
+ w1->SetBounds(gfx::Rect(10, 10, 30, 30), cc::LocalFrameId());
const ServerWindow* root_window = *tree->roots().begin();
ClientWindowId root_window_id = ClientWindowIdForWindow(tree, root_window);
ClientWindowId w1_id = ClientWindowIdForWindow(tree, w1);
@@ -796,17 +801,19 @@ TEST_F(WindowTreeTest, VisibleWindowToModalWithDescendantCapture) {
// Create |w11| as a child of |w1| and make it visible.
ClientWindowId w11_id = BuildClientWindowId(tree, 11);
- ASSERT_TRUE(tree->NewWindow(w11_id, ServerWindow::Properties()));
+ ASSERT_TRUE(
+ tree->NewWindow(w11_id, ServerWindow::Properties(), cc::LocalFrameId()));
ServerWindow* w11 = tree->GetWindowByClientId(w11_id);
- w11->SetBounds(gfx::Rect(10, 10, 10, 10));
+ w11->SetBounds(gfx::Rect(10, 10, 10, 10), cc::LocalFrameId());
ASSERT_TRUE(tree->AddWindow(w1_id, w11_id));
ASSERT_TRUE(tree->SetWindowVisibility(w11_id, true));
// Create |w2| as a child of |root_window| and make it visible.
ClientWindowId w2_id = BuildClientWindowId(tree, 2);
- ASSERT_TRUE(tree->NewWindow(w2_id, ServerWindow::Properties()));
+ ASSERT_TRUE(
+ tree->NewWindow(w2_id, ServerWindow::Properties(), cc::LocalFrameId()));
ServerWindow* w2 = tree->GetWindowByClientId(w2_id);
- w2->SetBounds(gfx::Rect(50, 10, 10, 10));
+ w2->SetBounds(gfx::Rect(50, 10, 10, 10), cc::LocalFrameId());
ASSERT_TRUE(tree->AddWindow(root_window_id, w2_id));
ASSERT_TRUE(tree->SetWindowVisibility(w2_id, true));
@@ -831,7 +838,7 @@ TEST_F(WindowTreeTest, ShowModalWindowWithNonDescendantCapture) {
ServerWindow* w1 = nullptr;
EXPECT_NO_FATAL_FAILURE(SetupEventTargeting(&embed_client, &tree, &w1));
- w1->SetBounds(gfx::Rect(10, 10, 30, 30));
+ w1->SetBounds(gfx::Rect(10, 10, 30, 30), cc::LocalFrameId());
const ServerWindow* root_window = *tree->roots().begin();
ClientWindowId root_window_id = ClientWindowIdForWindow(tree, root_window);
ClientWindowId w1_id = ClientWindowIdForWindow(tree, w1);
@@ -840,18 +847,20 @@ TEST_F(WindowTreeTest, ShowModalWindowWithNonDescendantCapture) {
// Create |w2| as a child of |root_window| and modal to |w1| and leave it
// hidden..
ClientWindowId w2_id = BuildClientWindowId(tree, 2);
- ASSERT_TRUE(tree->NewWindow(w2_id, ServerWindow::Properties()));
+ ASSERT_TRUE(
+ tree->NewWindow(w2_id, ServerWindow::Properties(), cc::LocalFrameId()));
ServerWindow* w2 = tree->GetWindowByClientId(w2_id);
- w2->SetBounds(gfx::Rect(50, 10, 10, 10));
+ w2->SetBounds(gfx::Rect(50, 10, 10, 10), cc::LocalFrameId());
ASSERT_TRUE(tree->AddWindow(root_window_id, w2_id));
ASSERT_TRUE(tree->AddTransientWindow(w1_id, w2_id));
ASSERT_TRUE(tree->SetModal(w2_id));
// Create |w3| as a child of |root_window| and make it visible.
ClientWindowId w3_id = BuildClientWindowId(tree, 3);
- ASSERT_TRUE(tree->NewWindow(w3_id, ServerWindow::Properties()));
+ ASSERT_TRUE(
+ tree->NewWindow(w3_id, ServerWindow::Properties(), cc::LocalFrameId()));
ServerWindow* w3 = tree->GetWindowByClientId(w3_id);
- w3->SetBounds(gfx::Rect(70, 10, 10, 10));
+ w3->SetBounds(gfx::Rect(70, 10, 10, 10), cc::LocalFrameId());
ASSERT_TRUE(tree->AddWindow(root_window_id, w3_id));
ASSERT_TRUE(tree->SetWindowVisibility(w3_id, true));
@@ -875,7 +884,7 @@ TEST_F(WindowTreeTest, VisibleWindowToModalWithNonDescendantCapture) {
ServerWindow* w1 = nullptr;
EXPECT_NO_FATAL_FAILURE(SetupEventTargeting(&embed_client, &tree, &w1));
- w1->SetBounds(gfx::Rect(10, 10, 30, 30));
+ w1->SetBounds(gfx::Rect(10, 10, 30, 30), cc::LocalFrameId());
const ServerWindow* root_window = *tree->roots().begin();
ClientWindowId root_window_id = ClientWindowIdForWindow(tree, root_window);
ClientWindowId w1_id = ClientWindowIdForWindow(tree, w1);
@@ -883,16 +892,18 @@ TEST_F(WindowTreeTest, VisibleWindowToModalWithNonDescendantCapture) {
// Create |w2| and |w3| as children of |root_window| and make them visible.
ClientWindowId w2_id = BuildClientWindowId(tree, 2);
- ASSERT_TRUE(tree->NewWindow(w2_id, ServerWindow::Properties()));
+ ASSERT_TRUE(
+ tree->NewWindow(w2_id, ServerWindow::Properties(), cc::LocalFrameId()));
ServerWindow* w2 = tree->GetWindowByClientId(w2_id);
- w2->SetBounds(gfx::Rect(50, 10, 10, 10));
+ w2->SetBounds(gfx::Rect(50, 10, 10, 10), cc::LocalFrameId());
ASSERT_TRUE(tree->AddWindow(root_window_id, w2_id));
ASSERT_TRUE(tree->SetWindowVisibility(w2_id, true));
ClientWindowId w3_id = BuildClientWindowId(tree, 3);
- ASSERT_TRUE(tree->NewWindow(w3_id, ServerWindow::Properties()));
+ ASSERT_TRUE(
+ tree->NewWindow(w3_id, ServerWindow::Properties(), cc::LocalFrameId()));
ServerWindow* w3 = tree->GetWindowByClientId(w3_id);
- w3->SetBounds(gfx::Rect(70, 10, 10, 10));
+ w3->SetBounds(gfx::Rect(70, 10, 10, 10), cc::LocalFrameId());
ASSERT_TRUE(tree->AddWindow(root_window_id, w3_id));
ASSERT_TRUE(tree->SetWindowVisibility(w3_id, true));
@@ -916,7 +927,7 @@ TEST_F(WindowTreeTest, ShowSystemModalWindowWithCapture) {
ServerWindow* w1 = nullptr;
EXPECT_NO_FATAL_FAILURE(SetupEventTargeting(&embed_client, &tree, &w1));
- w1->SetBounds(gfx::Rect(10, 10, 10, 10));
+ w1->SetBounds(gfx::Rect(10, 10, 10, 10), cc::LocalFrameId());
const ServerWindow* root_window = *tree->roots().begin();
ClientWindowId root_window_id = ClientWindowIdForWindow(tree, root_window);
ClientWindowId w1_id = ClientWindowIdForWindow(tree, w1);
@@ -925,9 +936,10 @@ TEST_F(WindowTreeTest, ShowSystemModalWindowWithCapture) {
// Create a system modal window |w2| as a child of |root_window| and leave it
// hidden.
ClientWindowId w2_id = BuildClientWindowId(tree, 2);
- ASSERT_TRUE(tree->NewWindow(w2_id, ServerWindow::Properties()));
+ ASSERT_TRUE(
+ tree->NewWindow(w2_id, ServerWindow::Properties(), cc::LocalFrameId()));
ServerWindow* w2 = tree->GetWindowByClientId(w2_id);
- w2->SetBounds(gfx::Rect(30, 10, 10, 10));
+ w2->SetBounds(gfx::Rect(30, 10, 10, 10), cc::LocalFrameId());
ASSERT_TRUE(tree->AddWindow(root_window_id, w2_id));
ASSERT_TRUE(tree->SetModal(w2_id));
@@ -950,7 +962,7 @@ TEST_F(WindowTreeTest, VisibleWindowToSystemModalWithCapture) {
ServerWindow* w1 = nullptr;
EXPECT_NO_FATAL_FAILURE(SetupEventTargeting(&embed_client, &tree, &w1));
- w1->SetBounds(gfx::Rect(10, 10, 10, 10));
+ w1->SetBounds(gfx::Rect(10, 10, 10, 10), cc::LocalFrameId());
const ServerWindow* root_window = *tree->roots().begin();
ClientWindowId root_window_id = ClientWindowIdForWindow(tree, root_window);
ClientWindowId w1_id = ClientWindowIdForWindow(tree, w1);
@@ -958,9 +970,10 @@ TEST_F(WindowTreeTest, VisibleWindowToSystemModalWithCapture) {
// Create |w2| as a child of |root_window| and make it visible.
ClientWindowId w2_id = BuildClientWindowId(tree, 2);
- ASSERT_TRUE(tree->NewWindow(w2_id, ServerWindow::Properties()));
+ ASSERT_TRUE(
+ tree->NewWindow(w2_id, ServerWindow::Properties(), cc::LocalFrameId()));
ServerWindow* w2 = tree->GetWindowByClientId(w2_id);
- w2->SetBounds(gfx::Rect(30, 10, 10, 10));
+ w2->SetBounds(gfx::Rect(30, 10, 10, 10), cc::LocalFrameId());
ASSERT_TRUE(tree->AddWindow(root_window_id, w2_id));
ASSERT_TRUE(tree->SetWindowVisibility(w2_id, true));
@@ -983,7 +996,7 @@ TEST_F(WindowTreeTest, MoveCaptureWindowToModalParent) {
ServerWindow* w1 = nullptr;
EXPECT_NO_FATAL_FAILURE(SetupEventTargeting(&embed_client, &tree, &w1));
- w1->SetBounds(gfx::Rect(10, 10, 30, 30));
+ w1->SetBounds(gfx::Rect(10, 10, 30, 30), cc::LocalFrameId());
const ServerWindow* root_window = *tree->roots().begin();
ClientWindowId root_window_id = ClientWindowIdForWindow(tree, root_window);
ClientWindowId w1_id = ClientWindowIdForWindow(tree, w1);
@@ -991,16 +1004,18 @@ TEST_F(WindowTreeTest, MoveCaptureWindowToModalParent) {
// Create |w2| and |w3| as children of |root_window| and make them visible.
ClientWindowId w2_id = BuildClientWindowId(tree, 2);
- ASSERT_TRUE(tree->NewWindow(w2_id, ServerWindow::Properties()));
+ ASSERT_TRUE(
+ tree->NewWindow(w2_id, ServerWindow::Properties(), cc::LocalFrameId()));
ServerWindow* w2 = tree->GetWindowByClientId(w2_id);
- w2->SetBounds(gfx::Rect(50, 10, 10, 10));
+ w2->SetBounds(gfx::Rect(50, 10, 10, 10), cc::LocalFrameId());
ASSERT_TRUE(tree->AddWindow(root_window_id, w2_id));
ASSERT_TRUE(tree->SetWindowVisibility(w2_id, true));
ClientWindowId w3_id = BuildClientWindowId(tree, 3);
- ASSERT_TRUE(tree->NewWindow(w3_id, ServerWindow::Properties()));
+ ASSERT_TRUE(
+ tree->NewWindow(w3_id, ServerWindow::Properties(), cc::LocalFrameId()));
ServerWindow* w3 = tree->GetWindowByClientId(w3_id);
- w3->SetBounds(gfx::Rect(70, 10, 10, 10));
+ w3->SetBounds(gfx::Rect(70, 10, 10, 10), cc::LocalFrameId());
ASSERT_TRUE(tree->AddWindow(root_window_id, w3_id));
ASSERT_TRUE(tree->SetWindowVisibility(w3_id, true));
@@ -1103,8 +1118,8 @@ TEST_F(WindowTreeTest, ValidMoveLoopWithWM) {
// Create the window for |embed_window_id2_in_child|.
const ClientWindowId embed_window_id2 = BuildClientWindowId(wm_tree(), 2);
- EXPECT_TRUE(
- wm_tree()->NewWindow(embed_window_id2, ServerWindow::Properties()));
+ EXPECT_TRUE(wm_tree()->NewWindow(embed_window_id2, ServerWindow::Properties(),
+ cc::LocalFrameId()));
EXPECT_TRUE(wm_tree()->SetWindowVisibility(embed_window_id2, true));
EXPECT_TRUE(wm_tree()->AddWindow(FirstRootId(wm_tree()), embed_window_id2));
@@ -1148,8 +1163,8 @@ TEST_F(WindowTreeTest, MoveLoopAckOKByWM) {
// Create the window for |embed_window_id2_in_child|.
const ClientWindowId embed_window_id2 = BuildClientWindowId(wm_tree(), 2);
- EXPECT_TRUE(
- wm_tree()->NewWindow(embed_window_id2, ServerWindow::Properties()));
+ EXPECT_TRUE(wm_tree()->NewWindow(embed_window_id2, ServerWindow::Properties(),
+ cc::LocalFrameId()));
EXPECT_TRUE(wm_tree()->SetWindowVisibility(embed_window_id2, true));
EXPECT_TRUE(wm_tree()->AddWindow(FirstRootId(wm_tree()), embed_window_id2));
@@ -1203,8 +1218,8 @@ TEST_F(WindowTreeTest, WindowManagerCantMoveLoop) {
// Create the window for |embed_window_id2_in_child|.
const ClientWindowId embed_window_id2 = BuildClientWindowId(wm_tree(), 2);
- EXPECT_TRUE(
- wm_tree()->NewWindow(embed_window_id2, ServerWindow::Properties()));
+ EXPECT_TRUE(wm_tree()->NewWindow(embed_window_id2, ServerWindow::Properties(),
+ cc::LocalFrameId()));
EXPECT_TRUE(wm_tree()->SetWindowVisibility(embed_window_id2, true));
EXPECT_TRUE(wm_tree()->AddWindow(FirstRootId(wm_tree()), embed_window_id2));
@@ -1248,8 +1263,8 @@ TEST_F(WindowTreeTest, RevertWindowBoundsOnMoveLoopFailure) {
// Create the window for |embed_window_id2_in_child|.
const ClientWindowId embed_window_id2 = BuildClientWindowId(wm_tree(), 2);
- EXPECT_TRUE(
- wm_tree()->NewWindow(embed_window_id2, ServerWindow::Properties()));
+ EXPECT_TRUE(wm_tree()->NewWindow(embed_window_id2, ServerWindow::Properties(),
+ cc::LocalFrameId()));
EXPECT_TRUE(wm_tree()->SetWindowVisibility(embed_window_id2, true));
EXPECT_TRUE(wm_tree()->AddWindow(FirstRootId(wm_tree()), embed_window_id2));
@@ -1268,7 +1283,7 @@ TEST_F(WindowTreeTest, RevertWindowBoundsOnMoveLoopFailure) {
ServerWindow* server_window =
wm_tree()->GetWindowByClientId(embed_window_id2);
gfx::Rect old_bounds = server_window->bounds();
- server_window->SetBounds(gfx::Rect(10, 10, 20, 20));
+ server_window->SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
// Cancel the move loop.
const uint32_t kFirstWMChange = 1;
@@ -1323,8 +1338,8 @@ TEST_F(WindowTreeTest, CaptureNotifiesWm) {
const ClientWindowId embed_child_window_id =
BuildClientWindowId(embed_tree, 2);
- ASSERT_TRUE(
- embed_tree->NewWindow(embed_child_window_id, ServerWindow::Properties()));
+ ASSERT_TRUE(embed_tree->NewWindow(
+ embed_child_window_id, ServerWindow::Properties(), cc::LocalFrameId()));
EXPECT_TRUE(embed_tree->SetWindowVisibility(embed_child_window_id, true));
EXPECT_TRUE(
embed_tree->AddWindow(FirstRootId(embed_tree), embed_child_window_id));
@@ -1375,7 +1390,8 @@ TEST_F(WindowTreeShutdownTest, DontSendMessagesDuringShutdown) {
ASSERT_TRUE(test_binding);
WindowTree* tree = test_binding->tree();
const ClientWindowId window_id = BuildClientWindowId(tree, 2);
- ASSERT_TRUE(tree->NewWindow(window_id, ServerWindow::Properties()));
+ ASSERT_TRUE(tree->NewWindow(window_id, ServerWindow::Properties(),
+ cc::LocalFrameId()));
// Release the client so that it survices shutdown.
client = test_binding->ReleaseClient();

Powered by Google App Engine
This is Rietveld 408576698