| 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 var event = document.createEvent('KeyboardEvents'); | 89 if (window.eventSender) { |
| 90 var tabKeyIdentifier = 'U+0009'; | 90 modifiers = []; |
| 91 event.initKeyboardEvent('keydown', true, true, document.defaultView, tabKeyI
dentifier, 0, false, altKey, shiftKey, false, false); | 91 if (shiftKey) |
| 92 element.dispatchEvent(event); | 92 modifiers.push("shiftKey"); |
| 93 if (altKey) |
| 94 modifiers.push("altKey"); |
| 95 eventSender.keyDown('\u0009', modifiers); |
| 96 } |
| 93 } | 97 } |
| 94 | 98 |
| 95 function test() | 99 function test() |
| 96 { | 100 { |
| 97 if (window.testRunner) { | 101 if (window.testRunner) { |
| 98 testRunner.dumpAsText(); | 102 testRunner.dumpAsText(); |
| 99 } | 103 } |
| 100 | 104 |
| 101 log('Tabbing forward...\n'); | 105 log('Tabbing forward...\n'); |
| 102 document.getElementById('first').focus(); | 106 document.getElementById('first').focus(); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 <iframe id="upper" src="resources/frame-tab-focus-upper.html" height="300"><
/iframe> | 150 <iframe id="upper" src="resources/frame-tab-focus-upper.html" height="300"><
/iframe> |
| 147 <iframe id="child" tabindex="4" src="resources/frame-tab-focus-child.html"><
/iframe> | 151 <iframe id="child" tabindex="4" src="resources/frame-tab-focus-child.html"><
/iframe> |
| 148 <input type="text"> | 152 <input type="text"> |
| 149 <a tabindex="1" href="#">[tabindex of one]</a> | 153 <a tabindex="1" href="#">[tabindex of one]</a> |
| 150 <a tabindex="3" href="#">[tabindex of three]</a> | 154 <a tabindex="3" href="#">[tabindex of three]</a> |
| 151 <a tabindex="2" href="#">[tabindex of two]</a> | 155 <a tabindex="2" href="#">[tabindex of two]</a> |
| 152 <a tabindex="3" href="#">[tabindex of three]</a> | 156 <a tabindex="3" href="#">[tabindex of three]</a> |
| 153 <pre id="log"></pre> | 157 <pre id="log"></pre> |
| 154 </body> | 158 </body> |
| 155 </html> | 159 </html> |
| OLD | NEW |