tor-browser

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

registered-property-value-007.https.html (1157B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <title>Values of &lt;image&gt;-properties reach worklet</title>
      4 <link rel="help" href="https://drafts.css-houdini.org/css-paint-api/">
      5 <link rel="match" href="parse-input-arguments-ref.html">
      6 <script src="/common/reftest-wait.js"></script>
      7 <script src="/common/worklet-reftest.js"></script>
      8 <script src="./resources/utils.js"></script>
      9 <body>
     10 <div id="target"></div>
     11 <script>
     12    try {
     13      CSS.registerProperty({
     14        name: '--prop-1',
     15        syntax: '<image> | none',
     16        initialValue: 'none',
     17        inherits: false
     18      });
     19 
     20      CSS.registerProperty({
     21        name: '--prop-2',
     22        syntax: '<image> | none',
     23        initialValue: 'none',
     24        inherits: false
     25      });
     26 
     27      target.style.setProperty('--prop-1', 'url("http://a/")');
     28      target.style.setProperty('--prop-2', 'linear-gradient(red, red)');
     29 
     30      expectWorkletValues(target, {
     31        '--prop-1': ['[CSSImageValue url("http://a/")]'],
     32        '--prop-2': ['[CSSStyleValue linear-gradient(red, red)]'],
     33      });
     34    } catch(e) {
     35      document.body.textContent = e;
     36      takeScreenshot();
     37    }
     38 </script>
     39 </body>
     40 </html>