Title: [123398] trunk/Source/WebKit/chromium
Revision
123398
Author
shawnsi...@chromium.org
Date
2012-07-23 16:06:13 -0700 (Mon, 23 Jul 2012)

Log Message

[chromium] Fix unit tests in debug mode after r123375
https://bugs.webkit.org/show_bug.cgi?id=92030

Reviewed by Adrienne Walker.

Fixed two unit tests that were causing debug assertions because
they gave calcDrawTransforms an empty sized root layer.

* tests/CCLayerTreeHostCommonTest.cpp:

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (123397 => 123398)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-07-23 22:57:31 UTC (rev 123397)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-07-23 23:06:13 UTC (rev 123398)
@@ -1,3 +1,15 @@
+2012-07-23  Shawn Singh  <shawnsi...@chromium.org>
+
+        [chromium] Fix unit tests in debug mode after r123375
+        https://bugs.webkit.org/show_bug.cgi?id=92030
+
+        Reviewed by Adrienne Walker.
+
+        Fixed two unit tests that were causing debug assertions because
+        they gave calcDrawTransforms an empty sized root layer.
+
+        * tests/CCLayerTreeHostCommonTest.cpp:
+
 2012-07-23  Simon Fraser  <simon.fra...@apple.com>
 
         Part 2 of: Implement sticky positioning

Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp (123397 => 123398)


--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp	2012-07-23 22:57:31 UTC (rev 123397)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp	2012-07-23 23:06:13 UTC (rev 123398)
@@ -160,14 +160,12 @@
     child->addChild(grandChild);
 
     WebTransformationMatrix identityMatrix;
-    setLayerPropertiesForTesting(parent.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(0, 0), false);
+    setLayerPropertiesForTesting(parent.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), false);
     setLayerPropertiesForTesting(child.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(0, 0), false);
     setLayerPropertiesForTesting(grandChild.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(0, 0), false);
 
     executeCalculateDrawTransformsAndVisibility(parent.get());
 
-    EXPECT_TRANSFORMATION_MATRIX_EQ(identityMatrix, parent->drawTransform());
-    EXPECT_TRANSFORMATION_MATRIX_EQ(identityMatrix, parent->screenSpaceTransform());
     EXPECT_TRANSFORMATION_MATRIX_EQ(identityMatrix, child->drawTransform());
     EXPECT_TRANSFORMATION_MATRIX_EQ(identityMatrix, child->screenSpaceTransform());
     EXPECT_TRANSFORMATION_MATRIX_EQ(identityMatrix, grandChild->drawTransform());
@@ -183,9 +181,11 @@
     // Case 1: setting the sublayer transform should not affect this layer's draw transform or screen-space transform.
     WebTransformationMatrix arbitraryTranslation;
     arbitraryTranslation.translate(10, 20);
-    setLayerPropertiesForTesting(layer.get(), identityMatrix, arbitraryTranslation, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(0, 0), false);
+    setLayerPropertiesForTesting(layer.get(), identityMatrix, arbitraryTranslation, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), false);
     executeCalculateDrawTransformsAndVisibility(layer.get());
-    EXPECT_TRANSFORMATION_MATRIX_EQ(identityMatrix, layer->drawTransform());
+    WebTransformationMatrix expectedDrawTransform = identityMatrix;
+    expectedDrawTransform.translate(50, 50);
+    EXPECT_TRANSFORMATION_MATRIX_EQ(expectedDrawTransform, layer->drawTransform());
     EXPECT_TRANSFORMATION_MATRIX_EQ(identityMatrix, layer->screenSpaceTransform());
 
     // Case 2: setting the bounds of the layer should result in a draw transform that translates to half the width and height.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to