| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |