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 createDOM('div', {'id': 'top-div'}, | 15 createDOM('div', {'id': 'top-div'}, |
16 createDOM('input', {'id': 'A', 'tabindex': 0}), | 16 createDOM('input', {'id': 'A', 'tabindex': 0}), |
17 createDOM('div', {'id': 'host', 'tabindex': 0}, | 17 createDOM('div', {'id': 'host', 'tabindex': 0}, |
18 createShadowRoot( | 18 createShadowRoot( |
19 createDOM('input', {'id': 'oldest--A', 'tabindex
': 0}), | 19 createDOM('input', {'id': 'oldest--A', 'tabindex
': 0}), |
20 createDOM('content', {'select': '#light-child-A'
}), | 20 createDOM('content', {'select': '#light-child-A'
}), |
21 createDOM('input', {'id': 'oldest--B', 'tabindex
': 0})), | 21 createDOM('input', {'id': 'oldest--B', 'tabindex
': 0})), |
22 createShadowRoot( | 22 createShadowRoot( |
23 createDOM('input', {'id': 'older-A', 'tabindex':
0}), | 23 createDOM('input', {'id': 'older-A', 'tabindex':
0}), |
24 createDOM('content', {'select': '#light-child-B'
}), | 24 createDOM('content', {'select': '#light-child-B'
}), |
25 createDOM('input', {'id': 'older-B', 'tabindex':
0})), | 25 createDOM('input', {'id': 'older-B', 'tabindex':
0})), |
26 createShadowRoot( | 26 createShadowRoot( |
27 createDOM('input', {'id': 'younger-A', 'tabindex
': 0}), | 27 createDOM('input', {'id': 'younger-A', 'tabindex
': 0}), |
28 createDOM('shadow', {}, | 28 createDOM('shadow', {}), |
29 createDOM('content', {})), | |
30 createDOM('input', {'id': 'younger-B', 'tabindex
': 0})), | 29 createDOM('input', {'id': 'younger-B', 'tabindex
': 0})), |
31 createDOM('input', {'id': 'light-child-A', 'tabindex
': 0}), | 30 createDOM('input', {'id': 'light-child-A', 'tabindex
': 0}), |
32 createDOM('input', {'id': 'light-child-B', 'tabindex
': 0})), | 31 createDOM('input', {'id': 'light-child-B', 'tabindex
': 0})), |
33 createDOM('input', {'id': 'B', 'tabindex': 0}))); | 32 createDOM('input', {'id': 'B', 'tabindex': 0}))); |
34 parent.offsetLeft; | 33 parent.offsetLeft; |
35 } | 34 } |
36 | 35 |
37 function test() { | 36 function test() { |
38 if (window.testRunner) | 37 if (window.testRunner) |
39 testRunner.dumpAsText(); | 38 testRunner.dumpAsText(); |
(...skipping 20 matching lines...) Expand all Loading... |
60 testFocusNavigationBackward(elementsInFocusNavigationOrder); | 59 testFocusNavigationBackward(elementsInFocusNavigationOrder); |
61 | 60 |
62 debug('Test finished.'); | 61 debug('Test finished.'); |
63 } | 62 } |
64 | 63 |
65 test(); | 64 test(); |
66 | 65 |
67 </script> | 66 </script> |
68 </body> | 67 </body> |
69 </html> | 68 </html> |
OLD | NEW |