blob: f4915b81dd50c199ce055c324215c40c0f26939d [file] [log] [blame]
<!DOCTYPE html>
<html lang="en-US">
<title>Media Controls: 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 = castButton(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>