fune/testing/web-platform/tests/css/css-images/object-view-box-transition-mutation.html
Anders Hartvoll Ruud 00691b68de Bug 1788844 [wpt PR 35759] - Check property equality for object-view-box by value, a=testonly
Automatic update from web-platform-tests
Check property equality for object-view-box by value

Otherwise the transitions code will try to "retarget" in incorrect
ways.

Fixed: 1358920
Change-Id: I1378621468ceff08c8864bd170ba625e4de66aaf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3868738
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Auto-Submit: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1042365}

--

wpt-commits: 5193e5ae17165cbc6789465e22a945115f59c7c5
wpt-pr: 35759
2022-09-04 18:01:17 +00:00

26 lines
1 KiB
HTML

<!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>