Bug 946529 - Fix bug in transform parsing mochitest; r=longsonr
authorBrian Birtles <birtles@gmail.com>
Mon, 09 Dec 2013 08:55:17 +0900
changeset 174173 0ba0b5224e041dab8becad23e78459810aaf73dc
parent 174172 521a84fc4f6fa242bf23ac46755bb1351fe0217b
child 174174 f749a52bd4e64ff9456e3b13a2d0baa7e2c97f35
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslongsonr
bugs946529
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 946529 - Fix bug in transform parsing mochitest; r=longsonr
content/svg/content/test/test_transformParsing.html
--- a/content/svg/content/test/test_transformParsing.html
+++ b/content/svg/content/test/test_transformParsing.html
@@ -60,33 +60,33 @@ function checkParseOk(spec, expected) {
   for (var i=0; i < transformList.numberOfItems; i++) {
     checkTransform(transformList.getItem(i), expected[i], spec, i);
   }
 }
 
 function checkTransform(transform, expected, spec, index) {
   var typeMapping = {
     "unknown": SVGTransform.SVG_TRANSFORM_UNKNOWN,
-    "matrix": SVGTransform.SVG_TRANSFORM_UNKNOWN,
-    "translate": SVGTransform.SVG_TRANSFORM_UNKNOWN,
-    "scale": SVGTransform.SVG_TRANSFORM_UNKNOWN,
-    "rotate": SVGTransform.SVG_TRANSFORM_UNKNOWN,
-    "skewx": SVGTransform.SVG_TRANSFORM_UNKNOWN,
-    "skewy": SVGTransform.SVG_TRANSFORM_UNKNOWN
+    "matrix": SVGTransform.SVG_TRANSFORM_MATRIX,
+    "translate": SVGTransform.SVG_TRANSFORM_TRANSLATE,
+    "scale": SVGTransform.SVG_TRANSFORM_SCALE,
+    "rotate": SVGTransform.SVG_TRANSFORM_ROTATE,
+    "skewx": SVGTransform.SVG_TRANSFORM_SKEWX,
+    "skewy": SVGTransform.SVG_TRANSFORM_SKEWY
   };
   var name = "Item " + index + " of '" + spec + "'";
 
   // Compare type
-  if (typeof spec.type != "undefined") {
-    ise(transform.type, typeMapping[spec.type], name + " - transform type");
+  if (typeof expected.type != "undefined") {
+    ise(transform.type, typeMapping[expected.type], name + " - transform type");
   }
 
   // Compare angle
-  if (typeof spec.angle != "undefined") {
-    ise(transform.angle, spec.angle, name + " - angle");
+  if (typeof expected.angle != "undefined") {
+    ise(transform.angle, expected.angle, name + " - angle");
   }
 
   // Compare matrix values (roughly)
   ['a', 'b', 'c', 'd', 'e', 'f'].forEach(function(item) {
     var actual = transform.matrix[item];
     var msg = name + " - matrix:" + item;
     const tolerance = 1 / 65535;
     ok(Math.abs(actual - expected[item]) < tolerance,