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

Side by Side Diff: chrome/test/data/chromeos/virtual_keyboard/end_to_end_test.js

Issue 83483004: End to End browser test for the virtual keyboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@api-tests
Patch Set: Fixed nits. Created 7 years 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 unified diff | Download patch
« no previous file with comments | « chrome/test/data/chromeos/virtual_keyboard/end_to_end_test.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2013 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
6
7 var kb = document.getElementById('keyboard');
8
9 /**
10 * Finds the character specified and types it. Assumes that the default
11 * layout is qwerty, and the default keyset is lower.
12 * @param {{string}} char The character to type.
13 */
14 var type = function(char) {
15 var keyset = kb.querySelector('#qwerty-lower');
16 var keys = Array.prototype.slice.call(keyset.querySelectorAll('kb-key'));
17 var key = keys.filter(function(key) {
18 return key.charValue == char;
19 })[0];
20 key.down({pointerId: 1});
21 key.up({pointerId: 1});
22 }
23
24 if (kb.isReady()) {
25 type('a');
26 } else {
27 kb.addKeysetChangedObserver(function() {
28 if (kb.isReady())
29 type('a');
30 });
31 }
OLDNEW
« no previous file with comments | « chrome/test/data/chromeos/virtual_keyboard/end_to_end_test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698