blob: f46b8f29740ed9398d3ffdf6077e71f20a68bbfd [file] [log] [blame]
<!DOCTYPE html>
<title>Tests that the fullscreen button control is the antepenultimate media controls button visible.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="media-file.js"></script>
<script src="media-controls.js"></script>
<script src="overflow-menu.js"></script>
<video controls></video>
<script>
async_test(function(t) {
var video = document.querySelector("video");
video.src = findMediaFile("video", "content/test");
// Since this is a video, we'll have three elements visible when the width
// is 120. These three should be: play, fullscreen, overflow.
video.setAttribute("width", "120");
video.addTextTrack("captions");
video.onloadeddata = t.step_func_done(function() {
// Play button should be visible
var playButton = mediaControlsButton(video, "play-button");
assert_not_equals(getComputedStyle(playButton).display, "none");
// Full screen button should be visible
assert_true(hasFullscreenButton(video));
// Overflow menu button should be visible
var overflowMenuButton = getOverflowMenuButton(video);
assert_not_equals(getComputedStyle(overflowMenuButton).display, "none");
// Closed captions shouldn't
assert_false(isClosedCaptionsButtonVisible(video));
});
});
</script>