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

Unified Diff: ash/system/toast/toast_manager_unittest.cc

Issue 2150603003: Prevent hiding a toast during animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test failures Created 4 years, 5 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
« no previous file with comments | « ash/common/system/toast/toast_overlay.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/toast/toast_manager_unittest.cc
diff --git a/ash/system/toast/toast_manager_unittest.cc b/ash/system/toast/toast_manager_unittest.cc
index ed2a88292c4e299ebab434ddc46302570618006d..b4ff9b8e6822e9261edbf9d70da142579d466986 100644
--- a/ash/system/toast/toast_manager_unittest.cc
+++ b/ash/system/toast/toast_manager_unittest.cc
@@ -122,11 +122,14 @@ TEST_F(ToastManagerTest, ShowAndCloseManuallyDuringAnimation) {
EXPECT_EQ(1, GetToastSerial());
EXPECT_TRUE(GetCurrentWidget()->GetLayer()->GetAnimator()->is_animating());
- // Close it during animation.
+ // Try to close it during animation.
ClickDismissButton();
- while (GetCurrentOverlay() != nullptr)
+ while (GetCurrentWidget()->GetLayer()->GetAnimator()->is_animating())
base::RunLoop().RunUntilIdle();
+
+ // Toast isn't closed.
+ EXPECT_TRUE(GetCurrentOverlay() != nullptr);
}
TEST_F(ToastManagerTest, QueueMessage) {
« no previous file with comments | « ash/common/system/toast/toast_overlay.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698