| 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="../fast/dom/shadow/resources/shadow-dom.js"></script> | 5 <script src="../fast/dom/shadow/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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 function test5(mode) { | 107 function test5(mode) { |
| 108 debug('(5/8) Testing tab navigation order with tabindex=-1 and delegatesFocu
s=false'); | 108 debug('(5/8) Testing tab navigation order with tabindex=-1 and delegatesFocu
s=false'); |
| 109 prepareDOMTree(sandbox, mode, -1, false); | 109 prepareDOMTree(sandbox, mode, -1, false); |
| 110 hostDiv = document.getElementById('host-div'); | 110 hostDiv = document.getElementById('host-div'); |
| 111 shouldBe('window.internals.shadowRoot(hostDiv).delegatesFocus', 'false'); | 111 shouldBe('window.internals.shadowRoot(hostDiv).delegatesFocus', 'false'); |
| 112 shouldBeEqualToString('hostDiv.getAttribute("tabindex")', '-1'); | 112 shouldBeEqualToString('hostDiv.getAttribute("tabindex")', '-1'); |
| 113 | 113 |
| 114 expectedOrder = [ | 114 expectedOrder = [ |
| 115 'input-before', | 115 'input-before', |
| 116 'host-div/inner-input', | |
| 117 'input-after' | 116 'input-after' |
| 118 ]; | 117 ]; |
| 119 | 118 |
| 120 testFocusNavigationForward(expectedOrder); | 119 testFocusNavigationForward(expectedOrder); |
| 121 expectedOrder.reverse(); | 120 expectedOrder.reverse(); |
| 122 testFocusNavigationBackward(expectedOrder); | 121 testFocusNavigationBackward(expectedOrder); |
| 123 } | 122 } |
| 124 | 123 |
| 125 function test6(mode) { | 124 function test6(mode) { |
| 126 debug('(6/8) Testing tab navigation order with tabindex=-1 and delegatesFocu
s=true'); | 125 debug('(6/8) Testing tab navigation order with tabindex=-1 and delegatesFocu
s=true'); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 207 |
| 209 test(); | 208 test(); |
| 210 | 209 |
| 211 debug('Test finished.'); | 210 debug('Test finished.'); |
| 212 } | 211 } |
| 213 | 212 |
| 214 run_tests(); | 213 run_tests(); |
| 215 </script> | 214 </script> |
| 216 </body> | 215 </body> |
| 217 </html> | 216 </html> |
| OLD | NEW |