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

Unified Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp

Issue 2122983002: [SPv2] Add unit test for foreign layers in layer list path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
index 457411c1749dff58aee7c3132538a900ec05b1a6..b995dcb3a70a39a409627e70682cf2e6a9e53d87 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
@@ -518,6 +518,20 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, TransformCombining)
contentLayerAt(1)->transform_tree_index());
}
+TEST_F(PaintArtifactCompositorTestWithPropertyTrees, ForeignLayerPassesThrough)
pdr. 2016/07/06 23:23:23 WDYT about extracting this out so PaintArtifactCom
jbroman 2016/07/07 00:18:45 It's rough, because this one isn't that long, and
+{
+ scoped_refptr<cc::Layer> layer = cc::Layer::Create();
+
+ TestPaintArtifact artifact;
+ artifact.chunk(PaintChunkProperties())
+ .foreignLayer(FloatPoint(50, 100), IntSize(400, 300), layer);
+ update(artifact.build());
+
+ ASSERT_EQ(1u, contentLayerCount());
+ EXPECT_EQ(layer, contentLayerAt(0));
+ EXPECT_EQ(gfx::Size(400, 300), layer->bounds());
+ EXPECT_EQ(translation(50, 100), layer->screen_space_transform());
+}
} // namespace
} // namespace blink
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698