tor-browser

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

invalid-min-max.https.html (1012B)


      1 <!DOCTYPE html>
      2 <html class=reftest-wait>
      3 <link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#interaction-sizing">
      4 <link rel="match" href="invalid-ref.html">
      5 <meta name="assert" content="This test checks that min-content-size greater than max-content-size is correctly clamped to max-content-size." />
      6 
      7 <style>
      8 .test {
      9  background: red;
     10  border: solid 2px;
     11  height: 100px;
     12  width: max-content;
     13 }
     14 
     15 @supports (display: layout(invalid-sizes)) {
     16  .test {
     17    display: layout(invalid-sizes);
     18    background: green;
     19  }
     20 }
     21 </style>
     22 <script src="/common/reftest-wait.js"></script>
     23 <script src="/common/worklet-reftest.js"></script>
     24 
     25 <div class="test"></div>
     26 
     27 <script id="code" type="text/worklet">
     28 registerLayout('invalid-sizes', class {
     29  async intrinsicSizes() {
     30    return { maxContentSize: 10, minContentSize: 200 };
     31  }
     32  async layout() {}
     33 });
     34 </script>
     35 
     36 <script>
     37 importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent);
     38 </script>
     39 </html>