chromium/third_party/blink/web_tests/media/controls/toggle-class-with-state-overlay-cast.html

<!DOCTYPE html>
<html>
<title>Test that player state is reflected in CSS classes on the overlay cast button.</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../media-controls.js"></script>
<video controls width=400></video>
<script>
async_test(t => {
  var video = document.querySelector('video');

  video.onloadedmetadata = t.step_func_done(function() {
    // Pretend we have a cast device.
    internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true);
    checkButtonNotHasClass(overlayCastButton(video), 'on');

    // Pretend we are casting.
    internals.mediaPlayerPlayingRemotelyChanged(video, true);
    checkButtonHasClass(overlayCastButton(video), 'on');
  });

  video.src = "../content/counting.ogv";
  video.play();
});
</script>
</html>