Git init
[framework/web/webkit-efl.git] / LayoutTests / fast / spatial-navigation / snav-media-elements.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3   <head>
4     <script src="../js/resources/js-test-pre.js"></script>
5     <script src="resources/spatial-navigation-utils.js"></script>
6     <script type="application/javascript">
7
8     var resultMap = [
9       ["Up", "start"],
10       ["Down", "v1"],
11       ["Down", "i2"],
12       ["Down", "v3"],
13       ["Down", "i4"],
14       ["Down", "v5"],
15       ["Down", "i6"],
16       ["Down", "a7"],
17       ["Down", "i8"],
18       ["Down", "end"],
19       ["Up", "i8"],
20       ["Down", "end"],
21       ["DONE", "DONE"]
22     ];
23
24     if (window.layoutTestController) {
25       layoutTestController.dumpAsText();
26       layoutTestController.setSpatialNavigationEnabled(true);
27       layoutTestController.overridePreference("WebKitTabToLinksPreferenceKey", 1);
28       layoutTestController.waitUntilDone();
29     }
30
31     function runTest()
32     {
33       // starting the test itself: get to a known place.
34       document.getElementById("start").focus();
35
36       initTest(resultMap, testCompleted);
37     }
38
39     function testCompleted()
40     {
41       if (window.layoutTestController)
42         layoutTestController.notifyDone();
43     }
44
45     window.onload = runTest;
46
47     </script>
48     <script src="js/resources/js-test-post.js"></script>
49   </head>
50
51   <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
52
53     <p>This is a link <a id="start" href="a">start of Test</a>.</p>
54     <video id="v1" controls tabindex="0" src="../../media/content/test.mp4"></video>
55
56     <p>This is a link <a id="i2" href="a">i2</a>.</p>
57     <video id="v3" controls src="../../media/content/test.mp4"></video>
58
59     <p>This is a link <a id="i4" href="a">i4</a>.</p>
60     <video id="v5" tabindex="0" src="../../media/content/test.mp4"></video>
61
62     <p>This is a link <a id="i6" href="a">i6</a>.</p>
63     <audio id="a7" controls src="../../media/content/test.wav"></audio>
64
65     <p>This is a link <a id="i8" href="a">i8</a>.</p>
66     <!-- 'a9' is not focussable: no controls attribute as well no tab index.
67     Key down from 'i8' should go to 'end'. -->
68     <audio id="a9" src="../../media/content/test.mp4"></audio> 
69
70     <p>This is a link <a id="end" href="a">End of Test</a>.</p>
71
72     <div id="console"></div>
73     <p>This tests that a media elements ie: <code>&lt;Audio&gt;</code> or <code>&lt;video&gt;</code>, without tabindex are able to be reached through keyboard access</p>
74   </body>
75 </html>