summaryrefslogtreecommitdiffstats
path: root/layout/reftests/bugs/1878294-1.html
blob: ee91c382905bc2bdbda998d850a9b93afc9e5e8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<html class="reftest-wait">
<svg width="400" height="400">
  <g id="g">
    <circle cx="300" cy="300" r="40" style="fill: red;"></circle>
  </g>
</svg>

<script>
const g = document.getElementById("g")

let tx = -108213.2;
let ty = -108213.2;
let k = 399;

let stepSize = 1;

let num = 0;
let numMs = 100;

const move = () => {
  stepSize = -1 * stepSize;
  tx += 0.0001 * stepSize;
  ty += 0.0001 * stepSize;
  g.setAttribute("transform", `translate(${tx},${ty}) scale(${k})`)
  window.setTimeout(move, numMs);
  num++;
  if (num == 5) {
  	document.documentElement.className = "";
  }
  if (num == 100 && navigator.appVersion.includes("Android")) {
    // Android doesn't get a chance to paint and finish the reftest if another
    // paint gets queued if we tweak the transfer, so if its taking a long time
    // increase the timeout, this timeout value still reproduced the bug when
    // test was landed.
    numMs = 200;
  }
}

move();
</script>
</html>