1878294-1.html (961B)
1 <html class="reftest-wait"> 2 <svg width="400" height="400"> 3 <g id="g"> 4 <circle cx="300" cy="300" r="40" style="fill: red;"></circle> 5 </g> 6 </svg> 7 8 <script> 9 const g = document.getElementById("g") 10 11 let tx = -108213.2; 12 let ty = -108213.2; 13 let k = 399; 14 15 let stepSize = 1; 16 17 let num = 0; 18 let numMs = 100; 19 20 const move = () => { 21 stepSize = -1 * stepSize; 22 tx += 0.0001 * stepSize; 23 ty += 0.0001 * stepSize; 24 g.setAttribute("transform", `translate(${tx},${ty}) scale(${k})`) 25 window.setTimeout(move, numMs); 26 num++; 27 if (num == 5) { 28 document.documentElement.className = ""; 29 } 30 if (num == 100 && navigator.appVersion.includes("Android")) { 31 // Android doesn't get a chance to paint and finish the reftest if another 32 // paint gets queued if we tweak the transfer, so if its taking a long time 33 // increase the timeout, this timeout value still reproduced the bug when 34 // test was landed. 35 numMs = 200; 36 } 37 } 38 39 move(); 40 </script> 41 </html>