https://github.com/web-platform-tests/wpt
Raw File
Tip revision: e8c4654cef692388e68e8ded7a9316d6bd613570 authored by Darren Shen on 06 April 2018, 07:51:02 UTC
[css-typed-om] Add support for background properties.
Tip revision: e8c4654
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