| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/controls/button/custom_button.h" | 5 #include "ui/views/controls/button/custom_button.h" |
| 6 | 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "ui/base/layout.h" | 8 #include "ui/base/layout.h" |
| 9 #include "ui/gfx/screen.h" | 9 #include "ui/gfx/screen.h" |
| 10 #include "ui/views/controls/button/checkbox.h" | 10 #include "ui/views/controls/button/checkbox.h" |
| 11 #include "ui/views/controls/button/image_button.h" | 11 #include "ui/views/controls/button/image_button.h" |
| 12 #include "ui/views/controls/button/menu_button.h" | 12 #include "ui/views/controls/button/menu_button.h" |
| 13 #include "ui/views/controls/button/radio_button.h" | 13 #include "ui/views/controls/button/radio_button.h" |
| 14 #include "ui/views/controls/button/text_button.h" | 14 #include "ui/views/controls/button/text_button.h" |
| 15 #include "ui/views/controls/link.h" | 15 #include "ui/views/controls/link.h" |
| 16 #include "ui/views/controls/textfield/textfield.h" | 16 #include "ui/views/controls/textfield/textfield.h" |
| 17 #include "ui/views/test/views_test_base.h" | 17 #include "ui/views/test/views_test_base.h" |
| 18 | 18 |
| 19 #if defined(USE_AURA) | 19 #if defined(USE_AURA) |
| 20 #include "ui/aura/root_window.h" | |
| 21 #include "ui/aura/test/test_cursor_client.h" | 20 #include "ui/aura/test/test_cursor_client.h" |
| 22 #include "ui/aura/window.h" | 21 #include "ui/aura/window.h" |
| 22 #include "ui/aura/window_event_dispatcher.h" |
| 23 #endif | 23 #endif |
| 24 | 24 |
| 25 namespace views { | 25 namespace views { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 class TestCustomButton : public CustomButton { | 29 class TestCustomButton : public CustomButton { |
| 30 public: | 30 public: |
| 31 explicit TestCustomButton(ButtonListener* listener) | 31 explicit TestCustomButton(ButtonListener* listener) |
| 32 : CustomButton(listener) { | 32 : CustomButton(listener) { |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 EXPECT_FALSE(CustomButton::AsCustomButton(&label)); | 176 EXPECT_FALSE(CustomButton::AsCustomButton(&label)); |
| 177 | 177 |
| 178 Link link(text); | 178 Link link(text); |
| 179 EXPECT_FALSE(CustomButton::AsCustomButton(&link)); | 179 EXPECT_FALSE(CustomButton::AsCustomButton(&link)); |
| 180 | 180 |
| 181 Textfield textfield; | 181 Textfield textfield; |
| 182 EXPECT_FALSE(CustomButton::AsCustomButton(&textfield)); | 182 EXPECT_FALSE(CustomButton::AsCustomButton(&textfield)); |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace views | 185 } // namespace views |
| OLD | NEW |