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> |
11 <script> | 11 <script> |
12 function log(msg) | 12 function log(msg) |
13 { | 13 { |
14 document.getElementById('log').appendChild(document.createTextNode(msg + '\n
')); | 14 document.getElementById('log').appendChild(document.createTextNode(msg + '\n
')); |
15 } | 15 } |
16 | 16 |
17 function windowFocused(win, name) | 17 function windowFocused(win, name) |
18 { | 18 { |
19 return function() { | 19 return function() { |
20 win.document.body.style.background = "green"; | |
21 log(name + ': window focused'); | 20 log(name + ': window focused'); |
22 } | 21 } |
23 } | 22 } |
24 | 23 |
25 function windowBlurred(win, name) | 24 function windowBlurred(win, name) |
26 { | 25 { |
27 return function() { | 26 return function() { |
28 win.document.body.style.background = "red"; | 27 win.document.body.style.background = "red"; |
29 log(name + ': window blurred'); | 28 log(name + ': window blurred'); |
30 } | 29 } |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 log('\nOption-tabbing forward...\n'); | 116 log('\nOption-tabbing forward...\n'); |
118 for (var i = 0; i < 12; ++i) { | 117 for (var i = 0; i < 12; ++i) { |
119 dispatchTabPress(document, false, true); | 118 dispatchTabPress(document, false, true); |
120 } | 119 } |
121 | 120 |
122 lastFocusedElement.blur(); | 121 lastFocusedElement.blur(); |
123 | 122 |
124 log('\nOption-tabbing backward...\n'); | 123 log('\nOption-tabbing backward...\n'); |
125 for (var i = 0; i < 12; ++i) { | 124 for (var i = 0; i < 12; ++i) { |
126 dispatchTabPress(document, true, true); | 125 dispatchTabPress(document, true, true); |
| 126 dispatchTabPress(document, true, false); |
127 } | 127 } |
128 | 128 |
129 lastFocusedElement.blur(); | 129 lastFocusedElement.blur(); |
130 | 130 |
131 log('\nTest finished\n'); | 131 log('\nTest finished\n'); |
132 } | 132 } |
133 | 133 |
134 setupWindow(window); | 134 setupWindow(window); |
135 </script> | 135 </script> |
136 <body onload="window.setupBody(); test();"> | 136 <body onload="window.setupBody(); test();"> |
(...skipping 10 matching lines...) Expand all Loading... |
147 <iframe id="upper" src="resources/frame-tab-focus-upper.html" height="300"><
/iframe> | 147 <iframe id="upper" src="resources/frame-tab-focus-upper.html" height="300"><
/iframe> |
148 <iframe id="child" tabindex="4" src="resources/frame-tab-focus-child.html"><
/iframe> | 148 <iframe id="child" tabindex="4" src="resources/frame-tab-focus-child.html"><
/iframe> |
149 <input type="text"> | 149 <input type="text"> |
150 <a tabindex="1" href="#">[tabindex of one]</a> | 150 <a tabindex="1" href="#">[tabindex of one]</a> |
151 <a tabindex="3" href="#">[tabindex of three]</a> | 151 <a tabindex="3" href="#">[tabindex of three]</a> |
152 <a tabindex="2" href="#">[tabindex of two]</a> | 152 <a tabindex="2" href="#">[tabindex of two]</a> |
153 <a tabindex="3" href="#">[tabindex of three]</a> | 153 <a tabindex="3" href="#">[tabindex of three]</a> |
154 <pre id="log"></pre> | 154 <pre id="log"></pre> |
155 </body> | 155 </body> |
156 </html> | 156 </html> |
OLD | NEW |