Chromium Code Reviews| Index: third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp |
| diff --git a/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp b/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp |
| index 13d13fee9221ed14ec03c2e1e5677a53c04f525c..6e32342aed0a715c32d3d329d33a25d61d850e1a 100644 |
| --- a/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp |
| +++ b/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp |
| @@ -17,6 +17,7 @@ |
| #include "public/platform/WebLayer.h" |
| #include "public/web/WebFrameContentDumper.h" |
| #include "public/web/WebHitTestResult.h" |
| +#include "public/web/WebRuntimeFeatures.h" |
| #include "public/web/WebSettings.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| #include "web/WebLocalFrameImpl.h" |
| @@ -73,7 +74,7 @@ protected: |
| // Number of rectangles that make up the root layer's touch handler region. |
| size_t touchHandlerRegionSize() |
| { |
| - return webView().mainFrameImpl()->frame()->contentLayoutItem().layer()->graphicsLayerBacking()->platformLayer()->touchEventHandlerRegion().size(); |
| + return webView().mainFrameImpl()->frame()->contentLayoutItem().layer()->graphicsLayerBackingForScrolling()->platformLayer()->touchEventHandlerRegion().size(); |
| } |
| }; |
| @@ -311,7 +312,7 @@ TEST_F(FrameThrottlingTest, UnthrottlingTriggersRepaint) |
| // Scroll down to unthrottle the frame. The first frame we composite after |
| // scrolling won't contain the frame yet, but will schedule another repaint. |
| - webView().mainFrameImpl()->frameView()->setScrollPosition(DoublePoint(0, 480), ProgrammaticScroll); |
| + webView().mainFrameImpl()->frameView()->layoutViewportScrollableArea()->setScrollPosition(DoublePoint(0, 480), ProgrammaticScroll); |
| auto displayItems = compositeFrame(); |
| EXPECT_FALSE(displayItems.contains(SimCanvas::Rect, "green")); |
| @@ -347,7 +348,7 @@ TEST_F(FrameThrottlingTest, UnthrottlingTriggersRepaintInCompositedChild) |
| // Scroll down to unthrottle the frame. The first frame we composite after |
| // scrolling won't contain the frame yet, but will schedule another repaint. |
| - webView().mainFrameImpl()->frameView()->setScrollPosition(DoublePoint(0, 480), ProgrammaticScroll); |
| + webView().mainFrameImpl()->frameView()->layoutViewportScrollableArea()->setScrollPosition(DoublePoint(0, 480), ProgrammaticScroll); |
| auto displayItems = compositeFrame(); |
| EXPECT_FALSE(displayItems.contains(SimCanvas::Rect, "green")); |
| @@ -356,6 +357,7 @@ TEST_F(FrameThrottlingTest, UnthrottlingTriggersRepaintInCompositedChild) |
| EXPECT_TRUE(displayItems2.contains(SimCanvas::Rect, "green")); |
| } |
| + |
|
Sami
2016/09/07 14:48:43
Unintended whitespace?
szager1
2016/09/07 16:53:01
Fixed.
|
| TEST_F(FrameThrottlingTest, ChangeStyleInThrottledFrame) |
| { |
| // Create a hidden frame which is throttled. |
| @@ -377,7 +379,7 @@ TEST_F(FrameThrottlingTest, ChangeStyleInThrottledFrame) |
| frameElement->contentDocument()->body()->setAttribute(styleAttr, "background: green"); |
| // Scroll down to unthrottle the frame. |
| - webView().mainFrameImpl()->frameView()->setScrollPosition(DoublePoint(0, 480), ProgrammaticScroll); |
| + webView().mainFrameImpl()->frameView()->layoutViewportScrollableArea()->setScrollPosition(DoublePoint(0, 480), ProgrammaticScroll); |
| auto displayItems = compositeFrame(); |
| EXPECT_FALSE(displayItems.contains(SimCanvas::Rect, "red")); |
| EXPECT_FALSE(displayItems.contains(SimCanvas::Rect, "green")); |