Add new access object callback
[framework/web/webkit-efl.git] / LayoutTests / media / controls-right-click-on-timebar.html
1 <html>
2     <head>
3         <title>right click on timebar test</title>
4         <script src=media-controls.js></script>
5         <script src=media-file.js></script>
6         <script src=video-test.js></script>
7         <script>
8             if (window.testRunner)
9                 testRunner.dumpAsText();
10
11             function click()
12             {
13                 if (window.eventSender) {
14                     var seekCoords;
15                     try {
16                         seekCoords = mediaControlsButtonCoordinates(video, "timeline");
17                     } catch (exception) {
18                         failTest(exception.description);
19                         return;
20                     }
21                     var x = seekCoords[0];
22                     var y = seekCoords[1];
23
24                     eventSender.mouseMoveTo(x, y);
25                     eventSender.contextClick();
26                 }
27                 window.setTimeout("endTest()", 200);
28             }
29
30             function playing()
31             {
32                 window.setTimeout("click()", 100);
33             }
34
35             function seeked()
36             {
37                 failTest("Should not seek.");
38             }
39
40             function start()
41             {
42                 findMediaElement();
43                 waitForEvent('playing', playing);
44                 waitForEvent('seeked', seeked);
45                 run("video.autoplay = true");
46                 disableFullTestDetailsPrinting();
47                 runSilently("video.src = '" + findMediaFile("video", "content/test") + "'");
48                 enableFullTestDetailsPrinting();
49             }    
50         </script>
51     </head>
52
53     <body onload="start()">
54     <p>Test that right clicking on the timebar does not cause a seek.</p>
55     <video controls></video>
56     </body>
57 </html>