tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

watch-availability-promise-return-callback-id.html (760B)


      1 <!DOCTYPE html>
      2 <html>
      3  <title>
      4    Test that the Promise returned by watchAvailability() resolves with a numeric callback id
      5  </title>
      6  <script src="/resources/testharness.js"></script>
      7  <script src="/resources/testharnessreport.js"></script>
      8  <script src="/common/media.js"></script>
      9  <script>
     10    async_test(t => {
     11      let v = document.createElement("video");
     12      v.src = getVideoURI("/media/movie_5");
     13 
     14      v.remote
     15        .watchAvailability(() => {})
     16        .then(
     17          t.step_func_done(callbackId => {
     18            assert_true(typeof callbackId === "number");
     19          }),
     20          t.unreached_func()
     21        );
     22    }, "Test that the Promise returned by watchAvailability() resolves with a numeric callback id.");
     23  </script>
     24 </html>