size-change-1.html 493 B

1234567891011121314151617181920212223
  1. <!DOCTYPE html>
  2. <html class="reftest-wait">
  3. <body>
  4. <canvas width="100" height="100" id="c"></canvas>
  5. <script>
  6. var c = document.getElementById("c");
  7. var ctx = c.getContext("2d");
  8. ctx.fillStyle = "red";
  9. ctx.fillRect(0,0,100,100);
  10. function finishTest() {
  11. c.width = 200;
  12. c.height = 200;
  13. ctx.fillStyle = "lime";
  14. ctx.fillRect(0,0,200,200);
  15. document.documentElement.removeAttribute("class");
  16. }
  17. window.addEventListener("MozReftestInvalidate", finishTest, false);
  18. </script>
  19. </body>
  20. </html>