commit f1cbe516271b0abf2b94f7641abf4e7414be8bf7
parent 8afcc644b18e75a45f6699400efb84efe1ea28b7
Author: Ahmad Saleem <52317531+Ahmad-S792@users.noreply.github.com>
Date: Fri, 14 Nov 2025 10:24:16 +0000
Bug 2000135 [wpt PR 56026] - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=256956, a=testonly
Automatic update from web-platform-tests
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=256956 (#56026)
--
wpt-commits: b5e7146b954154d4e2e02b8bd2362d74c2071e0e
wpt-pr: 56026
Diffstat:
2 files changed, 52 insertions(+), 0 deletions(-)
diff --git a/testing/web-platform/tests/svg/animations/animate-stop-currentcolor-ci.html b/testing/web-platform/tests/svg/animations/animate-stop-currentcolor-ci.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<title>Animating 'stop-color' from 'currentColor'</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<svg>
+ <linearGradient id="lg" style="color: green">
+ <stop stop-color="red">
+ <animate attributeName="stop-color" from="currentColor" to="green" dur="10s" fill="freeze"/>
+ </stop>
+ </lineargradient>
+ <rect width="100" height="100" fill="url(#lg)"/>
+</svg>
+<script>
+ async_test(t => {
+ let svg = document.querySelector("svg");
+ svg.pauseAnimations();
+ svg.setCurrentTime(5);
+ onload = t.step_func(() => {
+ requestAnimationFrame(t.step_func_done(() => {
+ let stop = document.querySelector("stop");
+ assert_equals(getComputedStyle(stop).getPropertyValue("stop-color"),
+ "rgb(0, 128, 0)");
+ }));
+ });
+ });
+</script>
diff --git a/testing/web-platform/tests/svg/animations/animate-stop-currentcolor-escaped.html b/testing/web-platform/tests/svg/animations/animate-stop-currentcolor-escaped.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<title>Animating 'stop-color' from 'currentc\olor'</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<svg>
+ <linearGradient id="lg" style="color: green">
+ <stop stop-color="red">
+ <animate attributeName="stop-color" from="currentc\olor" to="green" dur="10s" fill="freeze"/>
+ </stop>
+ </lineargradient>
+ <rect width="100" height="100" fill="url(#lg)"/>
+</svg>
+<script>
+ async_test(t => {
+ let svg = document.querySelector("svg");
+ svg.pauseAnimations();
+ svg.setCurrentTime(5);
+ onload = t.step_func(() => {
+ requestAnimationFrame(t.step_func_done(() => {
+ let stop = document.querySelector("stop");
+ assert_equals(getComputedStyle(stop).getPropertyValue("stop-color"),
+ "rgb(0, 128, 0)");
+ }));
+ });
+ });
+</script>