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

Unified Diff: chrome/test/data/chromeos/virtual_keyboard/typing_test.js

Issue 25305003: Automated tests for the shift key. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits. Created 7 years, 3 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/typing_test.js
diff --git a/chrome/test/data/chromeos/virtual_keyboard/typing_test.js b/chrome/test/data/chromeos/virtual_keyboard/typing_test.js
index 4c7b5dfff79d719575f378009447103bb16077b5..afaf5f288e39bc202b948de57629b997dfdb99bd 100644
--- a/chrome/test/data/chromeos/virtual_keyboard/typing_test.js
+++ b/chrome/test/data/chromeos/virtual_keyboard/typing_test.js
@@ -5,38 +5,6 @@
*/
/**
- * Mock typing of basic keys. Each keystroke should trigger a pair of
- * API calls to send viritual key events.
- * @param {string} label The character being typed.
- * @param {number} keyCode The legacy key code for the character.
- * @param {boolean} shiftModifier Indicates if the shift key is being
- * virtually pressed.
- * @param {number=} opt_unicode Optional unicode value for the character. Only
- * required if it cannot be directly calculated from the label.
- */
-function mockTypeCharacter(label, keyCode, shiftModifier, opt_unicode) {
- var key = findKey(label);
- assertTrue(!!key, 'Unable to find key labelled "' + label + '".');
- var unicodeValue = opt_unicode | label.charCodeAt(0);
- var send = chrome.virtualKeyboardPrivate.sendKeyEvent;
- send.addExpectation({
- type: 'keydown',
- charValue: unicodeValue,
- keyCode: keyCode,
- shiftKey: shiftModifier
- });
- send.addExpectation({
- type: 'keyup',
- charValue: unicodeValue,
- keyCode: keyCode,
- shiftKey: shiftModifier
- });
- // Fake typing the key.
- key.down();
- key.up();
-}
-
-/**
* Mocks using the longpress candidate window to enter an alternate character.
* @param {string} label The label on the key.
* @param {string} candidateLabel The alternate character being typed.

Powered by Google App Engine
This is Rietveld 408576698