mirror of
https://github.com/servo/servo.git
synced 2025-10-16 00:10:23 +01:00
61 lines
1.3 KiB
HTML
61 lines
1.3 KiB
HTML
|
|
<!DOCTYPE html>
|
|
<html class="reftest-wait">
|
|
<meta charset="UTF-8">
|
|
<title>Update playback rate zero</title>
|
|
<link rel="match" href="update-playback-rate-zero-ref.html">
|
|
<script src="/common/reftest-wait.js"></script>
|
|
<style>
|
|
#box-1, #box-2 {
|
|
border: 1px solid white;
|
|
height: 40px;
|
|
left: 40px;
|
|
position: absolute;
|
|
top: 40px;
|
|
width: 40px;
|
|
}
|
|
#box-1 {
|
|
background: blue;
|
|
z-index: 1;
|
|
}
|
|
#box-2 {
|
|
background: white;
|
|
transform: translateX(200px);
|
|
z-index: 2;
|
|
}
|
|
#notes {
|
|
position: absolute;
|
|
left: 0px;
|
|
top: 100px;
|
|
}
|
|
</style>
|
|
|
|
<body>
|
|
<div id="box-1"></div>
|
|
<div id="box-2"></div>
|
|
<p id="notes">
|
|
This test creates a running animation and changes its playback rate
|
|
part way through. The animation should stop behind an occluding rectangle.
|
|
If not fully occluded, the test fails.
|
|
</p>
|
|
</body>
|
|
<script>
|
|
onload = function() {
|
|
const elem = document.getElementById('box-1');
|
|
const anim = elem.animate([
|
|
{ transform: 'translateX(100px)' },
|
|
{ transform: 'translateX(100px)' },
|
|
{ transform: 'translateX(200px)' },
|
|
{ transform: 'translateX(200px)' }
|
|
], {
|
|
duration: 1000
|
|
});
|
|
|
|
anim.ready.then(() => {
|
|
setTimeout(() => {
|
|
anim.updatePlaybackRate(0);
|
|
}, 750);
|
|
takeScreenshotDelayed(1200);
|
|
});
|
|
};
|
|
</script>
|