blob: 486eb0f0594a7ee739cbcb0370f76baa3645dc6b [file] [log] [blame]
<html>
<head>
<title>Test rendering of volume slider of video tag</title>
<script src=media-file.js></script>
<script src=media-controls.js></script>
<script>
var video;
function init()
{
if (window.testRunner)
testRunner.waitUntilDone();
video = document.getElementsByTagName("video")[0];
video.src = findMediaFile("video", "content/test");
}
function test()
{
video.volume = 0.7;
if (window.eventSender) {
var muteCoords;
try {
muteCoords = mediaControlsButtonCoordinates(video, "mute-button");
} catch (exception) {
testRunner.notifyDone();
return;
}
eventSender.mouseMoveTo(muteCoords[0], muteCoords[1]);
}
video.addEventListener("volumechange", function() {
if (window.testRunner)
testRunner.notifyDone();
});
}
</script>
</head>
<body onload="init()">
Tests if the volume slider is rendererd properly. This test assumes the<br>
volume slider is implemented and mouse over the right bottom corner of<br>
video element will show the volume slider.<br>
<video oncanplaythrough="test()" controls></video>
</body>
</html>