tor-browser

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

ric-invalidation.html (1018B)


      1 <!DOCTYPE html>
      2 <title>CSS Values and Units Test: ric invalidation</title>
      3 <link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
      4 <link rel="help" href="https://drafts.csswg.org/css-values/#font-relative-lengths">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <meta name="assert" content="test ric invalidation">
      8 <style>
      9  @import url("/fonts/ahem.css");
     10  html {
     11    font-family: 'Ahem';
     12    font-size: 40px;
     13  }
     14  body {
     15    font-family: monospace;
     16    font-size: 20px;
     17  }
     18  div {
     19    width: 10ric;
     20  }
     21 </style>
     22 
     23 <html>
     24  <body>
     25    <div id="div"></div>
     26  </body>
     27 </html>
     28 
     29 <script>
     30  setup({ single_test: true });
     31  document.fonts.ready.then(() => {
     32    let old_width = div.getBoundingClientRect().width;
     33    document.documentElement.style.fontSize = "41px";
     34    let new_width = div.getBoundingClientRect().width;
     35    assert_not_equals(old_width, new_width, "expect update of ric units with font size change");
     36    done();
     37  });
     38 </script>