upload tizen1.0 source
[framework/web/webkit-efl.git] / LayoutTests / media / video-volume-slider.html
1 <html>
2 <head>
3     <title>Test rendering of volume slider of video tag</title>
4     <script src=media-file.js></script>
5     <script src=media-controls.js></script>
6     <script>
7         var video;
8
9         function init()
10         {
11             if (window.layoutTestController)
12                 layoutTestController.waitUntilDone();
13
14             video = document.getElementsByTagName("video")[0];
15             video.src = findMediaFile("video", "content/test");
16         }
17
18         function test()
19         {
20             video.volume = 0.7;
21
22             if (window.eventSender) {
23                 var muteCoords;
24                 try {
25                     muteCoords = mediaControlsButtonCoordinates(video, "mute-button");
26                 } catch (exception) {
27                     layoutTestController.notifyDone();
28                     return;
29                 }
30                 eventSender.mouseMoveTo(muteCoords[0], muteCoords[1]);
31             }
32
33             video.addEventListener("volumechange", function() {
34                  if (window.layoutTestController)
35                      layoutTestController.notifyDone();
36             });
37         }
38     </script>
39 </head>
40 <body onload="init()">
41     Tests if the volume slider is rendererd properly. This test assumes the<br>
42     volume slider is implmented and mouse over the right bottom corner of<br>
43     video element will show the volume slider.<br>
44     <video oncanplaythrough="test()" controls></video>
45 </body>
46 </html>