https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 1b5ce4ad3817e7b7247d7ff0f76b81877fce0d89 authored by Andrew Comminos on 21 December 2018, 21:45:26 UTC
Perform flexbox child hit testing by testing all children atomically
Tip revision: 1b5ce4a
setactionhandler.html
<!DOCTYPE html>
<title>Test that setting MediaSession event handler should notify the service</title>
<script src=/resources/testharness.js></script>
<script src="/resources/testharnessreport.js"></script>
<script>

test(function(t) {
  window.navigator.mediaSession.setActionHandler("play", null);
  window.navigator.mediaSession.setActionHandler("pause", null);
  window.navigator.mediaSession.setActionHandler("previoustrack", null);
  window.navigator.mediaSession.setActionHandler("nexttrack", null);
  window.navigator.mediaSession.setActionHandler("seekbackward", null);
  window.navigator.mediaSession.setActionHandler("seekforward", null);
}, "Test that setActionHandler() can be executed for supported actions");

test(function(t) {
  assert_throws(
      new TypeError,
      _ => { window.navigator.mediaSession.setActionHandler("invalid", null); });
}, "Test that setActionHandler() throws exception for unsupported actions");

</script>
back to top