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

Side by Side Diff: chrome/browser/ui/cocoa/event_utils_unittest.mm

Issue 10917075: events: Move some files into ui/base/events/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/cocoa/event_utils.mm ('k') | chrome/browser/ui/gtk/event_utils.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #import <objc/objc-class.h> 5 #import <objc/objc-class.h>
6 6
7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
8 #include "chrome/browser/ui/cocoa/event_utils.h" 8 #include "chrome/browser/ui/cocoa/event_utils.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/platform_test.h" 10 #include "testing/platform_test.h"
11 #include "ui/base/events.h" 11 #include "ui/base/events/event_constants.h"
12 #include "ui/base/test/cocoa_test_event_utils.h" 12 #include "ui/base/test/cocoa_test_event_utils.h"
13 13
14 // We provide a donor class with a specially modified |modifierFlags| 14 // We provide a donor class with a specially modified |modifierFlags|
15 // implementation that we swap with NSEvent's. This is because we can't create a 15 // implementation that we swap with NSEvent's. This is because we can't create a
16 // NSEvent that represents a middle click with modifiers. 16 // NSEvent that represents a middle click with modifiers.
17 @interface TestEvent : NSObject 17 @interface TestEvent : NSObject
18 @end 18 @end
19 @implementation TestEvent 19 @implementation TestEvent
20 - (NSUInteger)modifierFlags { return NSShiftKeyMask; } 20 - (NSUInteger)modifierFlags { return NSShiftKeyMask; }
21 @end 21 @end
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // Cmd + Alt + Right 125 // Cmd + Alt + Right
126 NSEvent* cmdalt = 126 NSEvent* cmdalt =
127 cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, 127 cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp,
128 NSCommandKeyMask | 128 NSCommandKeyMask |
129 NSAlternateKeyMask); 129 NSAlternateKeyMask);
130 EXPECT_EQ(ui::EF_LEFT_MOUSE_BUTTON | ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, 130 EXPECT_EQ(ui::EF_LEFT_MOUSE_BUTTON | ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN,
131 event_utils::EventFlagsFromNSEvent(cmdalt)); 131 event_utils::EventFlagsFromNSEvent(cmdalt));
132 } 132 }
133 133
134 } // namespace 134 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/event_utils.mm ('k') | chrome/browser/ui/gtk/event_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698