mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 05:08:36 +02:00
Automatic update from web-platform-tests WPT/BGPT: Add animation stop and set time tests, make css-animations tests threaded. This patch does a couple of things: 1. Adds a test to test opacity and transform animations being paused with time explicitly set. 2. Adds a virtual threaded test suite for css-animations (adds ~57 new tests). R=wangxianzhu@chromium.org, chrishtr@chromium.org Change-Id: Ica53a46f1efba38537dad29dc0a99bbf57892808 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1569348 Commit-Queue: vmpstr <vmpstr@chromium.org> Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/master@{#651356} -- wpt-commits: 7e98f7c6953f824080bb78c289d5b63edbd4b6f7 wpt-pr: 16364
35 lines
1 KiB
HTML
35 lines
1 KiB
HTML
<!DOCTYPE html>
|
|
<html class="reftest-wait">
|
|
<meta charset="utf-8">
|
|
<title>CSS Animations Test: pauses a opacity animation and sets the current time</title>
|
|
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
|
|
<link rel="help" href="https://drafts.csswg.org/css-animations-1/#animation-name">
|
|
<link rel="help" href="https://drafts.csswg.org/css-animations-1/#animation-duration">
|
|
<link rel="help" href="https://drafts.csswg.org/css-animations-1/#animation-timing-function">
|
|
<link rel="match" href="animation-opacity-pause-and-set-time-ref.html">
|
|
<style>
|
|
#target {
|
|
width: 50px;
|
|
height: 50px;
|
|
background-color: green;
|
|
}
|
|
</style>
|
|
<body>
|
|
<div id="target"></div>
|
|
</body>
|
|
<script>
|
|
window.onload = () => {
|
|
requestAnimationFrame(() => {
|
|
let animation = document.getElementById("target").animate([
|
|
{opacity: '0.8'},
|
|
{opacity: '0.0'}
|
|
], 1000);
|
|
requestAnimationFrame(() => {
|
|
animation.pause();
|
|
animation.currentTime = 500;
|
|
document.documentElement.removeAttribute('class');
|
|
});
|
|
});
|
|
};
|
|
</script>
|
|
</html>
|