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

Side by Side Diff: ui/base/ime/character_composer_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/ime/character_composer.cc ('k') | ui/base/ime/input_method_base.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 "ui/base/ime/character_composer.h" 5 #include "ui/base/ime/character_composer.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "third_party/gtk+/gdk/gdkkeysyms.h" 9 #include "third_party/gtk+/gdk/gdkkeysyms.h"
10 #include "ui/base/events.h" 10 #include "ui/base/events/event_constants.h"
11 #include "ui/base/glib/glib_integers.h" 11 #include "ui/base/glib/glib_integers.h"
12 12
13 namespace ui { 13 namespace ui {
14 14
15 namespace { 15 namespace {
16 16
17 // Expects key is not filtered and no character is composed. 17 // Expects key is not filtered and no character is composed.
18 void ExpectKeyNotFiltered(CharacterComposer* character_composer, 18 void ExpectKeyNotFiltered(CharacterComposer* character_composer,
19 uint key, 19 uint key,
20 uint flags) { 20 uint flags) {
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 GDK_KEY_dead_acute, GDK_KEY_4, GDK_KEY_2, 434 GDK_KEY_dead_acute, GDK_KEY_4, GDK_KEY_2,
435 GDK_KEY_space, 0, string16(1, 0x3042)); 435 GDK_KEY_space, 0, string16(1, 0x3042));
436 // LATIN CAPITAL LETTER U WITH ACUTE while 'U' is pressed with Ctrl+Shift. 436 // LATIN CAPITAL LETTER U WITH ACUTE while 'U' is pressed with Ctrl+Shift.
437 ExpectKeyFiltered(&character_composer, GDK_KEY_dead_acute, 0); 437 ExpectKeyFiltered(&character_composer, GDK_KEY_dead_acute, 0);
438 EXPECT_TRUE(character_composer.FilterKeyPress( 438 EXPECT_TRUE(character_composer.FilterKeyPress(
439 GDK_KEY_U, EF_SHIFT_DOWN | EF_CONTROL_DOWN)); 439 GDK_KEY_U, EF_SHIFT_DOWN | EF_CONTROL_DOWN));
440 EXPECT_EQ(string16(1, 0x00DA), character_composer.composed_character()); 440 EXPECT_EQ(string16(1, 0x00DA), character_composer.composed_character());
441 } 441 }
442 442
443 } // namespace ui 443 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/character_composer.cc ('k') | ui/base/ime/input_method_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698