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

Unified Diff: Source/web/tests/ScrollingCoordinatorChromiumTest.cpp

Issue 649563002: Set the scrollbarLayer as opaque after setupScrollbarLayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add win pixel test result Created 6 years, 2 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 | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/ScrollingCoordinatorChromiumTest.cpp
diff --git a/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp b/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp
index e3d5677429528de8e4d6504cb05ec066ab94d53c..cdf1a04d84dc8f968b4bf63e8d02589767c9c35f 100644
--- a/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp
+++ b/Source/web/tests/ScrollingCoordinatorChromiumTest.cpp
@@ -106,6 +106,11 @@ private:
FrameTestHelpers::WebViewHelper m_helper;
};
+class GraphicsLayerForScrollTesting : public GraphicsLayer {
+public:
+ virtual WebLayer* contentsLayer() const { return GraphicsLayer::contentsLayer(); }
+};
+
TEST_F(ScrollingCoordinatorChromiumTest, fastScrollingByDefault)
{
navigateTo("about:blank");
@@ -474,4 +479,32 @@ TEST_F(ScrollingCoordinatorChromiumTest, setupScrollbarLayerShouldNotCrash)
// an empty document by javascript.
}
+#if OS(MACOSX)
+TEST_F(ScrollingCoordinatorChromiumTest, DISABLED_setupScrollbarLayerShouldSetScrollLayerOpaque)
+#else
+TEST_F(ScrollingCoordinatorChromiumTest, setupScrollbarLayerShouldSetScrollLayerOpaque)
+#endif
+{
+ registerMockedHttpURLLoad("wide_document.html");
+ navigateTo(m_baseURL + "wide_document.html");
+ forceFullCompositingUpdate();
+
+ FrameView* frameView = frame()->view();
+ ASSERT_TRUE(frameView);
+
+ GraphicsLayerForScrollTesting* scrollbarGraphicsLayer = static_cast<GraphicsLayerForScrollTesting*>(frameView->layerForHorizontalScrollbar());
+ ASSERT_TRUE(scrollbarGraphicsLayer);
+
+ WebLayer* platformLayer = scrollbarGraphicsLayer->platformLayer();
+ ASSERT_TRUE(platformLayer);
+
+ WebLayer* contentsLayer = scrollbarGraphicsLayer->contentsLayer();
+ ASSERT_TRUE(contentsLayer);
+
+ // After scrollableAreaScrollbarLayerDidChange,
+ // if the main frame's scrollbarLayer is opaque,
+ // contentsLayer should be opaque too.
+ ASSERT_EQ(platformLayer->opaque(), contentsLayer->opaque());
+}
+
} // namespace
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698