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

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

Issue 8576005: IME (input method editor) support for Aura, part 3 of 3: Use ui::InputMethod in ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move to ash/ime/ Created 8 years, 12 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/aura/event.cc ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ui/aura/event.h"
6 #include "testing/gtest/include/gtest/gtest.h"
7
8 #if defined(USE_X11)
9 #include <X11/Xlib.h>
10 #include "ui/base/x/x11_util.h"
11 #endif
12
13 namespace aura {
14 namespace test {
15
16 TEST(EventTest, NoNativeEvent) {
17 KeyEvent keyev(ui::ET_KEY_PRESSED, ui::VKEY_SPACE, 0);
18 EXPECT_FALSE(keyev.HasNativeEvent());
19 }
20
21 TEST(EventTest, NativeEvent) {
22 #if defined(OS_WIN)
23 MSG native_event = { NULL, WM_KEYUP, ui::VKEY_A, 0 };
24 KeyEvent keyev(native_event, false);
25 EXPECT_TRUE(keyev.HasNativeEvent());
26 #elif defined(USE_X11)
27 scoped_ptr<XEvent> native_event(new XEvent);
28 ui::InitXKeyEventForTesting(ui::ET_KEY_RELEASED,
29 ui::VKEY_A,
30 0,
31 native_event.get());
32 KeyEvent keyev(native_event.get(), false);
33 EXPECT_TRUE(keyev.HasNativeEvent());
34 #endif
35 }
36
37 } // namespace test
38 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/event.cc ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698