tor-browser

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

getComputedStyle-insets-absolute-roundtrip.html (1327B)


      1 <!DOCTYPE html>
      2 <title>Chromium bug: getComputedStyle() fixed-length inset values don't roundtrip</title>
      3 <link rel="help" href="https://drafts.csswg.org/cssom/#resolved-value">
      4 <link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1482703">
      5 <link rel="author" href="mailto:xiaochengh@chromium.org">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 
      9 <style>
     10 .target {
     11  position: absolute;
     12 }
     13 </style>
     14 
     15 <div class="target" id="target1" style="left: 20.7px"></div>
     16 <script>
     17 test(() => {
     18  assert_equals(getComputedStyle(target1).left, '20.7px');
     19 }, 'Fixed-length left property value should roundtrip');
     20 </script>
     21 
     22 <div class="target" id="target2" style="right: 20.7px"></div>
     23 <script>
     24 test(() => {
     25  assert_equals(getComputedStyle(target2).right, '20.7px');
     26 }, 'Fixed-length right property value should roundtrip');
     27 </script>
     28 
     29 <div class="target" id="target3" style="top: 20.7px"></div>
     30 <script>
     31 test(() => {
     32  assert_equals(getComputedStyle(target3).top, '20.7px');
     33 }, 'Fixed-length top property value should roundtrip');
     34 </script>
     35 
     36 <div class="target" id="target4" style="bottom: 20.7px"></div>
     37 <script>
     38 test(() => {
     39  assert_equals(getComputedStyle(target4).bottom, '20.7px');
     40 }, 'Fixed-length bottom property value should roundtrip');
     41 </script>