OLD | NEW |
1 <html> | 1 <html> |
2 <style> | 2 <style> |
3 body { | 3 body { |
4 background-color: white; | 4 background-color: white; |
5 } | 5 } |
6 | 6 |
7 iframe { | 7 iframe { |
8 border: 2px solid black; | 8 border: 2px solid black; |
9 } | 9 } |
10 </style> | 10 </style> |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 win.setupWindow = setupWindow; | 80 win.setupWindow = setupWindow; |
81 win.setupBody = setupBodyFunc(win, name); | 81 win.setupBody = setupBodyFunc(win, name); |
82 | 82 |
83 win.onfocus = windowFocused(win, name); | 83 win.onfocus = windowFocused(win, name); |
84 win.onblur = windowBlurred(win, name); | 84 win.onblur = windowBlurred(win, name); |
85 } | 85 } |
86 | 86 |
87 function dispatchTabPress(element, shiftKey, altKey) | 87 function dispatchTabPress(element, shiftKey, altKey) |
88 { | 88 { |
89 if (window.eventSender) { | 89 var event = document.createEvent('KeyboardEvents'); |
90 modifiers = []; | 90 var tabKeyIdentifier = 'U+0009'; |
91 if (shiftKey) | 91 event.initKeyboardEvent('keydown', true, true, document.defaultView, tabKeyI
dentifier, 0, false, altKey, shiftKey, false, false); |
92 modifiers.push("shiftKey"); | 92 element.dispatchEvent(event); |
93 if (altKey) | |
94 modifiers.push("altKey"); | |
95 eventSender.keyDown('\u0009', modifiers); | |
96 } | |
97 } | 93 } |
98 | 94 |
99 function test() | 95 function test() |
100 { | 96 { |
101 if (window.testRunner) { | 97 if (window.testRunner) { |
102 testRunner.dumpAsText(); | 98 testRunner.dumpAsText(); |
103 } | 99 } |
104 | 100 |
105 log('Tabbing forward...\n'); | 101 log('Tabbing forward...\n'); |
106 document.getElementById('first').focus(); | 102 document.getElementById('first').focus(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 <iframe id="upper" src="resources/frame-tab-focus-upper.html" height="300"><
/iframe> | 146 <iframe id="upper" src="resources/frame-tab-focus-upper.html" height="300"><
/iframe> |
151 <iframe id="child" tabindex="4" src="resources/frame-tab-focus-child.html"><
/iframe> | 147 <iframe id="child" tabindex="4" src="resources/frame-tab-focus-child.html"><
/iframe> |
152 <input type="text"> | 148 <input type="text"> |
153 <a tabindex="1" href="#">[tabindex of one]</a> | 149 <a tabindex="1" href="#">[tabindex of one]</a> |
154 <a tabindex="3" href="#">[tabindex of three]</a> | 150 <a tabindex="3" href="#">[tabindex of three]</a> |
155 <a tabindex="2" href="#">[tabindex of two]</a> | 151 <a tabindex="2" href="#">[tabindex of two]</a> |
156 <a tabindex="3" href="#">[tabindex of three]</a> | 152 <a tabindex="3" href="#">[tabindex of three]</a> |
157 <pre id="log"></pre> | 153 <pre id="log"></pre> |
158 </body> | 154 </body> |
159 </html> | 155 </html> |
OLD | NEW |