Chromium Code Reviews| 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 "chrome/test/base/interactive_test_utils_aura.h" | 5 #include "chrome/test/base/interactive_test_utils_aura.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/test/base/interactive_test_utils.h" | 8 #include "chrome/test/base/interactive_test_utils.h" |
| 9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
| 10 | 10 |
| 11 namespace ui_test_utils { | 11 namespace ui_test_utils { |
| 12 | 12 |
| 13 #if !defined(OS_WIN) | 13 #if !defined(OS_WIN) |
| 14 void HideNativeWindow(gfx::NativeWindow window) { | 14 void HideNativeWindow(gfx::NativeWindow window) { |
| 15 HideNativeWindowAura(window); | 15 HideNativeWindowAura(window); |
| 16 } | 16 } |
| 17 | 17 |
| 18 bool ShowAndFocusNativeWindow(gfx::NativeWindow window) { | 18 bool ShowAndFocusNativeWindow(gfx::NativeWindow window) { |
| 19 return ShowAndFocusNativeWindowAura(window); | 19 return ShowAndFocusNativeWindowAura(window); |
| 20 } | 20 } |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 void HideNativeWindowAura(gfx::NativeWindow window) { | 23 void HideNativeWindowAura(gfx::NativeWindow window) { |
| 24 window->Hide(); | 24 window->Hide(); |
| 25 } | 25 } |
| 26 | 26 |
| 27 bool ShowAndFocusNativeWindowAura(gfx::NativeWindow window) { | 27 bool ShowAndFocusNativeWindowAura(gfx::NativeWindow window) { |
| 28 window->Show(); | 28 window->Show(); |
| 29 return true; | 29 if (!window->IsVisible()) |
| 30 return false; | |
|
sky
2016/09/23 16:27:56
is this branch actually getting hit? If so, where?
Tom (Use chromium acct)
2016/09/23 20:34:57
No
sky
2016/09/26 01:48:17
Then can it be removed?
Tom (Use chromium acct)
2016/09/26 19:15:41
Done.
| |
| 31 window->Focus(); | |
| 32 return window->HasFocus(); | |
|
Tom (Use chromium acct)
2016/09/23 20:34:57
HasFocus() is returning false. This is because in
sky
2016/09/26 01:48:17
That is not necessarily problematic. What is the t
Tom (Use chromium acct)
2016/09/26 19:15:41
Lots of them. The example I was using to test was
| |
| 30 } | 33 } |
| 31 | 34 |
| 32 } // namespace ui_test_utils | 35 } // namespace ui_test_utils |
| OLD | NEW |