Index: chrome/test/data/chromeos/virtual_keyboard/inputview/keyset_transition_test.js |
diff --git a/chrome/test/data/chromeos/virtual_keyboard/inputview/keyset_transition_test.js b/chrome/test/data/chromeos/virtual_keyboard/inputview/keyset_transition_test.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4c77ab372d30cadcfa82eded7a0a6a2d3e6c1a18 |
--- /dev/null |
+++ b/chrome/test/data/chromeos/virtual_keyboard/inputview/keyset_transition_test.js |
@@ -0,0 +1,41 @@ |
+/* |
+ * Copyright 2014 The Chromium Authors. All rights reserved. |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
bshe
2014/04/25 17:38:52
should mouse event also have test coverage?
rsadam
2014/04/28 19:10:04
Done.
|
+function testShiftHighlight() { |
+ // Start in lower case. |
+ mockTouchType('l'); |
+ var shift = getShiftKey(Alignment.LEFT); |
+ generateTouchEvent(shift, 'touchstart', true, true); |
+ generateTouchEvent(shift, 'touchend', true, true); |
+ // Transitioned to upper case. |
+ mockTouchType('A'); |
+ // Should revert to lower case. |
+ mockTouchType('p'); |
+ // Should remain in lower case. |
+ mockTouchType('c'); |
+} |
+ |
+function testCapslock() { |
+ // Start in lower case. |
+ mockTouchType('l'); |
+ |
+ // To upper case. |
+ 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
|
+ generateTouchEvent(caps, 'touchstart', true, true); |
+ generateTouchEvent(caps, 'touchend', true, true); |
+ mockTouchType('A'); |
+ // Should persist upper case. |
+ mockTouchType('P'); |
+ mockTouchType('C'); |
+ |
+ // Back to lower case. |
+ generateTouchEvent(caps, 'touchstart', true, true); |
+ generateTouchEvent(caps, 'touchend', true, true); |
+ mockTouchType('p'); |
+ // Persist lower case. |
+ mockTouchType('c') |
+ mockTouchType('d') |
+} |