Skip to content

Commit

Permalink
This patch replaces the Polymer-based virtual keyboard, with an imple…
Browse files Browse the repository at this point in the history
…mentation based on the 3rd party google-input-tools implementation for consistency with the IME/XKB-based virtual keyboards. Followup patches are required to complete the task of porting tests and removing dead code.

BUG=401729

Review URL: https://codereview.chromium.org/708893002

Cr-Commit-Position: refs/heads/master@{#304124}
  • Loading branch information
kevers authored and Commit bot committed Nov 14, 2014
1 parent 0c16691 commit c33faa9
Show file tree
Hide file tree
Showing 16 changed files with 723 additions and 979 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ const char kBaseKeyboardTestFramework[] = "virtual_keyboard_test_base.js";

const char kExtensionId[] = "mppnpdlheglhdfmldimlhpnegondlapf";

const char kVirtualKeyboardURL[] = "chrome://keyboard";
// Loading the virtual keyboard with id=none suppresses asynchronous loading of
// layout and configuration assets. This allows the javascript test code to be
// injected ahead of the keyboard initialization.
const char kVirtualKeyboardURL[] = "chrome://keyboard?id=none";

} // namespace

Expand Down Expand Up @@ -126,8 +129,7 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, DISABLED_AttributesTest) {
VirtualKeyboardBrowserTestConfig());
}

// crbug.com/387372. This test started failing at Blink r176582.
IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, DISABLED_TypingTest) {
IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, TypingTest) {
RunTest(base::FilePath(FILE_PATH_LITERAL("typing_test.js")),
VirtualKeyboardBrowserTestConfig());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,11 @@
* @param {Function} testDoneCallback The callback function on completion.
*/
function testHideKeyboard(testDoneCallback) {
var self = this;
var mockEvent = {pointerId: 1};
mockEvent.stopPropagation = function() {};
var fn = function() {
Debug('Mock tap on hide keyboard key.');
var hideKey =
$('keyboard').activeKeyset.querySelector('kb-hide-keyboard-key');
assertTrue(!!hideKey, 'Unable to find hide keyboard key.');

hideKey.down(mockEvent);
// Expect hideKeyboard to be called.
onKeyboardReady(function() {
var key = findKeyById('HideKeyboard');
mockTap(key);
chrome.virtualKeyboardPrivate.hideKeyboard.addExpectation();
// hideKeyboard in api_adapter also unlocks the keyboard.
chrome.virtualKeyboardPrivate.lockKeyboard.addExpectation(false);
hideKey.up(mockEvent);
};
onKeyboardReady('testHideKeyboard', fn, testDoneCallback);
testDoneCallback();
});
}
Loading

0 comments on commit c33faa9

Please sign in to comment.