OLD | NEW |
---|---|
(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 | |
bshe
2014/04/25 17:38:52
should mouse event also have test coverage?
rsadam
2014/04/28 19:10:04
Done.
| |
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 | |
25 // To upper case. | |
26 var caps = document.querySelector('#' + CAPSLOCK_ID); | |
bshe
2014/04/25 17:38:52
FYI: the default layout is going to switch to comp
rsadam
2014/04/28 19:10:04
Thanks for the heads up! Will add this functionali
| |
27 generateTouchEvent(caps, 'touchstart', true, true); | |
28 generateTouchEvent(caps, 'touchend', true, true); | |
29 mockTouchType('A'); | |
30 // Should persist upper case. | |
31 mockTouchType('P'); | |
32 mockTouchType('C'); | |
33 | |
34 // Back to lower case. | |
35 generateTouchEvent(caps, 'touchstart', true, true); | |
36 generateTouchEvent(caps, 'touchend', true, true); | |
37 mockTouchType('p'); | |
38 // Persist lower case. | |
39 mockTouchType('c') | |
40 mockTouchType('d') | |
41 } | |
OLD | NEW |