Commit c2c79077 authored by Xiyuan Xia's avatar Xiyuan Xia Committed by Commit Bot

chromeos-mash: Fix flaky UserAddingScreenTest.AddingSeveralUsers

User adding screen does not wait for user switching animation
with Window Service (crbug.com/875111). But we are still observing
the animation and the screen is dismissed when the animation ends.
This could cause the user adding screen being dismissed unexpectedly
as shown in the single process mash browser tests. The CL fixes
the issue by not observing the animation in such case.

Bug: 891383
Change-Id: I21d8735d517f7cbd8a17c2902dd73d9f05e282cc
Reviewed-on: https://chromium-review.googlesource.com/c/1259296
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596344}
parent e1e96d4a
......@@ -590,13 +590,15 @@ void LoginDisplayHostWebUI::OnStartUserAdding() {
else
finalize_animation_type_ = ANIMATION_NONE;
// Observe the user switch animation and defer the deletion of itself only
// after the animation is finished.
MultiUserWindowManager* window_manager =
MultiUserWindowManager::GetInstance();
// MultiUserWindowManager instance might be nullptr in a unit test.
if (window_manager)
window_manager->AddObserver(this);
if (finalize_animation_type_ == ANIMATION_ADD_USER) {
// Observe the user switch animation and defer the deletion of itself only
// after the animation is finished.
MultiUserWindowManager* window_manager =
MultiUserWindowManager::GetInstance();
// MultiUserWindowManager instance might be nullptr in a unit test.
if (window_manager)
window_manager->AddObserver(this);
}
VLOG(1) << "Login WebUI >> user adding";
if (!login_window_)
......
......@@ -232,10 +232,6 @@
# Flaky tests. crbug.com/880584
-UnifiedAutoplaySettingBrowserTest.*
# This seems to timeout only on the msan bot, but I suspect it could equally
# occur on the non-msan bots. https://crbug.com/891383
-UserAddingScreenTest.AddingSeveralUsers
# Window Open API tests. https://crbug.com/815379
-WindowOpenApiTest.OpenLockedFullscreenWindow
-WindowOpenApiTest.RemoveLockedFullscreenFromWindow
......
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