Chromium Code Reviews| Index: ui/views/focus/focus_manager_unittest.cc |
| diff --git a/ui/views/focus/focus_manager_unittest.cc b/ui/views/focus/focus_manager_unittest.cc |
| index 792af2b472fe1f090185625ec1661de1aa22054c..09f27f35d07f076839105808dbd46c1e2311dd67 100644 |
| --- a/ui/views/focus/focus_manager_unittest.cc |
| +++ b/ui/views/focus/focus_manager_unittest.cc |
| @@ -6,6 +6,8 @@ |
| #include <vector> |
| #include "base/strings/utf_string_conversions.h" |
| +#include "ui/aura/client/focus_client.h" |
| +#include "ui/aura/window.h" |
| #include "ui/base/accelerators/accelerator.h" |
| #include "ui/events/keycodes/keyboard_codes.h" |
| #include "ui/views/accessible_pane_view.h" |
| @@ -16,21 +18,10 @@ |
| #include "ui/views/focus/widget_focus_manager.h" |
| #include "ui/views/widget/widget.h" |
| -#if defined(USE_AURA) |
| -#include "ui/aura/client/focus_client.h" |
| -#include "ui/aura/window.h" |
| -#endif |
| - |
| namespace views { |
| void FocusNativeView(gfx::NativeView view) { |
|
msw
2014/03/08 01:04:50
nit: this could be inlined for its two users.
sky
2014/03/08 01:30:28
Done.
|
| -#if defined(USE_AURA) |
| aura::client::GetFocusClient(view)->FocusWindow(view); |
| -#elif defined(OS_WIN) |
| - SetFocus(view); |
| -#else |
| -#error |
| -#endif |
| } |
| enum FocusTestEventType { |
| @@ -566,25 +557,6 @@ class FocusManagerDtorTest : public FocusManagerTest { |
| DtorTrackVector dtor_tracker_; |
| }; |
| -#if !defined(USE_AURA) |
| -TEST_F(FocusManagerDtorTest, FocusManagerDestructedLast) { |
| - // Setup views hierarchy. |
| - GetContentsView()->AddChildView(new Textfield()); |
| - GetContentsView()->AddChildView(new LabelButtonDtorTracked( |
| - base::ASCIIToUTF16("button"), &dtor_tracker_)); |
| - |
| - // Close the window. |
| - GetWidget()->Close(); |
| - RunPendingMessages(); |
| - |
| - // Test window, button and focus manager should all be destructed. |
| - ASSERT_EQ(3, static_cast<int>(dtor_tracker_.size())); |
| - |
| - // Focus manager should be the last one to destruct. |
| - ASSERT_STREQ("FocusManagerDtorTracked", dtor_tracker_[2].c_str()); |
| -} |
| -#endif |
| - |
| namespace { |
| class FocusInAboutToRequestFocusFromTabTraversalView : public View { |