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

Side by Side Diff: ui/base/x/events_x_unittest.cc

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 | « ui/base/x/events_x.cc ('k') | ui/base/x/x11_util.h » ('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 <cstring> 5 #include <cstring>
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 8
9 // Generically-named #defines from Xlib that conflict with symbols in GTest. 9 // Generically-named #defines from Xlib that conflict with symbols in GTest.
10 #undef Bool 10 #undef Bool
11 #undef None 11 #undef None
12 12
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "ui/base/events.h" 14 #include "ui/base/events/event_constants.h"
15 #include "ui/gfx/point.h" 15 #include "ui/gfx/point.h"
16 16
17 namespace ui { 17 namespace ui {
18 18
19 namespace { 19 namespace {
20 20
21 // Initializes the passed-in Xlib event. 21 // Initializes the passed-in Xlib event.
22 void InitButtonEvent(XEvent* event, 22 void InitButtonEvent(XEvent* event,
23 bool is_press, 23 bool is_press,
24 const gfx::Point& location, 24 const gfx::Point& location,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 // We should return ET_UNKNOWN for the release event instead of returning 107 // We should return ET_UNKNOWN for the release event instead of returning
108 // ET_MOUSEWHEEL; otherwise we'll scroll twice for each scrollwheel step. 108 // ET_MOUSEWHEEL; otherwise we'll scroll twice for each scrollwheel step.
109 InitButtonEvent(&event, false, location, 4, 0); 109 InitButtonEvent(&event, false, location, 4, 0);
110 EXPECT_EQ(ui::ET_UNKNOWN, ui::EventTypeFromNative(&event)); 110 EXPECT_EQ(ui::ET_UNKNOWN, ui::EventTypeFromNative(&event));
111 111
112 // TODO(derat): Test XInput code. 112 // TODO(derat): Test XInput code.
113 } 113 }
114 114
115 } // namespace ui 115 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/x/events_x.cc ('k') | ui/base/x/x11_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698