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

Side by Side Diff: chrome/test/data/chromeos/virtual_keyboard/inputview/keyset_transition_test.js

Issue 255823004: Adds shift and capslock tests to IME Keyboard tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
OLDNEW
(Empty)
1 /*
2 * Copyright 2014 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
6
7 function testShiftHighlight() {
8 // Start in lower case.
9 mockTouchType('l');
10 var shift = getShiftKey(Alignment.LEFT);
11 generateTouchEvent(shift, 'touchstart', true, true);
12 generateTouchEvent(shift, 'touchend', true, true);
13 // Transitioned to upper case.
14 mockTouchType('A');
15 // Should revert to lower case.
16 mockTouchType('p');
17 // Should remain in lower case.
18 mockTouchType('c');
19 }
20
21 function testCapslock() {
22 // Start in lower case.
23 mockTouchType('l');
24 // To upper case. TODO(rsadam@): Only test this for the full layout.
bshe 2014/04/28 19:40:11 nit: move to TODO to next line
25 var caps = document.querySelector('#' + CAPSLOCK_ID);
26 generateTouchEvent(caps, 'touchstart', true, true);
27 generateTouchEvent(caps, 'touchend', true, true);
28 mockTouchType('A');
29 // Should persist upper case.
30 mockTouchType('P');
31 mockTouchType('C');
32 // Back to lower case.
33 generateTouchEvent(caps, 'touchstart', true, true);
34 generateTouchEvent(caps, 'touchend', true, true);
35 mockTouchType('p');
36 // Persist lower case.
37 mockTouchType('c')
38 mockTouchType('d')
39
40 // Same test, but using mouse events.
41 // Start in lower case.
42 mockMouseType('l');
43 // To upper case.
44 mockMouseTypeOnKey(caps);
45 mockMouseType('A');
46 // Should persist upper case.
47 mockMouseType('P');
48 mockMouseType('C');
49 // Back to lower case.
50 mockMouseTypeOnKey(caps);
51 mockMouseType('p');
52 // Persist lower case.
53 mockMouseType('c')
54 mockMouseType('d')
55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698