Index: LayoutTests/fast/events/option-tab.html |
diff --git a/LayoutTests/fast/events/option-tab.html b/LayoutTests/fast/events/option-tab.html |
index f95ca80cae00db55ebf8217eb37de3cd5552549d..b2c5c103b68fda7c730523095472eb9da96f1cde 100644 |
--- a/LayoutTests/fast/events/option-tab.html |
+++ b/LayoutTests/fast/events/option-tab.html |
@@ -13,9 +13,10 @@ function test(fieldId) |
{ |
window.linkFocused = false; |
document.getElementById(fieldId).focus(); |
- var event = document.createEvent("KeyboardEvents"); |
- event.initKeyboardEvent("keydown", true, true, document.defaultView, "U+0009", 0, false, true, false, false, false); |
- document.getElementById(fieldId).dispatchEvent(event); |
+ |
+ if (window.eventSender) |
+ eventSender.keyDown('\u0009', ["altKey"]); |
+ |
if (window.linkFocused) |
document.getElementById("console").innerHTML += "SUCCESS: Option-tab did tab to the link (" + fieldId + ").\n"; |
else |
@@ -23,9 +24,10 @@ function test(fieldId) |
window.linkFocused = false; |
document.getElementById(fieldId).focus(); |
- event = document.createEvent("KeyboardEvents"); |
- event.initKeyboardEvent("keydown", true, true, document.defaultView, "U+0009", 0, false, false, false, false, false); |
- document.getElementById(fieldId).dispatchEvent(event); |
+ |
+ if (window.eventSender) |
+ eventSender.keyDown('\u0009', []); |
+ |
if (window.linkFocused) |
document.getElementById("console").innerHTML += "FAIL: Plain old tab did tab to the link (" + fieldId + ").\n"; |
else |