Commit f37a3c60 authored by chinsenj's avatar chinsenj Committed by Chromium LUCI CQ

cros: Enable DesksBentoTest.VisibleOnAllDesksActiveDeskRemoval.

This test was disabled by crrev.com/2616228 since the test was flaky.
This is because the RootWindowDeskSwitchAnimator fails to take a
screenshot due to the remove animation starting after the test ends.

This CL re-enables the test and fixes it by using the RemoveDesk()
fcn from desks_test_util.h instead of DesksController::RemoveDesk().
This makes the test wait for the desk remobal animation.

Test: manual
Bug: 1164381
Change-Id: I0970e333f3593c8265acbe276e85b6ab91d2ade2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2615353Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
Commit-Queue: Jeremy Chinsen <chinsenj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841631}
parent 3a204041
...@@ -3935,7 +3935,7 @@ TEST_F(DesksBentoTest, VisibleOnAllDesksGlobalZOrder) { ...@@ -3935,7 +3935,7 @@ TEST_F(DesksBentoTest, VisibleOnAllDesksGlobalZOrder) {
// Tests the behavior of windows that are visible on all desks when the active // Tests the behavior of windows that are visible on all desks when the active
// desk is removed. // desk is removed.
TEST_F(DesksBentoTest, DISABLED_VisibleOnAllDesksActiveDeskRemoval) { TEST_F(DesksBentoTest, VisibleOnAllDesksActiveDeskRemoval) {
auto* controller = DesksController::Get(); auto* controller = DesksController::Get();
NewDesk(); NewDesk();
const Desk* desk_1 = controller->desks()[0].get(); const Desk* desk_1 = controller->desks()[0].get();
...@@ -3955,7 +3955,7 @@ TEST_F(DesksBentoTest, DISABLED_VisibleOnAllDesksActiveDeskRemoval) { ...@@ -3955,7 +3955,7 @@ TEST_F(DesksBentoTest, DISABLED_VisibleOnAllDesksActiveDeskRemoval) {
// Remove the active desk. The visible on all desks windows should be on // Remove the active desk. The visible on all desks windows should be on
// |desk_2|. // |desk_2|.
controller->RemoveDesk(desk_1, DesksCreationRemovalSource::kKeyboard); RemoveDesk(desk_1);
auto desk_2_children = desk_2->GetDeskContainerForRoot(root)->children(); auto desk_2_children = desk_2->GetDeskContainerForRoot(root)->children();
EXPECT_EQ(2u, desk_2_children.size()); EXPECT_EQ(2u, desk_2_children.size());
EXPECT_TRUE(IsStackedBelow(win0.get(), win1.get())); EXPECT_TRUE(IsStackedBelow(win0.get(), win1.get()));
......
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