| 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 09dd04d20f69f950dafe23dd5592a70bb86a7c5d..34d1f0a54bea09b9afa1882ebf9ed985f8d12077 100644
|
| --- a/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp
|
| @@ -264,9 +264,9 @@ TEST_F(FrameThrottlingTest, UnthrottlingTriggersRepaint)
|
| // Move the frame offscreen to throttle it.
|
| auto* frameElement = toHTMLIFrameElement(document().getElementById("frame"));
|
| frameElement->setAttribute(styleAttr, "transform: translateY(480px)");
|
| - EXPECT_FALSE(frameElement->contentDocument()->view()->shouldThrottleRendering());
|
| + EXPECT_FALSE(frameElement->contentDocument()->view()->canThrottleRendering());
|
| compositeFrame();
|
| - EXPECT_TRUE(frameElement->contentDocument()->view()->shouldThrottleRendering());
|
| + EXPECT_TRUE(frameElement->contentDocument()->view()->canThrottleRendering());
|
|
|
| // Scroll down to unthrottle the frame. The first frame we composite after
|
| // scrolling won't contain the frame yet, but will schedule another repaint.
|
| @@ -292,9 +292,9 @@ TEST_F(FrameThrottlingTest, ChangeStyleInThrottledFrame)
|
| // Move the frame offscreen to throttle it.
|
| auto* frameElement = toHTMLIFrameElement(document().getElementById("frame"));
|
| frameElement->setAttribute(styleAttr, "transform: translateY(480px)");
|
| - EXPECT_FALSE(frameElement->contentDocument()->view()->shouldThrottleRendering());
|
| + EXPECT_FALSE(frameElement->contentDocument()->view()->canThrottleRendering());
|
| compositeFrame();
|
| - EXPECT_TRUE(frameElement->contentDocument()->view()->shouldThrottleRendering());
|
| + EXPECT_TRUE(frameElement->contentDocument()->view()->canThrottleRendering());
|
|
|
| // Change the background color of the frame's contents from red to green.
|
| frameElement->contentDocument()->body()->setAttribute(styleAttr, "background: green");
|
| @@ -338,7 +338,7 @@ TEST(RemoteFrameThrottlingTest, ThrottledLocalRoot)
|
| frameView->frame().securityContext()->setSecurityOrigin(SecurityOrigin::createUnique());
|
| frameView->updateAllLifecyclePhases();
|
| testing::runPendingTasks();
|
| - EXPECT_TRUE(frameView->shouldThrottleRendering());
|
| + EXPECT_TRUE(frameView->canThrottleRendering());
|
|
|
| Document* frameDocument = frameView->frame().document();
|
| EXPECT_EQ(DocumentLifecycle::PaintClean, frameDocument->lifecycle().state());
|
| @@ -350,6 +350,7 @@ TEST(RemoteFrameThrottlingTest, ThrottledLocalRoot)
|
|
|
| // Update the lifecycle again. The frame's lifecycle should not advance
|
| // because of throttling even though it is the local root.
|
| + DocumentLifecycle::AllowThrottlingScope throttlingScope(frameDocument->lifecycle());
|
| frameView->updateAllLifecyclePhases();
|
| testing::runPendingTasks();
|
| EXPECT_EQ(DocumentLifecycle::VisualUpdatePending, frameDocument->lifecycle().state());
|
|
|