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

Unified Diff: ui/file_manager/file_manager/background/js/test_util_base.js

Issue 2046143002: Send 'key' from fake keyboard events generated by file_manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix additional tests I missed 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: ui/file_manager/file_manager/background/js/test_util_base.js
diff --git a/ui/file_manager/file_manager/background/js/test_util_base.js b/ui/file_manager/file_manager/background/js/test_util_base.js
index 2e7943d1b33c08f36adbe1e287409376fdf96231..2bcb3af4a91bf0250b51a019457ef590cb526663 100644
--- a/ui/file_manager/file_manager/background/js/test_util_base.js
+++ b/ui/file_manager/file_manager/background/js/test_util_base.js
@@ -336,6 +336,7 @@ test.util.sync.fakeEvent = function(contentWindow,
* @param {Window} contentWindow Window to be tested.
* @param {?string} targetQuery Query to specify the element. If this value is
* null, key event is dispatched to active element of the document.
+ * @param {string} key DOM UI Events key value.
* @param {string} keyIdentifier Identifier of the emulated key.
* @param {boolean} ctrl Whether CTRL should be pressed, or not.
* @param {boolean} shift whether SHIFT should be pressed, or not.
@@ -344,11 +345,12 @@ test.util.sync.fakeEvent = function(contentWindow,
* @return {boolean} True if the event is sent to the target, false otherwise.
*/
test.util.sync.fakeKeyDown = function(
- contentWindow, targetQuery, keyIdentifier, ctrl, shift, alt,
+ contentWindow, targetQuery, key, keyIdentifier, ctrl, shift, alt,
opt_iframeQuery) {
var event = new KeyboardEvent('keydown',
{
bubbles: true,
+ key: key,
keyIdentifier: keyIdentifier,
ctrlKey: ctrl,
shiftKey: shift,

Powered by Google App Engine
This is Rietveld 408576698