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

Side by Side Diff: ui/events/event_unittest.cc

Issue 24482004: events: Make platform specific events code into ui/events/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 2 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 | « ui/base/x/x11_util.cc ('k') | ui/events/win/events_win.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "ui/events/event.h" 7 #include "ui/events/event.h"
8 8
9 #if defined(USE_X11) 9 #if defined(USE_X11)
10 #include <X11/Xlib.h> 10 #include <X11/Xlib.h>
11 #include "ui/base/x/x11_util.h" 11 #include "ui/events/x/events_x_utils.h"
12 #include "ui/gfx/x/x11_types.h"
12 #endif 13 #endif
13 14
14 namespace ui { 15 namespace ui {
15 16
16 TEST(EventTest, NoNativeEvent) { 17 TEST(EventTest, NoNativeEvent) {
17 KeyEvent keyev(ET_KEY_PRESSED, VKEY_SPACE, 0, false); 18 KeyEvent keyev(ET_KEY_PRESSED, VKEY_SPACE, 0, false);
18 EXPECT_FALSE(keyev.HasNativeEvent()); 19 EXPECT_FALSE(keyev.HasNativeEvent());
19 } 20 }
20 21
21 TEST(EventTest, NativeEvent) { 22 TEST(EventTest, NativeEvent) {
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 286 }
286 { 287 {
287 KeyEvent keyev(ET_KEY_RELEASED, VKEY_MENU, EF_ALT_DOWN, false); 288 KeyEvent keyev(ET_KEY_RELEASED, VKEY_MENU, EF_ALT_DOWN, false);
288 EXPECT_EQ(EF_ALT_DOWN, keyev.flags()); 289 EXPECT_EQ(EF_ALT_DOWN, keyev.flags());
289 keyev.NormalizeFlags(); 290 keyev.NormalizeFlags();
290 EXPECT_EQ(EF_NONE, keyev.flags()); 291 EXPECT_EQ(EF_NONE, keyev.flags());
291 } 292 }
292 } 293 }
293 294
294 } // namespace ui 295 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/x/x11_util.cc ('k') | ui/events/win/events_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698