summaryrefslogtreecommitdiffstats
path: root/layout/reftests/canvas/size-change-1.html
diff options
context:
space:
mode:
Diffstat (limited to 'layout/reftests/canvas/size-change-1.html')
-rw-r--r--layout/reftests/canvas/size-change-1.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/layout/reftests/canvas/size-change-1.html b/layout/reftests/canvas/size-change-1.html
new file mode 100644
index 0000000000..afe22d856b
--- /dev/null
+++ b/layout/reftests/canvas/size-change-1.html
@@ -0,0 +1,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>