no bug - Import translations from android-l10n r=release a=l10n CLOSED TREE
[gecko.git] / layout / reftests / bugs / 1553571-1.html
blobee9e4782ab90801aec471fbb1cb5be9b85b2f934
1 <!-- reftest-wait because it takes at least two changes of the transform style before it becomes active -->
2 <html class='reftest-wait'>
3 <head>
4 <script>
5 let num = 0;
6 let numMs = 50;
7 var changesLeft = 10;
8 function go() {
9 window.setTimeout(changeit, 0);
12 function changeit() {
13 var a = document.getElementById("a");
14 a.style.transform = 'scale(' + (256.1 + Math.random()*0.01) + ')';
16 num++;
18 if (changesLeft > 0) {
19 --changesLeft;
20 window.setTimeout(changeit, numMs);
22 if (changesLeft == 0) {
23 // 75-100ms is the timeout for expirty from the active layer tracker.
24 // Increase the time between transform tweaks to 74ms to give the reftest the best
25 // chance of running the mozafterpaint handler and checking that there are no more
26 // paints pending so it can finish.
27 numMs = 74;
28 if (num >= 100 && navigator.appVersion.includes("Android")) {
29 // That's not enough time on Android, so give it a bit more time. This still
30 // reproduces the original bug with the original patch backed out, even though
31 // one would think anything over 100ms would not reproduce, I'm not sure why.
32 // It's better to run the this with this timeout then have the test disabled.
33 numMs = 200;
35 window.setTimeout(changeit, numMs);
36 document.documentElement.classList.remove("reftest-wait");
39 </script>
40 </head>
41 <body onload="go();">
42 <div id="a" style="width: 1px; height: 1px; position: absolute; left: 200px; top: 200px;">
43 <img style="width: 1px; height: 1px;" src="repeatable-diagonal-gradient.png">
44 </div>
45 </body>
46 </html>