Source code

Revision control

Other Tools

Test Info: Warnings

  • This test gets skipped with pattern: (os == "win" && processor == "aarch64")
<meta charset="utf-8">
<title>Test cloneElementVisually</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src=""></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
<div id="content">
<video id="original"></video>
<div id="results">
<canvas id="left"></canvas>
<canvas id="right"></canvas>
<script type="application/javascript">
/* import-globals-from cloneElementVisually_helpers.js */
* Test that when we start cloning a video that has already ended, the
* clone displays the last frame from the video.
add_task(async () => {
await setup();
let originalVideo = document.getElementById("original");
let ended = waitForEventOnce(originalVideo, "ended");
await ended;
await withNewClone(originalVideo, async clone => {
await SpecialPowers.wrap(originalVideo).cloneElementVisually(clone);
ok(await assertVideosMatch(originalVideo, clone),
"Visual clone should display final frame.");