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

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

Issue 2396133005: [ash-md] Animates ToggleButton highlight to move it in sync with the thumb (Closed)
Patch Set: [ash-md] Animates ToggleButton highlight to move it in sync with the thumb (better destruction sequ… Created 4 years, 2 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
Index: ui/views/controls/button/custom_button_unittest.cc
diff --git a/ui/views/controls/button/custom_button_unittest.cc b/ui/views/controls/button/custom_button_unittest.cc
index 816d8a4d9cf94ff7d0093da7384349ce4625cea0..418ff6e1c6b28cafad81a4e267f4adb97d239460 100644
--- a/ui/views/controls/button/custom_button_unittest.cc
+++ b/ui/views/controls/button/custom_button_unittest.cc
@@ -22,6 +22,7 @@
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/button/menu_button.h"
#include "ui/views/controls/button/radio_button.h"
+#include "ui/views/controls/button/toggle_button.h"
#include "ui/views/controls/link.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/test/views_test_base.h"
@@ -136,7 +137,7 @@ class CustomButtonTest : public ViewsTestBase {
private:
std::unique_ptr<Widget> widget_;
- TestCustomButton* button_;
+ TestCustomButton* button_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(CustomButtonTest);
};
@@ -335,6 +336,9 @@ TEST_F(CustomButtonTest, AsCustomButton) {
MenuButton menu_button(text, NULL, false);
EXPECT_TRUE(CustomButton::AsCustomButton(&menu_button));
+ ToggleButton toggle_button(NULL);
+ EXPECT_TRUE(CustomButton::AsCustomButton(&toggle_button));
+
Label label;
EXPECT_FALSE(CustomButton::AsCustomButton(&label));

Powered by Google App Engine
This is Rietveld 408576698