summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-hidden-iframe-zero-size.html
blob: 371c78d336e76b5569d6314024cd757476ab8249 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<html>
  <head>
    <script src="../../resources/js-test.js"></script>
    <script src="resources/spatial-navigation-utils.js"></script>
    <script type="application/javascript">

    var resultMap = [
      ["Down", "end"],
      ["DONE", "DONE"]
    ];

    if (window.testRunner) {
      testRunner.dumpAsText();
      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
      window.internals.settings.setSpatialNavigationEnabled(true);
      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>
  </head>

  <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
      <p>This is <a id="start" href="a">link_1</a>.</p>
       <br>This is <iframe id="1" width=0 height=0  src="data:text/html,
        <body>
          <a id='11' href='http://a'>b</a>
          <a id='12' href='http://a'>c</a>
          <a id='13' href='http://a'>d</a>
        </body>
        "></iframe><br> an iframe with size 0.<br>
     <p>This is <a id="end" href="a">link_2</a>.</p>
    <div id="console"></div>
    <p>This test is to test that an iframe with size 0 does not get focus, and neither do its descendants.
  </body>
</html>