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 2fef45ed1fed5241c241d3bfa1509d1d5e305203..10f1ed0d1d107bc5a075e3b010e91b93d01068bc 100644 |
--- a/services/ui/ws/window_tree_unittest.cc |
+++ b/services/ui/ws/window_tree_unittest.cc |
@@ -802,7 +802,7 @@ TEST_F(WindowTreeTest, ShowModalWindowWithDescendantCapture) { |
w2->SetBounds(gfx::Rect(50, 10, 10, 10)); |
ASSERT_TRUE(tree->AddWindow(root_window_id, w2_id)); |
ASSERT_TRUE(tree->AddTransientWindow(w1_id, w2_id)); |
- ASSERT_TRUE(tree->SetModalType(w2_id, MODAL_TYPE_WINDOW)); |
+ ASSERT_TRUE(tree->SetModalType(w2, MODAL_TYPE_WINDOW)); |
// Set capture to |w11|. |
DispatchEventWithoutAck(CreatePointerDownEvent(25, 25)); |
@@ -855,7 +855,7 @@ TEST_F(WindowTreeTest, VisibleWindowToModalWithDescendantCapture) { |
// Set |w2| modal to |w1|. This should release the capture as the capture is |
// set to a descendant of the modal parent. |
ASSERT_TRUE(tree->AddTransientWindow(w1_id, w2_id)); |
- ASSERT_TRUE(tree->SetModalType(w2_id, MODAL_TYPE_WINDOW)); |
+ ASSERT_TRUE(tree->SetModalType(w2, MODAL_TYPE_WINDOW)); |
EXPECT_EQ(nullptr, GetCaptureWindow(display)); |
} |
@@ -881,7 +881,7 @@ TEST_F(WindowTreeTest, ShowModalWindowWithNonDescendantCapture) { |
w2->SetBounds(gfx::Rect(50, 10, 10, 10)); |
ASSERT_TRUE(tree->AddWindow(root_window_id, w2_id)); |
ASSERT_TRUE(tree->AddTransientWindow(w1_id, w2_id)); |
- ASSERT_TRUE(tree->SetModalType(w2_id, MODAL_TYPE_WINDOW)); |
+ ASSERT_TRUE(tree->SetModalType(w2, MODAL_TYPE_WINDOW)); |
// Create |w3| as a child of |root_window| and make it visible. |
ClientWindowId w3_id = BuildClientWindowId(tree, 3); |
@@ -941,7 +941,7 @@ TEST_F(WindowTreeTest, VisibleWindowToModalWithNonDescendantCapture) { |
// Set |w2| modal to |w1|. This should not release the capture as the capture |
// is not set to a descendant of the modal parent. |
ASSERT_TRUE(tree->AddTransientWindow(w1_id, w2_id)); |
- ASSERT_TRUE(tree->SetModalType(w2_id, MODAL_TYPE_WINDOW)); |
+ ASSERT_TRUE(tree->SetModalType(w2, MODAL_TYPE_WINDOW)); |
EXPECT_EQ(w3, GetCaptureWindow(display)); |
} |
@@ -965,7 +965,7 @@ TEST_F(WindowTreeTest, ShowSystemModalWindowWithCapture) { |
ServerWindow* w2 = tree->GetWindowByClientId(w2_id); |
w2->SetBounds(gfx::Rect(30, 10, 10, 10)); |
ASSERT_TRUE(tree->AddWindow(root_window_id, w2_id)); |
- ASSERT_TRUE(tree->SetModalType(w2_id, MODAL_TYPE_SYSTEM)); |
+ ASSERT_TRUE(tree->SetModalType(w2, MODAL_TYPE_SYSTEM)); |
// Set capture to |w1|. |
DispatchEventWithoutAck(CreatePointerDownEvent(15, 15)); |
@@ -1007,7 +1007,7 @@ TEST_F(WindowTreeTest, VisibleWindowToSystemModalWithCapture) { |
AckPreviousEvent(); |
// Make |w2| modal to system. This should release capture. |
- ASSERT_TRUE(tree->SetModalType(w2_id, MODAL_TYPE_SYSTEM)); |
+ ASSERT_TRUE(tree->SetModalType(w2, MODAL_TYPE_SYSTEM)); |
EXPECT_EQ(nullptr, GetCaptureWindow(display)); |
} |
@@ -1042,7 +1042,7 @@ TEST_F(WindowTreeTest, MoveCaptureWindowToModalParent) { |
// Set |w2| modal to |w1|. |
ASSERT_TRUE(tree->AddTransientWindow(w1_id, w2_id)); |
- ASSERT_TRUE(tree->SetModalType(w2_id, MODAL_TYPE_WINDOW)); |
+ ASSERT_TRUE(tree->SetModalType(w2, MODAL_TYPE_WINDOW)); |
// Set capture to |w3|. |
DispatchEventWithoutAck(CreatePointerDownEvent(25, 25)); |