blob: a60e732847750d2f4e5971333002f5e1eba712e4 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ ModernMediaControlsEnabled=false ] -->
<html>
<head>
<title>Video controls no display with text track Test</title>
<script src=video-test.js></script>
<script src=media-file.js></script>
<script src=media-controls.js></script>
<script src=../fullscreen/full-screen-test.js></script>
<script>
var panel;
var startTest = function() {
findMediaElement();
waitForEvent(video, 'canplay', oncanplay);
video.src = findMediaFile('video', 'content/test');
};
var oncanplay = function() {
panel = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-panel");
consoleWrite("");
consoleWrite("** Video controls should not be shown **");
testExpected("panel", null, "==");
waitForEvent(video, 'webkitfullscreenchange', onfullscreenchange);
runWithKeyDown(function(){ video.webkitRequestFullscreen(); })
};
var onfullscreenchange = function() {
panel = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-panel");
consoleWrite("");
consoleWrite("** Video controls should be shown on fullscreen **");
testExpected("panel.style['display']", 'none', "!=");
endTest();
};
</script>
</head>
<body onload="startTest()">
Tests that video controls are not shown for videos with a text track when the controls attribute is not present, except when fullscreen<br>
<video>
<track>
</video>
</body>
</html>