gecko-dev/testing/web-platform/tests/css/css-animations/animation-transform-pause-and-set-time.html
Vladimir Levin 081a235252 Bug 1545675 [wpt PR 16364] - WPT/BGPT: Add animation stop and set time tests, make css-animations tests threaded., a=testonly
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
2019-06-05 10:26:23 +01:00

35 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>CSS Animations Test: pauses a transform 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-transform-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([
{transform: 'translateX(0px)'},
{transform: 'translateX(1000px)'}
], 1000);
requestAnimationFrame(() => {
animation.pause();
animation.currentTime = 500;
document.documentElement.removeAttribute('class');
});
});
};
</script>
</html>