Index: chrome/test/data/chromeos/virtual_keyboard/virtual_keyboard_test_base.js |
diff --git a/chrome/test/data/chromeos/virtual_keyboard/virtual_keyboard_test_base.js b/chrome/test/data/chromeos/virtual_keyboard/virtual_keyboard_test_base.js |
index 4e1e210f4e3b555d5a49da1974a1f37969b0e7be..5f54d00c8b73dd4f2d02324a994492d763c3c3e5 100644 |
--- a/chrome/test/data/chromeos/virtual_keyboard/virtual_keyboard_test_base.js |
+++ b/chrome/test/data/chromeos/virtual_keyboard/virtual_keyboard_test_base.js |
@@ -19,6 +19,18 @@ function Debug(message) { |
} |
/** |
+ * The enumeration of swipe directions. |
+ * @const |
+ * @type {Enum} |
kevers
2013/12/03 16:21:55
@enum {number}
rsadam
2013/12/03 16:23:48
Done.
|
+ */ |
+var SwipeDirection = { |
+ RIGHT: 0x1, |
+ LEFT: 0x2, |
+ UP: 0x4, |
+ DOWN: 0x8 |
+}; |
+ |
+/** |
* Layouts used in testing. |
* @enum {string} |
*/ |
@@ -335,6 +347,8 @@ function setUp() { |
mockController.createFunctionMock(chrome.virtualKeyboardPrivate, |
'hideKeyboard'); |
+ mockController.createFunctionMock(chrome.virtualKeyboardPrivate, |
+ 'moveCursor'); |
var validateSendCall = function(index, expected, observed) { |
// Only consider the first argument (VirtualKeyEvent) for the validation of |
@@ -361,6 +375,12 @@ function setUp() { |
// matter for the purpose of validating the call. |
}; |
+ var validateMoveCursor = function(index, expected, observed) { |
+ assertEquals(expected[0], observed[0], "Mismatched swipe directions."); |
+ assertEquals(expected[1], observed[1], "Mismatched swipe flags."); |
+ } |
+ chrome.virtualKeyboardPrivate.moveCursor.validateCall = validateMoveCursor; |
+ |
// TODO(kevers): Mock additional extension API calls as required. |
} |