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

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: Fix chromeos 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..bf2f3d720c51c20435533e96c24356fc52da251d 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', {view: window, key: '$0'});
document.activeElement.dispatchEvent(evt);
*/}, [key, elementQueryString]);

Powered by Google App Engine
This is Rietveld 408576698