tor-browser

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

invalid-image-pending-script.https.html (1001B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <link rel="help" href="https://drafts.css-houdini.org/css-paint-api/">
      4 <link rel="match" href="invalid-image-pending-script-ref.html">
      5 <style>
      6    #output {
      7        width: 100px;
      8        height: 100px;
      9        background-image: paint(invalid), paint(successIndicator);
     10    }
     11 </style>
     12 <script src="/common/reftest-wait.js"></script>
     13 <script src="/common/worklet-reftest.js"></script>
     14 <body>
     15 <div id="output"></div>
     16 
     17 <script id="code" type="text/worklet">
     18 // This is testing that even though there is no paint function registered for
     19 // 'invalid', it won't cause any error, and the other painter (successIndicator)
     20 // will paint as usual.
     21 registerPaint('successIndicator', class {
     22    paint(ctx, geom) {
     23        ctx.fillStyle = 'green';
     24        ctx.fillRect(0, 0, geom.width, geom.height);
     25    }
     26 });
     27 </script>
     28 
     29 <script>
     30    importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
     31 </script>
     32 </body>
     33 </html>