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

Side by Side Diff: ui/base/ime/chromeos/character_composer_unittest.cc

Issue 1559163002: Clean up event flags a bit: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 4 years, 11 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
« no previous file with comments | « ui/base/ime/chromeos/character_composer.cc ('k') | ui/base/ime/input_method_chromeos.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/character_composer.h" 5 #include "ui/base/ime/chromeos/character_composer.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 ExpectUnicodeKeyFiltered(VKEY_U, DomCode::US_U, 354 ExpectUnicodeKeyFiltered(VKEY_U, DomCode::US_U,
355 EF_SHIFT_DOWN | EF_CONTROL_DOWN | EF_ALT_DOWN, 0x15); 355 EF_SHIFT_DOWN | EF_CONTROL_DOWN | EF_ALT_DOWN, 0x15);
356 ExpectUnicodeKeyFiltered(VKEY_3, DomCode::DIGIT3, EF_NONE, '3'); 356 ExpectUnicodeKeyFiltered(VKEY_3, DomCode::DIGIT3, EF_NONE, '3');
357 ExpectUnicodeKeyFiltered(VKEY_0, DomCode::DIGIT0, EF_NONE, '0'); 357 ExpectUnicodeKeyFiltered(VKEY_0, DomCode::DIGIT0, EF_NONE, '0');
358 ExpectUnicodeKeyFiltered(VKEY_4, DomCode::DIGIT4, EF_NONE, '4'); 358 ExpectUnicodeKeyFiltered(VKEY_4, DomCode::DIGIT4, EF_NONE, '4');
359 ExpectUnicodeKeyFiltered(VKEY_2, DomCode::DIGIT2, EF_NONE, '2'); 359 ExpectUnicodeKeyFiltered(VKEY_2, DomCode::DIGIT2, EF_NONE, '2');
360 ExpectUnicodeKeyComposed(VKEY_SPACE, DomCode::SPACE, EF_NONE, ' ', 360 ExpectUnicodeKeyComposed(VKEY_SPACE, DomCode::SPACE, EF_NONE, ' ',
361 base::string16(1, 0x3042)); 361 base::string16(1, 0x3042));
362 362
363 // Ctrl+Shift+u (CapsLock enabled) 363 // Ctrl+Shift+u (CapsLock enabled)
364 ExpectUnicodeKeyNotFiltered( 364 ExpectUnicodeKeyNotFiltered(VKEY_U, DomCode::US_U,
365 VKEY_U, DomCode::US_U, 365 EF_SHIFT_DOWN | EF_CONTROL_DOWN | EF_CAPS_LOCK_ON,
366 EF_SHIFT_DOWN | EF_CONTROL_DOWN | EF_CAPS_LOCK_DOWN, 'u'); 366 'u');
367 } 367 }
368 368
369 TEST_F(CharacterComposerTest, CancelHexadecimalComposition) { 369 TEST_F(CharacterComposerTest, CancelHexadecimalComposition) {
370 // Cancel composition with ESC. 370 // Cancel composition with ESC.
371 ExpectUnicodeKeyFiltered(VKEY_U, DomCode::US_U, 371 ExpectUnicodeKeyFiltered(VKEY_U, DomCode::US_U,
372 EF_SHIFT_DOWN | EF_CONTROL_DOWN, 0x15); 372 EF_SHIFT_DOWN | EF_CONTROL_DOWN, 0x15);
373 ExpectUnicodeKeyFiltered(VKEY_1, DomCode::DIGIT1, 0, '1'); 373 ExpectUnicodeKeyFiltered(VKEY_1, DomCode::DIGIT1, 0, '1');
374 ExpectUnicodeKeyFiltered(VKEY_ESCAPE, DomCode::ESCAPE, EF_NONE, 0x1B); 374 ExpectUnicodeKeyFiltered(VKEY_ESCAPE, DomCode::ESCAPE, EF_NONE, 0x1B);
375 375
376 // Now we can start composition again since the last composition was 376 // Now we can start composition again since the last composition was
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 ExpectUnicodeKeyFiltered(VKEY_3, DomCode::DIGIT3, EF_NONE, '3'); 505 ExpectUnicodeKeyFiltered(VKEY_3, DomCode::DIGIT3, EF_NONE, '3');
506 ExpectUnicodeKeyFiltered(VKEY_0, DomCode::DIGIT0, EF_NONE, '0'); 506 ExpectUnicodeKeyFiltered(VKEY_0, DomCode::DIGIT0, EF_NONE, '0');
507 ExpectDeadKeyFiltered(kCombiningAcute); 507 ExpectDeadKeyFiltered(kCombiningAcute);
508 ExpectUnicodeKeyFiltered(VKEY_4, DomCode::DIGIT4, EF_NONE, '4'); 508 ExpectUnicodeKeyFiltered(VKEY_4, DomCode::DIGIT4, EF_NONE, '4');
509 ExpectUnicodeKeyFiltered(VKEY_2, DomCode::DIGIT2, EF_NONE, '2'); 509 ExpectUnicodeKeyFiltered(VKEY_2, DomCode::DIGIT2, EF_NONE, '2');
510 ExpectUnicodeKeyComposed(VKEY_SPACE, DomCode::SPACE, EF_NONE, ' ', 510 ExpectUnicodeKeyComposed(VKEY_SPACE, DomCode::SPACE, EF_NONE, ' ',
511 base::string16(1, 0x3042)); 511 base::string16(1, 0x3042));
512 } 512 }
513 513
514 } // namespace ui 514 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/chromeos/character_composer.cc ('k') | ui/base/ime/input_method_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698