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

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

Issue 2087913002: Avoid changing select element via synthesized keydown from ChromeVox test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1057240dd673b3b98b56a2940a3229c5a960df15..407de8f050115522ac9b24654dc40de9af59db52 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
@@ -89,18 +89,16 @@ ChromeVoxE2ETest.prototype = {
},
/**
- * Send a key to the page.
+ * Increment the selected index of a select control.
* @param {number} tabId Of the page.
- * @param {string} key Name of the key (e.g. ArrowDown).
* @param {string} elementQueryString
*/
- sendKeyToElement: function(tabId, key, elementQueryString) {
+ incrementSelectedIndex: function(tabId, elementQueryString) {
var code = TestUtils.extractHtmlFromCommentEncodedString(function() {/*!
- var target = document.body.querySelector('$1');
+ var target = document.body.querySelector('$0');
target.focus();
- var evt = new KeyboardEvent('keydown', {key: '$0'});
- document.activeElement.dispatchEvent(evt);
- */}, [key, elementQueryString]);
+ target.selectedIndex++;
+ */}, [elementQueryString]);
chrome.tabs.executeScript(tabId, {code: code});
},
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698