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

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

Issue 2204113002: Prevent hiding a toast during animation Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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 | « no previous file | ash/system/toast/toast_overlay.cc » ('j') | 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 f8d942b5bbbd6bb3ad8dff9359daa5ac1b38b216..ff74e16894d2f436e8000fa8ca54ccce309112b1 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 | « no previous file | ash/system/toast/toast_overlay.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698