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

Side by Side Diff: ui/views/widget/native_widget_mac_interactive_uitest.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 unified diff | Download patch
« no previous file with comments | « ui/views/widget/native_widget_mac.mm ('k') | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 "ui/views/widget/native_widget_mac.h" 5 #include "ui/views/widget/native_widget_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "ui/views/test/widget_test.h" 9 #include "ui/views/test/widget_test.h"
10 #include "ui/views/test/test_widget_observer.h" 10 #include "ui/views/test/test_widget_observer.h"
(...skipping 10 matching lines...) Expand all
21 class Observer; 21 class Observer;
22 22
23 NativeWidgetMacInteractiveUITest() 23 NativeWidgetMacInteractiveUITest()
24 : activationCount_(0), deactivationCount_(0) {} 24 : activationCount_(0), deactivationCount_(0) {}
25 25
26 Widget* MakeWidget() { 26 Widget* MakeWidget() {
27 return GetParam() ? CreateTopLevelFramelessPlatformWidget() 27 return GetParam() ? CreateTopLevelFramelessPlatformWidget()
28 : CreateTopLevelPlatformWidget(); 28 : CreateTopLevelPlatformWidget();
29 } 29 }
30 30
31 // Overridden form testing::Test:
32 virtual void SetUp() {
33 // Unbundled applications (those without Info.plist) default to
34 // NSApplicationActivationPolicyProhibited, which prohibits the application
35 // obtaining key status.
36 [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
37 WidgetTest::SetUp();
38 }
39
40 protected: 31 protected:
41 scoped_ptr<Observer> observer_; 32 scoped_ptr<Observer> observer_;
42 int activationCount_; 33 int activationCount_;
43 int deactivationCount_; 34 int deactivationCount_;
44 35
45 private: 36 private:
46 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMacInteractiveUITest); 37 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMacInteractiveUITest);
47 }; 38 };
48 39
49 class NativeWidgetMacInteractiveUITest::Observer : public TestWidgetObserver { 40 class NativeWidgetMacInteractiveUITest::Observer : public TestWidgetObserver {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 widget2->CloseNow(); 128 widget2->CloseNow();
138 widget->CloseNow(); 129 widget->CloseNow();
139 } 130 }
140 131
141 INSTANTIATE_TEST_CASE_P(NativeWidgetMacInteractiveUITestInstance, 132 INSTANTIATE_TEST_CASE_P(NativeWidgetMacInteractiveUITestInstance,
142 NativeWidgetMacInteractiveUITest, 133 NativeWidgetMacInteractiveUITest,
143 ::testing::Bool()); 134 ::testing::Bool());
144 135
145 } // namespace test 136 } // namespace test
146 } // namespace views 137 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_mac.mm ('k') | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698