Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/GeometryPropertyTreeStateTest.cpp

Issue 2338373004: Refactor PropertyTreeState as GeometryPropertyTreeState (Closed)
Patch Set: Rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/paint/GeometryPropertyTreeStateTest.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeStateTest.cpp b/third_party/WebKit/Source/platform/graphics/paint/GeometryPropertyTreeStateTest.cpp
similarity index 50%
rename from third_party/WebKit/Source/platform/graphics/paint/PropertyTreeStateTest.cpp
rename to third_party/WebKit/Source/platform/graphics/paint/GeometryPropertyTreeStateTest.cpp
index d816a4ec94fb8d17d66462b7c24cec889b3445b2..ae4a56d48a06604b480efa5f0ad3ef5d3f9cfc88 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeStateTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/GeometryPropertyTreeStateTest.cpp
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "platform/graphics/paint/PropertyTreeState.h"
+#include "platform/graphics/paint/GeometryPropertyTreeState.h"
#include "platform/geometry/LayoutRect.h"
#include "platform/graphics/paint/ClipPaintPropertyNode.h"
@@ -12,15 +12,15 @@
namespace blink {
-class PropertyTreeStateTest : public ::testing::Test {
+class GeometryPropertyTreeStateTest : public ::testing::Test {
public:
RefPtr<TransformPaintPropertyNode> rootTransformNode;
RefPtr<ClipPaintPropertyNode> rootClipNode;
RefPtr<EffectPaintPropertyNode> rootEffectNode;
- PropertyTreeState rootPropertyTreeState()
+ GeometryPropertyTreeState rootGeometryPropertyTreeState()
{
- PropertyTreeState state(rootTransformNode.get(), rootClipNode.get(), rootEffectNode.get());
+ GeometryPropertyTreeState state(rootTransformNode.get(), rootClipNode.get(), rootEffectNode.get());
return state;
}
@@ -33,26 +33,26 @@ private:
}
};
-TEST_F(PropertyTreeStateTest, LeastCommonAncestor)
+TEST_F(GeometryPropertyTreeStateTest, LeastCommonAncestor)
{
TransformationMatrix matrix;
- RefPtr<TransformPaintPropertyNode> child1 = TransformPaintPropertyNode::create(rootPropertyTreeState().transform, matrix, FloatPoint3D());
- RefPtr<TransformPaintPropertyNode> child2 = TransformPaintPropertyNode::create(rootPropertyTreeState().transform, matrix, FloatPoint3D());
+ RefPtr<TransformPaintPropertyNode> child1 = TransformPaintPropertyNode::create(rootGeometryPropertyTreeState().transform, matrix, FloatPoint3D());
+ RefPtr<TransformPaintPropertyNode> child2 = TransformPaintPropertyNode::create(rootGeometryPropertyTreeState().transform, matrix, FloatPoint3D());
RefPtr<TransformPaintPropertyNode> childOfChild1 = TransformPaintPropertyNode::create(child1, matrix, FloatPoint3D());
RefPtr<TransformPaintPropertyNode> childOfChild2 = TransformPaintPropertyNode::create(child2, matrix, FloatPoint3D());
- EXPECT_EQ(rootPropertyTreeState().transform, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(childOfChild1.get(), childOfChild2.get()));
- EXPECT_EQ(rootPropertyTreeState().transform, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(childOfChild1.get(), child2.get()));
- EXPECT_EQ(rootPropertyTreeState().transform, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(childOfChild1.get(), rootPropertyTreeState().transform.get()));
+ EXPECT_EQ(rootGeometryPropertyTreeState().transform, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(childOfChild1.get(), childOfChild2.get()));
+ EXPECT_EQ(rootGeometryPropertyTreeState().transform, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(childOfChild1.get(), child2.get()));
+ EXPECT_EQ(rootGeometryPropertyTreeState().transform, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(childOfChild1.get(), rootGeometryPropertyTreeState().transform.get()));
EXPECT_EQ(child1, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(childOfChild1.get(), child1.get()));
- EXPECT_EQ(rootPropertyTreeState().transform, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(childOfChild2.get(), childOfChild1.get()));
- EXPECT_EQ(rootPropertyTreeState().transform, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(childOfChild2.get(), child1.get()));
- EXPECT_EQ(rootPropertyTreeState().transform, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(childOfChild2.get(), rootPropertyTreeState().transform.get()));
+ EXPECT_EQ(rootGeometryPropertyTreeState().transform, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(childOfChild2.get(), childOfChild1.get()));
+ EXPECT_EQ(rootGeometryPropertyTreeState().transform, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(childOfChild2.get(), child1.get()));
+ EXPECT_EQ(rootGeometryPropertyTreeState().transform, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(childOfChild2.get(), rootGeometryPropertyTreeState().transform.get()));
EXPECT_EQ(child2, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(childOfChild2.get(), child2.get()));
- EXPECT_EQ(rootPropertyTreeState().transform, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(child1.get(), child2.get()));
+ EXPECT_EQ(rootGeometryPropertyTreeState().transform, propertyTreeNearestCommonAncestor<TransformPaintPropertyNode>(child1.get(), child2.get()));
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698