blob: a726db4f23f24dcffc992fa26c8987b44495396b [file] [log] [blame]
<!DOCTYPE html>
<html lang="en-US">
<title>Media Controls: overlay cast button accessibility tests</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../media-controls.js"></script>
<video controls></video>
<script>
async_test(t => {
var video = document.querySelector('video');
video.src = '../content/test.ogv';
internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true);
video.oncanplaythrough = t.step_func_done(_ => {
var cast_button = overlayCastButton(video);
assert_equals(cast_button.getAttribute('aria-label'),
'play on remote device');
// Pretend we are casting.
internals.mediaPlayerPlayingRemotelyChanged(video, true);
assert_equals(cast_button.getAttribute('aria-label'),
'control remote playback');
});
});
</script>
</html>