tor-browser

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

prompt-and-select-device-manual.html (1305B)


      1 <!DOCTYPE html>
      2 <html>
      3  <title>Test that the Promise returned by prompt() is resolved when user selects a device</title>
      4  <script src="/resources/testharness.js"></script>
      5  <script src="/resources/testharnessreport.js"></script>
      6  <script src="/common/media.js"></script>
      7  <script>
      8    setup({ explicit_timeout: true });
      9  </script>
     10  <body>
     11    <div id="prep">
     12      <p>Please make sure a device for remote playback is <b>available.</b></p>
     13      <button id="prompt-button-prep">Show devices</button>
     14      <button id="start-button">Start test</button>
     15    </div>
     16    <div id="pick-device" style="display: none">
     17      <p>
     18        Click the button below to prompt for a remote playback device and select
     19        one!
     20      </p>
     21      <button id="prompt-button">Pick device</button>
     22    </div>
     23  </body>
     24  <script src="./prepare-device.js"></script>
     25  <script>
     26    let v = document.createElement("video");
     27    v.src = getVideoURI("/media/movie_5");
     28 
     29    async_test(t => {
     30      let button = document.getElementById("prompt-button");
     31      button.onclick = t.step_func_done(() => {
     32        promise_test(() => {
     33          return v.remote.prompt();
     34        }, "Prompt resolves");
     35      });
     36    }, "Test that the Promise returned by prompt() is resolved when user selects a device.");
     37  </script>
     38 </html>