setTransform-003.https.html (880B)
1 <!DOCTYPE html> 2 <title>setTransform with NaN should be ignored</title> 3 <html class="reftest-wait"> 4 <link rel="help" href="https://drafts.css-houdini.org/css-paint-api/"> 5 <link rel="match" href="setTransform-ref.html"> 6 <style> 7 .container { 8 width: 200px; 9 height: 200px; 10 } 11 12 #foo { 13 background: paint(foo); 14 } 15 </style> 16 <script src="/common/reftest-wait.js"></script> 17 <script src="/common/worklet-reftest.js"></script> 18 <body> 19 <div id="foo" class="container"></div> 20 21 <script id="code" type="text/worklet"> 22 registerPaint('foo', class { 23 paint(ctx, geom) { 24 ctx.fillStyle = 'green'; 25 // Set to a NaN should be ignored. 26 ctx.setTransform({a: NaN, d:2}); 27 ctx.fillRect(0, 0, 100, 100); 28 } 29 }); 30 </script> 31 32 <script> 33 importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent); 34 </script> 35 </body> 36 </html>