Video is not started even if play button has been pressed.
[framework/web/webkit-efl.git] / LayoutTests / fast / events / click-focus-anchor.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 </head>
5 <body>
6
7 <p>This test ensures that we can click to focus an a element.
8 Click on the element below.
9
10 <p>The expected result is platform specific. GTK, QT and EFL allows all links to be
11 mouse focusable.
12
13 <div id=test-container>
14 <p><a id=a1 tabindex=0 title="focusable">Anchor with tab index</a>
15 <p><a id=a2 title="not focusable">Anchor without tab index</a>
16 <p><a id=a3 href="#" title="focusable on GTK, QT and EFL">Link without tab index</a>
17 <p><a id=a4 href="#" tabindex=0 title="focusable">Link with tab index</a>
18 <p><a id=a5 href="#" contentEditable title="focusable">Link with contentEditable</a>
19 <p contentEditable><a id=a6 href="#" focusable="not focusable">Link inside contentEditable</a>
20 </div>
21
22 <p>Result
23
24 <pre id=out></pre>
25
26 <script>
27
28 function log(s)
29 {
30     var el = document.getElementById('out');
31     el.textContent += '\n' + s;
32 }
33
34 function handleFocus(e)
35 {
36     var el = e.target;
37     log(el.id + ' received focus (' + el.title + ')');
38 }
39
40 if (window.testRunner) {
41     testRunner.dumpAsText();
42 }
43
44 window.onload = function()
45 {
46     if (!window.testRunner)
47         return;
48
49     for (var i = 1; i <= 6; i++) {
50         var aElement = document.getElementById('a' + i);
51         aElement.onfocus = handleFocus;
52         eventSender.mouseMoveTo(aElement.offsetLeft + 2, aElement.offsetTop + 2);
53         eventSender.mouseDown();
54         eventSender.mouseUp();
55     }
56
57     var tc = document.getElementById('test-container');
58     tc.parentNode.removeChild(tc);
59 };
60
61 </script>
62 </body>
63 </html>