Bug 1305963 - Add reftests for mozCurrentTransform and mozCurrentTransformInverse. r=nical, a=test-only
authorEthan Lin <ethlin@mozilla.com>
Mon, 03 Oct 2016 19:14:00 -0400
changeset 356007 c8b7e869c00ad29434437e49758b3804be3b51be
parent 356006 7acf3f690d58a4a08de1fc3e1667be852bd9588f
child 356008 12bb1ab66dac659edfb5c525a812a8f480e9feea
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical, test-only
bugs1305963
milestone51.0a2
Bug 1305963 - Add reftests for mozCurrentTransform and mozCurrentTransformInverse. r=nical, a=test-only
dom/canvas/test/reftest/mozCurrentTransform-ref.html
dom/canvas/test/reftest/mozCurrentTransform.html
dom/canvas/test/reftest/mozCurrentTransformInverse.html
dom/canvas/test/reftest/reftest.list
new file mode 100644
--- /dev/null
+++ b/dom/canvas/test/reftest/mozCurrentTransform-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<canvas id="canvas" width="150" height="150"></canvas>
+
+<script>
+
+var canvas = document.getElementById('canvas');
+var ctx = canvas.getContext('2d');
+ctx.transform(1,0.5,-0.5,1,30,10);
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 100);
+
+</script>
+</body></html>
new file mode 100644
--- /dev/null
+++ b/dom/canvas/test/reftest/mozCurrentTransform.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<canvas id="canvas" width="150" height="150"></canvas>
+
+<script>
+
+var canvas = document.getElementById('canvas');
+var ctx = canvas.getContext('2d');
+ctx.transform(1,0.5,-0.5,1,30,10);
+setTimeout(function() {
+  var canvas = document.getElementById('canvas');
+  var ctx = canvas.getContext('2d');
+  var transform = ctx.mozCurrentTransform;
+  ctx.mozCurrentTransform = transform;
+  ctx.fillStyle = '#f00';
+  ctx.fillRect(0, 0, 100, 100);
+  document.documentElement.removeAttribute("class");
+}, 10)
+
+</script>
+</body></html>
new file mode 100644
--- /dev/null
+++ b/dom/canvas/test/reftest/mozCurrentTransformInverse.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<canvas id="canvas" width="150" height="150"></canvas>
+
+<script>
+
+var canvas = document.getElementById('canvas');
+var ctx = canvas.getContext('2d');
+ctx.transform(1,0.5,-0.5,1,30,10);
+setTimeout(function() {
+  var canvas = document.getElementById('canvas');
+  var ctx = canvas.getContext('2d');
+  var transform = ctx.mozCurrentTransformInverse;
+  ctx.mozCurrentTransformInverse = transform;
+  ctx.fillStyle = '#f00';
+  ctx.fillRect(0, 0, 100, 100);
+  document.documentElement.removeAttribute("class");
+}, 10)
+
+</script>
+</body></html>
--- a/dom/canvas/test/reftest/reftest.list
+++ b/dom/canvas/test/reftest/reftest.list
@@ -161,8 +161,12 @@ pref(canvas.customfocusring.enabled,true
 
 # Check that captureStream() displays in a local video element
 == capturestream.html wrapper.html?green.png
 
 fuzzy-if(azureSkia,16,2) fuzzy-if(Android,3,40) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),1,1) == 1177726-text-stroke-bounds.html 1177726-text-stroke-bounds-ref.html
 
 # Canvas Filter Reftests
 include filters/reftest.list
+
+# Bug 1305963
+== mozCurrentTransform.html mozCurrentTransform-ref.html
+== mozCurrentTransformInverse.html mozCurrentTransform-ref.html