Chromium Code Reviews| Index: ui/views/test/views_test_helper_mac.mm |
| diff --git a/ui/views/test/views_test_helper_mac.mm b/ui/views/test/views_test_helper_mac.mm |
| index 8ef73d27487d7106d4acc9b2bac3b4c38eab21ea..7a7df511dfd5c2949ddc5ca282b56a2b0342db8d 100644 |
| --- a/ui/views/test/views_test_helper_mac.mm |
| +++ b/ui/views/test/views_test_helper_mac.mm |
| @@ -7,6 +7,7 @@ |
| #import <Cocoa/Cocoa.h> |
| #import "base/mac/scoped_nsautorelease_pool.h" |
| +#include "ui/base/test/scoped_fake_nswindow_focus.h" |
| #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
| #include "ui/views/test/event_generator_delegate_mac.h" |
| #include "ui/views/widget/widget.h" |
| @@ -46,4 +47,8 @@ void ViewsTestHelperMac::TearDown() { |
| DCHECK(!Widget::GetWidgetForNativeWindow(window)) << "Widget not closed."; |
| } |
| +void ViewsTestHelperMac::EnableFakeWindowActivation() { |
| + faked_focus_.reset(new ui::test::ScopedFakeNSWindowFocus); |
|
sky
2016/03/10 18:59:16
Is there a reason not to do this always? By that I
tapted
2016/03/11 09:56:19
Done (see what you think).
This has actually cros
|
| +} |
| + |
| } // namespace views |