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

Unified Diff: LayoutTests/fast/events/frame-tab-focus.html

Issue 1234613004: Only execute default actions on trusted events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master_event_trusted_main3
Patch Set: Rebase Created 5 years, 5 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: LayoutTests/fast/events/frame-tab-focus.html
diff --git a/LayoutTests/fast/events/frame-tab-focus.html b/LayoutTests/fast/events/frame-tab-focus.html
index 9fc74636c39363875c9aa7c4b97e7dd8a607457a..906b897c51f827af9255a946d3a4c2015f31c4be 100644
--- a/LayoutTests/fast/events/frame-tab-focus.html
+++ b/LayoutTests/fast/events/frame-tab-focus.html
@@ -86,10 +86,14 @@ function setupWindow(win)
function dispatchTabPress(element, shiftKey, altKey)
{
- var event = document.createEvent('KeyboardEvents');
- var tabKeyIdentifier = 'U+0009';
- event.initKeyboardEvent('keydown', true, true, document.defaultView, tabKeyIdentifier, 0, false, altKey, shiftKey, false, false);
- element.dispatchEvent(event);
+ if (window.testRunner) {
+ modifiers = [];
+ if (shiftKey)
+ modifiers[0] = "shiftKey";
tkent 2015/07/22 23:15:03 modifieers.push("shiftKey") would be simpler.
dtapuska 2015/07/23 01:28:10 Done.
+ if (altKey)
+ modifiers[modifiers.length] = "altKey";
tkent 2015/07/22 23:15:03 modifiers.push("altKey") is simpler.
dtapuska 2015/07/23 01:28:10 Done.
+ eventSender.keyDown('\u0009', modifiers);
+ }
}
function test()

Powered by Google App Engine
This is Rietveld 408576698