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

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

Issue 2345403003: Add background attachment fixed main thread scrolling reason [spv2] (Closed)
Patch Set: Generalize the setters and getters for main thread reasons 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/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 7b7729cfd27b1084020ef1fc382c5a78a2dcc9dc..93867044f04a3a61e37e4618b297e97550b33363 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
@@ -569,6 +569,8 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, OneScrollNode)
EXPECT_TRUE(transformNode.local.IsIdentity());
EXPECT_EQ(gfx::ScrollOffset(-7, -9), scrollTree.current_scroll_offset(contentLayerAt(0)->id()));
+
+ EXPECT_EQ(MainThreadScrollingReason::kNotScrollingOnMain, scrollNode.main_thread_scrolling_reasons);
}
TEST_F(PaintArtifactCompositorTestWithPropertyTrees, NestedScrollNodes)
@@ -583,7 +585,7 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, NestedScrollNodes)
scrollTranslationA, TransformationMatrix().translate(37, 41), FloatPoint3D());
RefPtr<ScrollPaintPropertyNode> scrollB = ScrollPaintPropertyNode::create(
scrollA, scrollTranslationB, IntSize(19, 23), IntSize(29, 31), true, false);
-
+ scrollB->addMainThreadScrollingReasons(MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects);
TestPaintArtifact artifact;
artifact.chunk(scrollTranslationA, nullptr, effect, scrollA)
.rectDrawing(FloatRect(7, 11, 13, 17), Color::white);
@@ -615,6 +617,10 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, NestedScrollNodes)
EXPECT_EQ(gfx::ScrollOffset(-11, -13), scrollTree.current_scroll_offset(contentLayerAt(0)->id()));
EXPECT_EQ(gfx::ScrollOffset(-37, -41), scrollTree.current_scroll_offset(contentLayerAt(1)->id()));
+
+ // The main thread scrolling bits from scrollNodeB should have been propagated to scrollNodeA.
pdr. 2016/09/19 21:36:45 The CQ failed because of this test. This was writt
+ EXPECT_TRUE(scrollNodeA.main_thread_scrolling_reasons & MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects);
+ EXPECT_TRUE(scrollNodeB.main_thread_scrolling_reasons & MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects);
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698