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

Unified Diff: chrome/test/data/chromeos/virtual_keyboard/inputview/test_base.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, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/chromeos/virtual_keyboard/inputview/test_base.js
diff --git a/chrome/test/data/chromeos/virtual_keyboard/inputview/test_base.js b/chrome/test/data/chromeos/virtual_keyboard/inputview/test_base.js
index b7e13ddbff94adb88aee7e68b285df374994b70e..861b2cfbee626ef53d570b29ccc0d55c9fa575cd 100644
--- a/chrome/test/data/chromeos/virtual_keyboard/inputview/test_base.js
+++ b/chrome/test/data/chromeos/virtual_keyboard/inputview/test_base.js
@@ -10,6 +10,7 @@ var setComposition;
var DEFAULT_CONTEXT_ID = 0;
var LONGPRESS_DELAY = 1100;
+var CAPSLOCK_ID = "OsLeft";
/**
* Key alignments.
@@ -191,3 +192,26 @@ function mockLongpress(char, altKeys, selection) {
container = getActiveAltContainer();
assertFalse(!!container, "Alt key container was not hidden.");
}
+
+/**
+ * Retrieves the shift key from the current keyset.
+ * @param {Alignment} align The alignment of the shift key.
+ * @return {Object} The key.
+ */
+function getShiftKey(align) {
+ var id;
+ switch(align) {
+ case Alignment.LEFT:
+ id = 'ShiftLeft';
+ break;
+ case Alignment.RIGHT:
+ id = 'ShiftRight';
+ break;
+ default:
+ break;
+ }
+ assertTrue(!!id, "Invalid shift alignment option: " + align);
+ var shift = document.querySelector('#' + id);
+ assertTrue(!!shift, "Cannot find shift key with alignment: " + align);
+ return shift;
+}

Powered by Google App Engine
This is Rietveld 408576698