| <!DOCTYPE html><!-- webkit-test-runner [ TabsToLinks=true SpatialNavigationEnabled=true ] --> |
| <html> |
| <!-- |
| This test ensures the correctness of a basic aspect of spatial navigation traversal |
| routines: focusable elements in scrollable containers (e.g. <div>) should be |
| accessible, including offscreen content. |
| |
| * Pre-conditions: |
| 1) DRT support for spatial navivation enable/disable. |
| |
| * Navigation steps: |
| 1) Loads this page, focus goes to "start" automatically. |
| 2) Move focus down to the visible focusable element in |
| scrollable div. |
| 3) Traverse the page through other focusable elements down the page. |
| and then back up. |
| |
| * Expected results: All focusable element in scrollable content, including |
| offscreen ones, should be accessible via spatial navigation. --> |
| <head> |
| <style> |
| :focus {outline: 1px solid black;} |
| </style> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script src="resources/spatial-navigation-utils.js"></script> |
| <script type="application/javascript"> |
| |
| var resultMap = [ |
| ["Down", "2"], |
| ["Up", "start"], |
| ["DONE", "DONE"] |
| ]; |
| |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| function runTest() |
| { |
| // starting the test itself: get to a known place. |
| document.getElementById("start").focus(); |
| |
| initTest(resultMap, testCompleted); |
| } |
| |
| function testCompleted() |
| { |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| |
| window.onload = runTest; |
| |
| </script> |
| <script src="../resources/js-test-post.js"></script> |
| </head> |
| <body> |
| <a href="#" id="start">This is an element</a><br> |
| |
| <div> |
| <a href="#" id="1"> |
| </a> |
| </div> |
| |
| <div> |
| <a href="#" id="2">This is an element</a><br> |
| </div> |
| <div id="console"></div> |
| <div>This test tests that a anchor element with only white spaces gives the correct size in ContainerNode::getRect().</div> |
| </body> |
| </html> |
| |