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

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

Issue 272293002: Expand the IME test framework to test the Compact layout. (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
1 /* 1 /*
2 * Copyright 2014 The Chromium Authors. All rights reserved. 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 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 function testShiftHighlight() { 7 function testShiftHighlight() {
8 // Start in lower case. 8 // Start in lower case.
9 mockTouchType('l'); 9 mockTouchType('l');
10 var shift = getShiftKey(Alignment.LEFT); 10 var shift = getKey("leftShift");
11 generateTouchEvent(shift, 'touchstart', true, true); 11 generateTouchEvent(shift, 'touchstart', true, true);
12 generateTouchEvent(shift, 'touchend', true, true); 12 generateTouchEvent(shift, 'touchend', true, true);
13 // Transitioned to upper case. 13 // Transitioned to upper case.
14 mockTouchType('A'); 14 mockTouchType('A');
15 // Should revert to lower case. 15 // Should revert to lower case.
16 mockTouchType('p'); 16 mockTouchType('p');
17 // Should remain in lower case. 17 // Should remain in lower case.
18 mockTouchType('c'); 18 mockTouchType('c');
19 } 19 }
20 20
21 function testCapslock() { 21 function testCapslock() {
22 // Skip this test for compact layouts since they don't have capslock keys.
23 var id = getLayoutId();
24 if (id.indexOf("compact") > 0)
25 return;
26 console.error(id);
bshe 2014/05/12 13:24:27 nit: remove this console error.
rsadam 2014/05/12 20:23:46 Done.
27
22 // Start in lower case. 28 // Start in lower case.
23 mockTouchType('l'); 29 mockTouchType('l');
24 // To upper case. 30 // To upper case.
25 // TODO(rsadam@): Only test this for the full layout. 31 // TODO(rsadam@): Only test this for the full layout.
26 var caps = document.querySelector('#' + CAPSLOCK_ID); 32 var caps = getKey("capslock")
27 generateTouchEvent(caps, 'touchstart', true, true); 33 generateTouchEvent(caps, 'touchstart', true, true);
28 generateTouchEvent(caps, 'touchend', true, true); 34 generateTouchEvent(caps, 'touchend', true, true);
29 mockTouchType('A'); 35 mockTouchType('A');
30 // Should persist upper case. 36 // Should persist upper case.
31 mockTouchType('P'); 37 mockTouchType('P');
32 mockTouchType('C'); 38 mockTouchType('C');
33 // Back to lower case. 39 // Back to lower case.
34 generateTouchEvent(caps, 'touchstart', true, true); 40 generateTouchEvent(caps, 'touchstart', true, true);
35 generateTouchEvent(caps, 'touchend', true, true); 41 generateTouchEvent(caps, 'touchend', true, true);
36 mockTouchType('p'); 42 mockTouchType('p');
(...skipping 10 matching lines...) Expand all
47 // Should persist upper case. 53 // Should persist upper case.
48 mockMouseType('P'); 54 mockMouseType('P');
49 mockMouseType('C'); 55 mockMouseType('C');
50 // Back to lower case. 56 // Back to lower case.
51 mockMouseTypeOnKey(caps); 57 mockMouseTypeOnKey(caps);
52 mockMouseType('p'); 58 mockMouseType('p');
53 // Persist lower case. 59 // Persist lower case.
54 mockMouseType('c') 60 mockMouseType('c')
55 mockMouseType('d') 61 mockMouseType('d')
56 } 62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698