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

Unified Diff: ui/views/animation/ink_drop_impl_unittest.cc

Issue 2487723003: [ash-md] Fixed crash when DEACTIVATING a focused ink drop button. (Closed)
Patch Set: Created 4 years, 1 month 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 | « ui/views/animation/ink_drop_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/ink_drop_impl_unittest.cc
diff --git a/ui/views/animation/ink_drop_impl_unittest.cc b/ui/views/animation/ink_drop_impl_unittest.cc
index a93fd64b07e43e8cbaa433328bdf860dbcd4734d..e7717daae826aedcfdc03a715e1fe81f961f0073 100644
--- a/ui/views/animation/ink_drop_impl_unittest.cc
+++ b/ui/views/animation/ink_drop_impl_unittest.cc
@@ -478,6 +478,17 @@ TEST_P(InkDropImplHideAutoHighlightTest,
EXPECT_TRUE(test_api()->ShouldHighlight());
}
+// Verifies there is no crash when animations are started during the destruction
+// of the InkDropRipple. See https://crbug.com/663335.
tdanderson 2016/11/08 18:59:14 Thanks for adding a test
+TEST_P(InkDropImplHideAutoHighlightTest, NoCrashDuringRippleTearDown) {
+ ink_drop()->SetShowHighlightOnFocus(true);
+ ink_drop()->SetFocused(true);
+ ink_drop()->AnimateToState(InkDropState::ACTIVATED);
+ ink_drop()->AnimateToState(InkDropState::DEACTIVATED);
+ ink_drop()->AnimateToState(InkDropState::DEACTIVATED);
+ DestroyInkDrop();
+}
+
////////////////////////////////////////////////////////////////////////////////
//
// InkDropImpl::AutoHighlightMode::SHOW_ON_RIPPLE specific tests
« no previous file with comments | « ui/views/animation/ink_drop_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698