Bug 1575259 [wpt PR 18565] - Port offset-path-interpolation-*.html to wpt/, a=testonly
authorXida Chen <xidachen@chromium.org>
Mon, 26 Aug 2019 11:31:35 +0000
changeset 554005 0429e9d9308b40a7f63801ecfc5fcad125b68617
parent 554004 876ac352a6963bde546f506b2adb4f74a11b5ec1
child 554006 059d39e2c3484b8b4448ed54cb79d1d60c1b6c5f
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1575259, 18565, 900581, 1762371, 689912
milestone70.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 1575259 [wpt PR 18565] - Port offset-path-interpolation-*.html to wpt/, a=testonly Automatic update from web-platform-tests Port offset-path-interpolation-*.html to wpt/ There are already 5 corresponding tests under css/motion/animation/ for offset-path. 001--004 are almost identical with some numbers different at from or to value. This CL adds some test cases to 005.html which don't currently exist. Bug: 900581 Change-Id: I9f6995313bdaa29baec19f26b781c95449be0a4a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762371 Reviewed-by: Stephen McGruer <smcgruer@chromium.org> Commit-Queue: Xida Chen <xidachen@chromium.org> Cr-Commit-Position: refs/heads/master@{#689912} -- wpt-commits: 863ab8eb05f6fda8de334c81d91f566b816eaa18 wpt-pr: 18565
testing/web-platform/tests/css/motion/animation/offset-path-interpolation-005.html
--- a/testing/web-platform/tests/css/motion/animation/offset-path-interpolation-005.html
+++ b/testing/web-platform/tests/css/motion/animation/offset-path-interpolation-005.html
@@ -5,32 +5,82 @@
     <title>offset-distance interpolation</title>
     <link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
     <link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-distance-property">
     <meta name="assert" content="offset-distance supports animation.">
     <script src="/resources/testharness.js"></script>
     <script src="/resources/testharnessreport.js"></script>
     <script src="/css/support/interpolation-testcommon.js"></script>
   </head>
+  <style>
+    .parent {
+      offset-path: ray(30deg closest-side);
+    }
+    .target {
+      offset-path: ray(10deg closest-side);
+    }
+  </style>
   <body>
     <script>
       'use strict';
 
       test_no_interpolation({
         property: 'offset-path',
         from: "path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z')",
         to: "ray(0deg closest-side)",
       });
 
       test_no_interpolation({
         property: 'offset-path',
         from: "ray(0deg closest-corner)",
         to: "none",
       });
 
+      // Neutral keyframes use the inline style.
+      test_interpolation({
+        property: 'offset-path',
+        from: neutralKeyframe,
+        to: 'ray(20deg closest-side)',
+      }, [
+        {at: -0.3, expect: 'ray(7deg closest-side)'},
+        {at: 0, expect: 'ray(10deg closest-side)'},
+        {at: 0.3, expect: 'ray(13deg closest-side)'},
+        {at: 0.6, expect: 'ray(16deg closest-side)'},
+        {at: 1, expect: 'ray(20deg closest-side)'},
+        {at: 1.5, expect: 'ray(25deg closest-side)'},
+      ]);
+
+      // No interpolation to a ray from the initial value 'none'.
+      test_no_interpolation({
+        property: 'offset-path',
+        from: 'initial',
+        to: 'ray(20deg closest-side)',
+      });
+
+      // 'inherit' keyframes use the parent style.
+      test_interpolation({
+        property: 'offset-path',
+        from: 'inherit',
+        to: 'ray(20deg closest-side)',
+      }, [
+        {at: -0.3, expect: 'ray(33deg closest-side)'},
+        {at: 0, expect: 'ray(30deg closest-side)'},
+        {at: 0.3, expect: 'ray(27deg closest-side)'},
+        {at: 0.6, expect: 'ray(24deg closest-side)'},
+        {at: 1, expect: 'ray(20deg closest-side)'},
+        {at: 1.5, expect: 'ray(15deg closest-side)'},
+      ]);
+
+      // No interpolation to a ray from the initial value 'none'.
+      test_no_interpolation({
+        property: 'offset-path',
+        from: 'unset',
+        to: 'ray(20deg closest-side)',
+      });
+
       // No interpolation to a ray from the initial value 'none'.
       test_no_interpolation({
         property: 'offset-path',
         from: 'none',
         to: 'ray(20deg closest-side)',
       });
 
       // Interpolation between rays.