summaryrefslogtreecommitdiffstats
path: root/layout/reftests/canvas/size-change-1.html
blob: afe22d856bf346b3fb7af2ecc30bec309d7eb26b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<html class="reftest-wait">
<body>
<canvas width="100" height="100" id="c"></canvas>
<script>
var c = document.getElementById("c");
var ctx = c.getContext("2d");
ctx.fillStyle = "red";
ctx.fillRect(0,0,100,100);

function finishTest() {
  c.width = 200;
  c.height = 200;
  ctx.fillStyle = "lime";
  ctx.fillRect(0,0,200,200);

  document.documentElement.removeAttribute("class");
}
window.addEventListener("MozReftestInvalidate", finishTest);
</script>
</body>
</html>