summaryrefslogtreecommitdiffstats
path: root/layout/reftests/canvas/size-change-1.html
blob: 134d769acfa6d649fc67f30e3792c5430fd513aa (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, false);
</script>
</body>
</html>