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

Unified Diff: ui/views/controls/button/toggle_button_unittest.cc

Issue 2835243002: views: don't look for layers in ToggleButtonTest when ripples are disabled (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/toggle_button_unittest.cc
diff --git a/ui/views/controls/button/toggle_button_unittest.cc b/ui/views/controls/button/toggle_button_unittest.cc
index 5fc72805b1382c4e05394c6ed12af8300a69cb8d..8ea3f033795b83b7a865909bb8598ae3c8c888f2 100644
--- a/ui/views/controls/button/toggle_button_unittest.cc
+++ b/ui/views/controls/button/toggle_button_unittest.cc
@@ -9,6 +9,7 @@
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/event_utils.h"
+#include "ui/views/style/platform_style.h"
#include "ui/views/test/views_test_base.h"
namespace views {
@@ -90,7 +91,11 @@ TEST_F(ToggleButtonTest, ToggleButtonDestroyed) {
button()->OnMousePressed(ui::MouseEvent(
ui::ET_MOUSE_PRESSED, center, center, ui::EventTimeForNow(),
ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON));
- EXPECT_EQ(1, counter());
+ // On platforms with no ripples, there should never be an ink drop layer.
+ if (PlatformStyle::kUseRipples)
+ EXPECT_EQ(1, counter());
+ else
+ EXPECT_EQ(0, counter());
delete button();
EXPECT_EQ(0, counter());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698