| 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 TAB focus navigation with delegatesFocus flag on shadow hosts</p> | 8 <p>This tests TAB focus navigation with delegatesFocus flag on shadow hosts</p> |
| 9 <pre id="console"></pre> | 9 <pre id="console"></pre> |
| 10 <div id="sandbox"></div> | 10 <div id="sandbox"></div> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 testFocusNavigationBackward(expectedOrder); | 116 testFocusNavigationBackward(expectedOrder); |
| 117 | 117 |
| 118 debug('(6/8) Testing tab navigation order with tabindex=-1 and delegatesFocu
s=true'); | 118 debug('(6/8) Testing tab navigation order with tabindex=-1 and delegatesFocu
s=true'); |
| 119 prepareDOMTree(sandbox, -1, true); | 119 prepareDOMTree(sandbox, -1, true); |
| 120 hostDiv = document.getElementById('host-div'); | 120 hostDiv = document.getElementById('host-div'); |
| 121 shouldBe('hostDiv.shadowRoot.delegatesFocus', 'true'); | 121 shouldBe('hostDiv.shadowRoot.delegatesFocus', 'true'); |
| 122 shouldBeEqualToString('hostDiv.getAttribute("tabindex")', '-1'); | 122 shouldBeEqualToString('hostDiv.getAttribute("tabindex")', '-1'); |
| 123 | 123 |
| 124 expectedOrder = [ | 124 expectedOrder = [ |
| 125 'input-before', | 125 'input-before', |
| 126 'host-div/inner-input', | 126 // 'host-div/inner-input', // The whole shadow tree should be skipped |
| 127 'input-after' | 127 'input-after' |
| 128 ]; | 128 ]; |
| 129 | 129 |
| 130 testFocusNavigationForward(expectedOrder); | 130 testFocusNavigationForward(expectedOrder); |
| 131 expectedOrder.reverse(); | 131 expectedOrder.reverse(); |
| 132 testFocusNavigationBackward(expectedOrder); | 132 testFocusNavigationBackward(expectedOrder); |
| 133 | 133 |
| 134 debug('(7/8) Testing tab navigation order with tabindex=1 and delegatesFocus
=false'); | 134 debug('(7/8) Testing tab navigation order with tabindex=1 and delegatesFocus
=false'); |
| 135 prepareDOMTree(sandbox, 1, false); | 135 prepareDOMTree(sandbox, 1, false); |
| 136 hostDiv = document.getElementById('host-div'); | 136 hostDiv = document.getElementById('host-div'); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 test(); | 175 test(); |
| 176 | 176 |
| 177 debug('Test finished.'); | 177 debug('Test finished.'); |
| 178 } | 178 } |
| 179 | 179 |
| 180 run_tests(); | 180 run_tests(); |
| 181 </script> | 181 </script> |
| 182 </body> | 182 </body> |
| 183 </html> | 183 </html> |
| OLD | NEW |