tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

object-view-box-transition-mutation.html (1070B)


      1 <!DOCTYPE html>
      2 <title>Unrelated mutation does not affect object-view-box transition</title>
      3 <link rel="help" href="https://drafts.csswg.org/css-images-4/#the-object-view-box">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <div id=element>
      7 </div>
      8 <style>
      9  #element {
     10    object-view-box: inset(0px);
     11    transition: object-view-box 100s -50s linear;
     12  }
     13 </style>
     14 <script>
     15  test((t) => {
     16    // Ensure a before-style for element.
     17    getComputedStyle(element).objectViewBox;
     18    // Trigger a transition from inset(0px) to inset(20px).
     19    element.style.objectViewBox = 'inset(20px)';
     20    assert_equals(getComputedStyle(element).objectViewBox, 'inset(10px)', 'before mutation');
     21    // Now do a style mutation that's unrelated to the computed value
     22    // of object-view-box, and check again.
     23    element.style.setProperty('--x', '1');
     24    assert_equals(getComputedStyle(element).objectViewBox, 'inset(10px)', 'after mutation');
     25  }, 'Unrelated mutation does not affect object-view-box transition');
     26 </script>