commit c427c633441989a66941b5df94dc03094b248e5a
parent e0c52c550ffe541cec615eaf4614aa1689c31eae
Author: Fredrik Söderquist <fs@opera.com>
Date: Sat, 22 Nov 2025 21:13:17 +0000
Bug 2001687 [wpt PR 56194] - Move animations/composition/object-position-composition.html to WPT, a=testonly
Automatic update from web-platform-tests
Move animations/composition/object-position-composition.html to WPT
Move the test and perform a mechanical rewrite:
* Change assertComposition() to test_composition().
* Change 'is' to 'expect' in the expectation objects.
* Include required testharness.js and framework.
* Add link to spec.
Bug: 40663834
Change-Id: I9a6fddc3cf042cefab7555a0c8833a8c5b8a99ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7185644
Auto-Submit: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1548537}
--
wpt-commits: 0a9f3dd29abf4ca0757b7853c34605780abb9a43
wpt-pr: 56194
Diffstat:
1 file changed, 68 insertions(+), 0 deletions(-)
diff --git a/testing/web-platform/tests/css/css-images/animation/object-position-composition.html b/testing/web-platform/tests/css/css-images/animation/object-position-composition.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<title>object-position composition</title>
+<link rel="help" href="https://drafts.csswg.org/css-images-3/#the-object-position">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/interpolation-testcommon.js"></script>
+<body>
+<script>
+test_composition({
+ property: 'object-position',
+ underlying: '40px 60px',
+ addFrom: '60px 40px',
+ addTo: '160px 140px',
+}, [
+ {at: -0.25, expect: '75px 75px'},
+ {at: 0, expect: '100px 100px'},
+ {at: 0.25, expect: '125px 125px'},
+ {at: 0.5, expect: '150px 150px'},
+ {at: 0.75, expect: '175px 175px'},
+ {at: 1, expect: '200px 200px'},
+ {at: 1.25, expect: '225px 225px'},
+]);
+
+test_composition({
+ property: 'object-position',
+ underlying: 'top 20% left 40%',
+ addFrom: 'left 60% top 80%',
+ addTo: 'right 80% bottom 40%',
+}, [
+ {at: -0.25, expect: '110% 105%'},
+ {at: 0, expect: '100% 100%'},
+ {at: 0.25, expect: '90% 95%'},
+ {at: 0.5, expect: '80% 90%'},
+ {at: 0.75, expect: '70% 85%'},
+ {at: 1, expect: '60% 80%'},
+ {at: 1.25, expect: '50% 75%'},
+]);
+
+test_composition({
+ property: 'object-position',
+ underlying: '40px 60px',
+ replaceFrom: '100px 200px',
+ addTo: '160px 40px',
+}, [
+ {at: -0.25, expect: '75px 225px'},
+ {at: 0, expect: '100px 200px'},
+ {at: 0.25, expect: '125px 175px'},
+ {at: 0.5, expect: '150px 150px'},
+ {at: 0.75, expect: '175px 125px'},
+ {at: 1, expect: '200px 100px'},
+ {at: 1.25, expect: '225px 75px'},
+]);
+
+test_composition({
+ property: 'object-position',
+ underlying: '40px 60px',
+ addFrom: '60px 140px',
+ replaceTo: '200px 100px',
+}, [
+ {at: -0.25, expect: '75px 225px'},
+ {at: 0, expect: '100px 200px'},
+ {at: 0.25, expect: '125px 175px'},
+ {at: 0.5, expect: '150px 150px'},
+ {at: 0.75, expect: '175px 125px'},
+ {at: 1, expect: '200px 100px'},
+ {at: 1.25, expect: '225px 75px'},
+]);</script>
+</body>