Drive: Add BatchableRequest subclass.
[chromium-blink-merge.git] / ui / views / test / views_test_helper_mac.mm
blobac8881796a7911d67de95e32c37f7060074585cb
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/views/test/views_test_helper_mac.h"
7 #import <Cocoa/Cocoa.h>
9 #include "ui/compositor/scoped_animation_duration_scale_mode.h"
10 #include "ui/views/test/event_generator_delegate_mac.h"
12 namespace views {
14 // static
15 ViewsTestHelper* ViewsTestHelper::Create(base::MessageLoopForUI* message_loop,
16                                          ui::ContextFactory* context_factory) {
17   return new ViewsTestHelperMac;
20 ViewsTestHelperMac::ViewsTestHelperMac()
21     : zero_duration_mode_(new ui::ScopedAnimationDurationScaleMode(
22           ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)) {
23   test::InitializeMacEventGeneratorDelegate();
25   // Unbundled applications (those without Info.plist) default to
26   // NSApplicationActivationPolicyProhibited, which prohibits the application
27   // obtaining key status or activating windows without user interaction.
28   [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
31 ViewsTestHelperMac::~ViewsTestHelperMac() {
34 }  // namespace views