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

Unified Diff: third_party/WebKit/Source/devtools/front_end/Tests.js

Issue 2033403005: Eradicate keyIndentifier from devtools/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call KeyCodeToKeyIdentifier for unhandle key events 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: third_party/WebKit/Source/devtools/front_end/Tests.js
diff --git a/third_party/WebKit/Source/devtools/front_end/Tests.js b/third_party/WebKit/Source/devtools/front_end/Tests.js
index 0de240f6c317048ee1ff38d5dfa11c6eea42f39a..a8bfc3eadf8afea927e221972c71a440ec117243 100644
--- a/third_party/WebKit/Source/devtools/front_end/Tests.js
+++ b/third_party/WebKit/Source/devtools/front_end/Tests.js
@@ -1103,11 +1103,9 @@ TestSuite.prototype._waitForTargets = function(n, callback)
/**
* Key event with given key identifier.
*/
-TestSuite.createKeyEvent = function(keyIdentifier)
+TestSuite.createKeyEvent = function(key)
{
- var evt = document.createEvent("KeyboardEvent");
- evt.initKeyboardEvent("keydown", true /* can bubble */, true /* can cancel */, null /* view */, keyIdentifier, "");
- return evt;
+ return new KeyboardEvent("keydown", {bubbles: true, cancelable:true, key: key});
};
window.uiTests = new TestSuite(window.domAutomationController);

Powered by Google App Engine
This is Rietveld 408576698