Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / spatial-navigation / snav-iframe-no-scrollable-content.html
blob0e9178ab83650e49e4ba83ae153dc200fb413b83
1 <html>
2 <!--
3 This test ensures the basic iframe traversal correctness of Spatial Navigation
4 algorithm: focusable elements in a <iframe> should be accessible.
6 * Pre-conditions:
7 1) DRT support for SNav enable/disable.
9 * Navigation steps:
10 1) Loads this page, focus goes to "start" automatically.
11 2) Focus moves along the elements in the two iframes in the
12 Web page, eventually going to outer an southward link, but
13 going back to the iframe on the top later on.
14 -->
15 <head>
16 <script src="../../resources/js-test.js"></script>
17 <script src="resources/spatial-navigation-utils.js"></script>
18 <script type="application/javascript">
20 var resultMap = [
21 ["Down", "1"],
22 ["Down", "2"],
23 ["Down", "3"],
24 ["Down", "7"],
25 ["Down", "6"],
26 ["Down", "end"],
27 ["Up", "4"],
28 ["Right", "5"],
29 ["Right", "6"],
30 ["Up", "3"],
31 ["Right", "7"],
32 ["Up", "3"],
33 ["Up", "2"],
34 ["Up", "1"],
35 ["DONE", "DONE"]
38 if (window.testRunner) {
39 testRunner.dumpAsText();
40 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
41 window.internals.settings.setSpatialNavigationEnabled(true);
42 testRunner.waitUntilDone();
45 function runTest()
47 // starting the test itself: get to a known place.
48 document.getElementById("start").focus();
50 initTest(resultMap, testCompleted);
53 function testCompleted()
55 if (window.testRunner)
56 testRunner.notifyDone();
59 window.onload = runTest;
60 </script>
61 </head>
62 <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
63 <div><a id="start" href="a">a</a></div>
65 <iframe src="data:text/html,
66 <body>
67 <a id='1' href='a'>b</a><br>
68 <a id='2' href='a'>c</a><br>
69 <a id='3' href='a'>d</a><br>
70 <div style='margin-left:80px'>
71 <a id='7' href='a'>e</a>
72 </div>
73 </body>
74 "></iframe><br>
76 <iframe src="data:text/html,
77 <body>
78 <a id='4' href='a'>g</a>
79 <a id='5' href='a'>h</a>
80 <a id='6' href='a'>i</a>
81 </body>
82 "></iframe><br>
84 <a id="end" href="a">a</a>
85 <div id="console"></div>
86 </body>
87 </html>