Update transform.js
authorBelem Zhang <belem.zhang@intel.com>
Fri, 23 Aug 2013 06:09:13 +0000 (14:09 +0800)
committerBelem Zhang <belem.zhang@intel.com>
Fri, 23 Aug 2013 06:09:13 +0000 (14:09 +0800)
tct-3dtransforms-css3-tests/3dtransforms/csswg/transforms.js

index 17e439cf847c927d177ad958c33e363c2baf8f63..e6616f9e362642448ced0fd2876470f4e877f4d9 100644 (file)
@@ -778,8 +778,17 @@ function testPerspective(value, originValue, expectedX, expectedY) {
  * Tests that getComputedStyle(div.parentNode).perspective is as one would
  * expect if it had the given perspective.
  */
-function testPerspectiveParsing(value) {
-//@{
+var tmp = null;
+var i = 0;
+
+function testPerspectiveParsingRun(value, i) {
+       var str;
+       if(i>0) {
+               str = "TC " + i + ": ";
+       } else {
+               str = '';
+       }
+       
        test(function() {
                var actual = getComputedStyle(div.parentNode)[prefixProp("perspective")];
                if (convertToPx(value) === null
@@ -789,7 +798,19 @@ function testPerspectiveParsing(value) {
                }
                assert_regexp_match(actual, /^[0-9]+(\.[0-9]+)?px$/, "Computed value has unexpected form");
                assert_approx_equals(parseFloat(actual), convertToPx(value), computedEpsilon);
-       }, "getComputedStyle(div.parentNode).perspective " + getStyleDescription());
+       }, str + "getComputedStyle(div.parentNode).perspective " + getStyleDescription());
+}
+
+function testPerspectiveParsing(value) {
+//@{
+       if (tmp != value) {
+               tmp = value;
+               i = 0;
+               testPerspectiveParsingRun(value, i)
+       } else {
+               i++;
+               testPerspectiveParsingRun(value, i);
+       }
 }
 //@}