Revert "Only store leading 13 bits of password hash."
[chromium-blink-merge.git] / chrome / test / data / chromeos / virtual_keyboard / inputview / keyset_transition_test.js
blob5c89f565fa46ea5cfd187c12b05441d6056d1871
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 */
7 function testShiftHighlightAsync(testDoneCallback) {
8 var test = function() {
9 // Start in lower case.
10 mockTouchType('l');
11 var shift = getKey("leftShift");
12 generateTouchEvent(shift, 'touchstart', true, true);
13 generateTouchEvent(shift, 'touchend', true, true);
14 // Transitioned to upper case.
15 mockTouchType('A');
16 // Should revert to lower case.
17 mockTouchType('p');
18 // Should remain in lower case.
19 mockTouchType('c');
21 RunTest(test, testDoneCallback);
24 function testCapslockAsync(testDoneCallback) {
25 // Skip this test for compact layouts since they don't have capslock keys.
26 var id = getLayoutId();
27 if (id.indexOf("compact") > 0) {
28 testDoneCallback(false);
29 return;
31 var test = function() {
32 // Start in lower case.
33 mockTouchType('l');
34 // To upper case.
35 // TODO(rsadam@): Only test this for the full layout.
36 var caps = getKey("capslock")
37 generateTouchEvent(caps, 'touchstart', true, true);
38 generateTouchEvent(caps, 'touchend', true, true);
39 mockTouchType('A');
40 // Should persist upper case.
41 mockTouchType('P');
42 mockTouchType('C');
43 // Back to lower case.
44 generateTouchEvent(caps, 'touchstart', true, true);
45 generateTouchEvent(caps, 'touchend', true, true);
46 mockTouchType('p');
47 // Persist lower case.
48 mockTouchType('c')
49 mockTouchType('d')
51 // Same test, but using mouse events.
52 // Start in lower case.
53 mockMouseType('l');
54 // To upper case.
55 mockMouseTypeOnKey(caps);
56 mockMouseType('A');
57 // Should persist upper case.
58 mockMouseType('P');
59 mockMouseType('C');
60 // Back to lower case.
61 mockMouseTypeOnKey(caps);
62 mockMouseType('p');
63 // Persist lower case.
64 mockMouseType('c')
65 mockMouseType('d')
67 RunTest(test, testDoneCallback);