| 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 tabStop property on focusable elements</
p> | 8 <p>This tests TAB focus navigation with tabStop property on focusable elements</
p> |
| 9 <pre id="console"></pre> | 9 <pre id="console"></pre> |
| 10 <div id="sandbox"></div> | 10 <div id="sandbox"></div> |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 testFocusNavigationForward(expectedOrder); | 117 testFocusNavigationForward(expectedOrder); |
| 118 expectedOrder.reverse(); | 118 expectedOrder.reverse(); |
| 119 testFocusNavigationBackward(expectedOrder); | 119 testFocusNavigationBackward(expectedOrder); |
| 120 } | 120 } |
| 121 | 121 |
| 122 function testAnchor() { | 122 function testAnchor() { |
| 123 debug("Testing tabStop property on anchor without href"); | 123 debug("Testing tabStop property on anchor without href"); |
| 124 | 124 |
| 125 prepareAnchorWithShadow(sandbox); | 125 prepareAnchorWithShadow(sandbox); |
| 126 | 126 |
| 127 // This is questionable, but true; <a> without href returns 0 for tabIndex. |
| 127 anchor_host = document.getElementById("anchor-host"); | 128 anchor_host = document.getElementById("anchor-host"); |
| 128 shouldBe('anchor_host.tabStop', 'false'); | 129 shouldBe('anchor_host.tabStop', 'true'); |
| 129 | 130 |
| 130 var expectedOrder = [ | 131 var expectedOrder = [ |
| 131 'anchor-before', | 132 'anchor-before', |
| 132 'anchor-host/anchor-inner', | 133 'anchor-host/anchor-inner', |
| 133 'anchor-after' | 134 'anchor-after' |
| 134 ]; | 135 ]; |
| 135 | 136 |
| 136 testFocusNavigationForward(expectedOrder); | 137 testFocusNavigationForward(expectedOrder); |
| 137 expectedOrder.reverse(); | 138 expectedOrder.reverse(); |
| 138 testFocusNavigationBackward(expectedOrder); | 139 testFocusNavigationBackward(expectedOrder); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 190 |
| 190 testAnchor(); | 191 testAnchor(); |
| 191 | 192 |
| 192 debug('Test finished.'); | 193 debug('Test finished.'); |
| 193 } | 194 } |
| 194 | 195 |
| 195 run_tests(); | 196 run_tests(); |
| 196 </script> | 197 </script> |
| 197 </body> | 198 </body> |
| 198 </html> | 199 </html> |
| OLD | NEW |