3 html, body, .workspace {
7 <script src=
"../../resources/js-test.js"></script>
8 <div class=
"workspace">
9 <p id=
"description"></p>
10 <div id=
"console"></div>
11 <li><a id=
"tab1" href=
"#"><div class=
"a">Tab1
</div></a></li>
13 <li><a id=
"tab2" href=
"#"><div class=
"a">Tab2
</div></a></li>
14 <li><a id=
"tab3" href=
"#"><div class=
"a">Tab3
</div></a></li>
15 <li><a id=
"tab4" href=
"#"><div class=
"a">Tab4
</div></a></li>
17 description("This tests that the scroll should be happened on moving the focus to out of visible area by tabbing.");
18 testRunner
.overridePreference('WebKitTabToLinksPreferenceKey', true);
20 document
.getElementById('tab1').focus();
21 shouldBe("document.activeElement.id", "'tab1'");
23 eventSender
.keyDown('\t');
24 shouldBe("document.activeElement.id", "'tab2'");
26 eventSender
.keyDown('\t');
27 shouldBe("document.activeElement.id", "'tab3'");
29 eventSender
.keyDown('\t');
30 shouldBe("document.activeElement.id", "'tab4'");
32 shouldBe("document.body.clientHeight", "document.scrollingElement.scrollHeight - window.scrollY");