https://github.com/web-platform-tests/wpt
Revision 94e78fddb888185d7d5d0f737c4c9b84bd638d59 authored by Mike Taylor on 30 March 2018, 21:08:48 UTC, committed by Anne van Kesteren on 09 April 2018, 08:27:28 UTC
See https://github.com/whatwg/dom/issues/625 for details.
1 parent fc7c0b7
Raw File
Tip revision: 94e78fddb888185d7d5d0f737c4c9b84bd638d59 authored by Mike Taylor on 30 March 2018, 21:08:48 UTC
Add tests for Event.srcElement
Tip revision: 94e78fd
watch-availability-initial-callback.html
<!DOCTYPE html>
<html>
<title>Test that the callback is called once watchAvailability() resolves.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/media.js"></script>
<script>
async_test(t => {
  var v = document.createElement('video');
  v.src = getVideoURI('movie_5');

  var promiseResolved = false;

  function callback(available) {
    assert_true(promiseResolved);
  }

  v.remote.watchAvailability(t.step_func_done(callback)).then(
    t.step_func(() => { promiseResolved = true; }), t.unreached_func());
}, 'Test that the callback is called once watchAvailability() resolves.');
</script>
</html>
back to top