blob: b0ddf547ac85468f86cd419e386df63c58cfa01a [file] [log] [blame]
<!DOCTYPE html>
<title>Overflow menu displays the correct text.</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../media-controls.js"></script>
<script src="../overflow-menu.js"></script>
<!--Padding ensures the overflow menu is visible for the tests. -->
<body style="padding-top: 200px; padding-left: 100px">
<video controls></video>
<script>
async_test(function(t) {
// Set up video
var video = document.querySelector("video");
video.src = "../content/test.ogv";
// Add captions
var track = video.addTextTrack("captions");
// Pretend we have a cast device
internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true);
video.onloadeddata = t.step_func_done(function() {
var overflowList = getOverflowList(video);
var children = overflowList.children;
// Ensure that all of the buttons are visible in the right order
for (var i = 0; i < children.length; i++) {
var child = children[i];
var innerButton = child.children[0];
// Check for text content disregarding casing. Mac OS and other OS
// have different casing styles.
assert_equals(child.textContent.toLowerCase(),
overflowMenuText[i].toLowerCase());
}
});
});
</script>
</body>