OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 <script src="resources/shadow-dom.js"></script> | 5 <script src="resources/shadow-dom.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <p>This tests that pressing Tab key should traverse into shadow DOM subtrees, an
d pressing Shift-Tab should reverse the order.</p> | 8 <p>This tests that pressing Tab key should traverse into shadow DOM subtrees, an
d pressing Shift-Tab should reverse the order.</p> |
9 <pre id="console"></pre> | 9 <pre id="console"></pre> |
10 <script> | 10 <script> |
11 | 11 |
12 function prepareDOMTree(parent) | 12 function prepareDOMTree(parent) |
13 { | 13 { |
14 parent.appendChild( | 14 parent.appendChild( |
15 // FIXME: Use more descriptive ids for each elements. | 15 // FIXME: Use more descriptive ids for each elements. |
16 createDOM('div', {'id': 'top-div'}, | 16 createDOM('div', {'id': 'top-div'}, |
17 createDOM('input', {'id': 'input-A-1', 'tabindex': 1}), | 17 createDOM('input', {'id': 'input-A-1', 'tabindex': 1}), |
18 createDOM('input', {'id': 'input-B-1', 'tabindex': 1}), | 18 createDOM('input', {'id': 'input-B-1', 'tabindex': 1}), |
19 createDOM('div'), // Should not be selected. | 19 createDOM('div'), // Should not be selected. |
20 createDOM('input', {'id': 'input-A-0', 'tabindex': 0}), | 20 createDOM('input', {'id': 'input-A-0', 'tabindex': 0}), |
21 createDOM('div', {'id': 'host-A', 'tabindex': -1}, | 21 createDOM('div', {'id': 'host-A', 'tabindex': -1}, |
22 createShadowRoot( | 22 createShadowRoot( |
23 createDOM('input', {'id': 'input-1', 'tabindex':
1}), | 23 createDOM('input', {'id': 'input-1', 'tabindex':
1}), |
| 24 createDOM('div', {'tabindex': 2, 'style': 'visib
ility:hidden;'}, |
| 25 createShadowRoot()), |
| 26 createDOM('input', {'tabindex': 3, 'type': 'date
', 'disabled': ''}), |
| 27 createDOM('select', {'tabindex': 4, 'multiple':
'', 'disabled': ''}), |
24 createDOM('div', {'id': 'nested-host', 'tabindex
': 30}, | 28 createDOM('div', {'id': 'nested-host', 'tabindex
': 30}, |
25 createShadowRoot( | 29 createShadowRoot( |
26 createDOM('input', {'tabindex': -1
}), | 30 createDOM('input', {'tabindex': -1
}), |
27 createDOM('input', {'id': 'input-1
5', 'tabindex': 15}), | 31 createDOM('input', {'id': 'input-1
5', 'tabindex': 15}), |
28 createDOM('input', {'id': 'input-2
5', 'tabindex': 25}))), | 32 createDOM('input', {'id': 'input-2
5', 'tabindex': 25}))), |
29 createDOM('input', {'id': 'input-20', 'tabindex'
: 20}))), | 33 createDOM('input', {'id': 'input-20', 'tabindex'
: 20}))), |
30 createDOM('input', {'id': 'input-C-1', 'tabindex': 1}), | 34 createDOM('input', {'id': 'input-C-1', 'tabindex': 1}), |
31 createDOM('input', {'id': 'input-B-0', 'tabindex': 0}), | 35 createDOM('input', {'id': 'input-B-0', 'tabindex': 0}), |
32 createDOM('div', {'id': 'host-B', 'tabindex': 1}, | 36 createDOM('div', {'id': 'host-B', 'tabindex': 1}, |
33 createShadowRoot( | 37 createShadowRoot( |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 testFocusNavigationBackward(elementsInFocusNavigationOrder); | 138 testFocusNavigationBackward(elementsInFocusNavigationOrder); |
135 | 139 |
136 debug('Test finished.'); | 140 debug('Test finished.'); |
137 } | 141 } |
138 | 142 |
139 test(); | 143 test(); |
140 | 144 |
141 </script> | 145 </script> |
142 </body> | 146 </body> |
143 </html> | 147 </html> |
OLD | NEW |