Index: third_party/WebKit/Source/web/tests/RootScrollerTest.cpp |
diff --git a/third_party/WebKit/Source/web/tests/RootScrollerTest.cpp b/third_party/WebKit/Source/web/tests/RootScrollerTest.cpp |
index 465e8ffd860b4804205e9231cec0c9cb3d3854f3..f2b6df045515c6e1ff44c700c466a7d70a9a6425 100644 |
--- a/third_party/WebKit/Source/web/tests/RootScrollerTest.cpp |
+++ b/third_party/WebKit/Source/web/tests/RootScrollerTest.cpp |
@@ -8,6 +8,7 @@ |
#include "core/html/HTMLFrameOwnerElement.h" |
#include "core/page/Page.h" |
#include "core/page/scrolling/RootScrollerController.h" |
+#include "core/page/scrolling/TopDocumentRootScrollerController.h" |
#include "core/paint/PaintLayerScrollableArea.h" |
#include "platform/testing/URLTestHelpers.h" |
#include "platform/testing/UnitTestHelpers.h" |
@@ -510,8 +511,8 @@ TEST_F(RootScrollerTest, SetRootScrollerIframeUsesCorrectLayerAndCallback) |
Element* container = |
iframe->contentDocument()->getElementById("container"); |
- RootScrollerController* mainController = |
- mainFrame()->document()->rootScrollerController(); |
+ TopDocumentRootScrollerController& mainController = |
tdresser
2016/08/30 15:05:30
Can this be const?
bokan
2016/08/30 16:13:39
Done.
|
+ mainFrame()->document()->frameHost()->globalRootScrollerController(); |
NonThrowableExceptionState nonThrow; |
@@ -519,9 +520,9 @@ TEST_F(RootScrollerTest, SetRootScrollerIframeUsesCorrectLayerAndCallback) |
// and the main FrameView's scroll layer should be the layer to use. |
{ |
EXPECT_EQ( |
- mainController->rootScrollerLayer(), |
+ mainController.rootScrollerLayer(), |
mainFrameView()->layerForScrolling()); |
- EXPECT_TRUE(mainController->isViewportScrollCallback( |
+ EXPECT_TRUE(mainController.isViewportScrollCallback( |
mainFrame()->document()->documentElement()->getApplyScroll())); |
} |
@@ -532,9 +533,9 @@ TEST_F(RootScrollerTest, SetRootScrollerIframeUsesCorrectLayerAndCallback) |
iframe->contentDocument()->setRootScroller(container, nonThrow); |
EXPECT_EQ( |
- mainController->rootScrollerLayer(), |
+ mainController.rootScrollerLayer(), |
mainFrameView()->layerForScrolling()); |
- EXPECT_TRUE(mainController->isViewportScrollCallback( |
+ EXPECT_TRUE(mainController.isViewportScrollCallback( |
mainFrame()->document()->documentElement()->getApplyScroll())); |
} |
@@ -549,11 +550,11 @@ TEST_F(RootScrollerTest, SetRootScrollerIframeUsesCorrectLayerAndCallback) |
toLayoutBox(container->layoutObject())->getScrollableArea()); |
EXPECT_EQ( |
- mainController->rootScrollerLayer(), |
+ mainController.rootScrollerLayer(), |
containerScroller->layerForScrolling()); |
- EXPECT_FALSE(mainController->isViewportScrollCallback( |
+ EXPECT_FALSE(mainController.isViewportScrollCallback( |
mainFrame()->document()->documentElement()->getApplyScroll())); |
- EXPECT_TRUE(mainController->isViewportScrollCallback( |
+ EXPECT_TRUE(mainController.isViewportScrollCallback( |
container->getApplyScroll())); |
} |
@@ -563,13 +564,13 @@ TEST_F(RootScrollerTest, SetRootScrollerIframeUsesCorrectLayerAndCallback) |
{ |
iframe->contentDocument()->setRootScroller(nullptr, nonThrow); |
EXPECT_EQ( |
- mainController->rootScrollerLayer(), |
+ mainController.rootScrollerLayer(), |
iframe->contentDocument()->view()->layerForScrolling()); |
- EXPECT_FALSE(mainController->isViewportScrollCallback( |
+ EXPECT_FALSE(mainController.isViewportScrollCallback( |
container->getApplyScroll())); |
- EXPECT_FALSE(mainController->isViewportScrollCallback( |
+ EXPECT_FALSE(mainController.isViewportScrollCallback( |
mainFrame()->document()->documentElement()->getApplyScroll())); |
- EXPECT_TRUE(mainController->isViewportScrollCallback( |
+ EXPECT_TRUE(mainController.isViewportScrollCallback( |
iframe->contentDocument()->documentElement()->getApplyScroll())); |
} |
@@ -578,13 +579,13 @@ TEST_F(RootScrollerTest, SetRootScrollerIframeUsesCorrectLayerAndCallback) |
{ |
mainFrame()->document()->setRootScroller(nullptr, nonThrow); |
EXPECT_EQ( |
- mainController->rootScrollerLayer(), |
+ mainController.rootScrollerLayer(), |
mainFrameView()->layerForScrolling()); |
- EXPECT_TRUE(mainController->isViewportScrollCallback( |
+ EXPECT_TRUE(mainController.isViewportScrollCallback( |
mainFrame()->document()->documentElement()->getApplyScroll())); |
- EXPECT_FALSE(mainController->isViewportScrollCallback( |
+ EXPECT_FALSE(mainController.isViewportScrollCallback( |
container->getApplyScroll())); |
- EXPECT_FALSE(mainController->isViewportScrollCallback( |
+ EXPECT_FALSE(mainController.isViewportScrollCallback( |
iframe->contentDocument()->documentElement()->getApplyScroll())); |
} |
} |