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

Unified Diff: chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test_base.js

Issue 2045603002: Handle the "key" field as opposed to keyIdentifier field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove initialization of the view Created 4 years, 6 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/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test_base.js
diff --git a/chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test_base.js b/chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test_base.js
index ceb8e4ad63f922d1a083ad4059222f6b01c40fbb..92217f8ad417d2056f3c95b6dab92bace8830905 100644
--- a/chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test_base.js
+++ b/chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test_base.js
@@ -91,16 +91,14 @@ ChromeVoxE2ETest.prototype = {
/**
* Send a key to the page.
* @param {number} tabId Of the page.
- * @param {string} key Name of the key (e.g. Down).
+ * @param {string} key Name of the key (e.g. ArrowDown).
* @param {string} elementQueryString
*/
sendKeyToElement: function(tabId, key, elementQueryString) {
var code = TestUtils.extractHtmlFromCommentEncodedString(function() {/*!
var target = document.body.querySelector('$1');
target.focus();
- var evt = document.createEvent('KeyboardEvent');
- evt.initKeyboardEvent('keydown', true, true, window, '$0', 0, false,
- false, false, false);
+ var evt = new KeyboardEvent('keydown', {key: '$0'});
document.activeElement.dispatchEvent(evt);
*/}, [key, elementQueryString]);

Powered by Google App Engine
This is Rietveld 408576698