Bug 1545675 [wpt PR 16364] - WPT/BGPT: Add animation stop and set time tests, make css-animations tests threaded., a=testonly
authorVladimir Levin <vmpstr@chromium.org>
Fri, 17 May 2019 14:37:24 +0000
changeset 477208 ed263b3397ca9cc388e4080d4d6f2ba5d135d393
parent 477207 57226ba5b552075bb85db4ba68865c8ca1552211
child 477209 2f9aaa4d479d318c7112bfb1b0d3a5ff3fa948c7
push id36116
push usershindli@mozilla.com
push dateThu, 06 Jun 2019 10:00:05 +0000
treeherdermozilla-central@fee989d27558 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1545675, 16364, 1569348, 651356
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
testing/web-platform/tests/css/css-animations/animation-opacity-pause-and-set-time-ref.html
testing/web-platform/tests/css/css-animations/animation-opacity-pause-and-set-time.html
testing/web-platform/tests/css/css-animations/animation-transform-pause-and-set-time-ref.html
testing/web-platform/tests/css/css-animations/animation-transform-pause-and-set-time.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-animations/animation-opacity-pause-and-set-time-ref.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<html>
+<meta charset="utf-8">
+<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
+<style>
+#target {
+  width: 50px;
+  height: 50px;
+  background-color: green;
+  opacity: 0.4;
+}
+</style>
+<body>
+  <div id="target"></div>
+</body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-animations/animation-opacity-pause-and-set-time.html
@@ -0,0 +1,35 @@
+<!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>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-animations/animation-transform-pause-and-set-time-ref.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<html>
+<meta charset="utf-8">
+<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
+<style>
+#target {
+  width: 50px;
+  height: 50px;
+  background-color: green;
+  transform: translate(500px);
+}
+</style>
+<body>
+  <div id="target"></div>
+</body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-animations/animation-transform-pause-and-set-time.html
@@ -0,0 +1,35 @@
+<!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>