Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Unified Diff: ui/views/test/views_test_helper_mac.mm

Issue 789763002: MacViews: Implement capture using NSEvent local+global monitors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20140812-MacViews-LAYERS2-PRESQUASH
Patch Set: fix sorting Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/cocoa/cocoa_mouse_capture_unittest.mm ('k') | ui/views/views.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a50f4aa9727178184bddcc70413c4a813ec0a19a..ac8881796a7911d67de95e32c37f7060074585cb 100644
--- a/ui/views/test/views_test_helper_mac.mm
+++ b/ui/views/test/views_test_helper_mac.mm
@@ -4,6 +4,8 @@
#include "ui/views/test/views_test_helper_mac.h"
+#import <Cocoa/Cocoa.h>
+
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/views/test/event_generator_delegate_mac.h"
@@ -19,6 +21,11 @@ ViewsTestHelperMac::ViewsTestHelperMac()
: zero_duration_mode_(new ui::ScopedAnimationDurationScaleMode(
ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)) {
test::InitializeMacEventGeneratorDelegate();
+
+ // Unbundled applications (those without Info.plist) default to
+ // NSApplicationActivationPolicyProhibited, which prohibits the application
+ // obtaining key status or activating windows without user interaction.
+ [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
}
ViewsTestHelperMac::~ViewsTestHelperMac() {
« no previous file with comments | « ui/views/cocoa/cocoa_mouse_capture_unittest.mm ('k') | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698