summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-images/object-view-box-transition-mutation.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-images/object-view-box-transition-mutation.html
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-images/object-view-box-transition-mutation.html')
-rw-r--r--testing/web-platform/tests/css/css-images/object-view-box-transition-mutation.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-images/object-view-box-transition-mutation.html b/testing/web-platform/tests/css/css-images/object-view-box-transition-mutation.html
new file mode 100644
index 0000000000..1542afad01
--- /dev/null
+++ b/testing/web-platform/tests/css/css-images/object-view-box-transition-mutation.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<title>Unrelated mutation does not affect object-view-box transition</title>
+<link rel="help" href="https://drafts.csswg.org/css-images-4/#the-object-view-box">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id=element>
+</div>
+<style>
+ #element {
+ object-view-box: inset(0px);
+ transition: object-view-box 100s -50s linear;
+ }
+</style>
+<script>
+ test((t) => {
+ // Ensure a before-style for element.
+ getComputedStyle(element).objectViewBox;
+ // Trigger a transition from inset(0px) to inset(20px).
+ element.style.objectViewBox = 'inset(20px)';
+ assert_equals(getComputedStyle(element).objectViewBox, 'inset(10px)', 'before mutation');
+ // Now do a style mutation that's unrelated to the computed value
+ // of object-view-box, and check again.
+ element.style.setProperty('--x', '1');
+ assert_equals(getComputedStyle(element).objectViewBox, 'inset(10px)', 'after mutation');
+ }, 'Unrelated mutation does not affect object-view-box transition');
+</script>