| 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..93b4f17d501812d714b8f5194ea6d9b5d4fcd68a 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
|
| + * @enum {number}
|
| + */
|
| +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.
|
| }
|
|
|
|
|