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 bc1931ade7f58ae24ce10083bd10e0a747eba39c..848367167015e255df4317d433e396851cd02dc9 100644 |
--- a/ui/views/controls/button/custom_button_unittest.cc |
+++ b/ui/views/controls/button/custom_button_unittest.cc |
@@ -5,6 +5,9 @@ |
#include "ui/views/controls/button/custom_button.h" |
#include "testing/gtest/include/gtest/gtest.h" |
+#include "ui/aura/test/test_cursor_client.h" |
+#include "ui/aura/window.h" |
+#include "ui/aura/window_event_dispatcher.h" |
#include "ui/base/layout.h" |
#include "ui/gfx/screen.h" |
#include "ui/views/controls/button/checkbox.h" |
@@ -16,12 +19,6 @@ |
#include "ui/views/controls/textfield/textfield.h" |
#include "ui/views/test/views_test_base.h" |
-#if defined(USE_AURA) |
-#include "ui/aura/test/test_cursor_client.h" |
-#include "ui/aura/window.h" |
-#include "ui/aura/window_event_dispatcher.h" |
-#endif |
- |
namespace views { |
namespace { |
@@ -38,7 +35,6 @@ class TestCustomButton : public CustomButton { |
DISALLOW_COPY_AND_ASSIGN(TestCustomButton); |
}; |
-#if defined(USE_AURA) |
void PerformGesture(CustomButton* button, ui::EventType event_type) { |
ui::GestureEventDetails gesture_details(event_type, 0, 0); |
base::TimeDelta time_stamp = base::TimeDelta::FromMicroseconds(0); |
@@ -46,7 +42,6 @@ void PerformGesture(CustomButton* button, ui::EventType event_type) { |
gesture_details, 1); |
button->OnGestureEvent(&gesture_event); |
} |
-#endif // USE_AURA |
} // namespace |
@@ -63,10 +58,8 @@ TEST_F(CustomButtonTest, HoverStateOnVisibilityChange) { |
widget->Init(params); |
widget->Show(); |
-#if defined(USE_AURA) |
aura::test::TestCursorClient cursor_client( |
widget->GetNativeView()->GetRootWindow()); |
-#endif |
// Position the widget in a way so that it is under the cursor. |
gfx::Point cursor = gfx::Screen::GetScreenFor( |
@@ -101,7 +94,6 @@ TEST_F(CustomButtonTest, HoverStateOnVisibilityChange) { |
button->SetVisible(true); |
EXPECT_EQ(CustomButton::STATE_HOVERED, button->state()); |
-#if defined(USE_AURA) |
// In Aura views, no new hover effects are invoked if mouse events |
// are disabled. |
cursor_client.DisableMouseEvents(); |
@@ -117,10 +109,8 @@ TEST_F(CustomButtonTest, HoverStateOnVisibilityChange) { |
button->SetVisible(true); |
EXPECT_EQ(CustomButton::STATE_NORMAL, button->state()); |
-#endif |
} |
-#if defined(USE_AURA) |
// Tests that gesture events correctly change the button state. |
TEST_F(CustomButtonTest, GestureEventsSetState) { |
// Create a widget so that the CustomButton can query the hover state |
@@ -150,8 +140,6 @@ TEST_F(CustomButtonTest, GestureEventsSetState) { |
EXPECT_EQ(CustomButton::STATE_NORMAL, button->state()); |
} |
-#endif // USE_AURA |
- |
// Make sure all subclasses of CustomButton are correctly recognized |
// as CustomButton. |
TEST_F(CustomButtonTest, AsCustomButton) { |