diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/remote-playback/remote-video-playback-manual.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/remote-playback/remote-video-playback-manual.html')
-rw-r--r-- | testing/web-platform/tests/remote-playback/remote-video-playback-manual.html | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/testing/web-platform/tests/remote-playback/remote-video-playback-manual.html b/testing/web-platform/tests/remote-playback/remote-video-playback-manual.html new file mode 100644 index 0000000000..223a5b4a28 --- /dev/null +++ b/testing/web-platform/tests/remote-playback/remote-video-playback-manual.html @@ -0,0 +1,61 @@ +<!DOCTYPE html> +<html> + <title>Test if video is playing on remote device</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/media.js"></script> + <script> + setup({ explicit_timeout: true }); + </script> + <style> + button { + padding: 2em; + } + </style> + <body> + <div id="pick-device"> + <p> + Click the button below to prompt for a remote playback device and select + one! + </p> + <p> + <button id="prompt-button">Pick device</button> + </p> + </div> + <video src="/media/green-at-15.mp4" id="video"></video> + <div id="evaluate" style="display: none"> + <p>Does the video play back on the remote device?</p> + <p> + <button id="yes">Yes</button> + </p> + <p> + <button id="no">No</button> + </p> + </div> + </body> + <script> + let v = document.getElementById("video"); + + async_test(t => { + let button = document.getElementById("prompt-button"); + button.onclick = t.step_func(() => { + promise_test(() => { + return v.remote.prompt().then(() => { + v.play(); + document.getElementById("evaluate").style.display = "block"; + }); + }, "Prompt resolves"); + }); + + let evaluate = success => + assert_true(success, "Video paused and has correct play position."); + + document.getElementById("yes").onclick = t.step_func_done(() => + evaluate(true) + ); + document.getElementById("no").onclick = t.step_func_done(() => + evaluate(false) + ); + }, "Test if video is playing on remote device."); + </script> +</html> |