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

Unified Diff: third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp

Issue 1696233002: Make render pipeline throttling opt-in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows build fix. Created 4 years, 10 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 | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698