| 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 b2e6e095f0f9840e161dccf0f2c46bc41dcfda51..5752b1b118c715fec5eab2283d0edcbdf89aec53 100644
|
| --- a/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp
|
| @@ -778,7 +778,7 @@ TEST_F(FrameThrottlingTest, ThrottleSubtreeAtomically) {
|
| // observer notifications.
|
| frameElement->contentDocument()
|
| ->view()
|
| - ->notifyRenderThrottlingObserversForTesting();
|
| + ->updateRenderThrottlingStatusForTesting();
|
| EXPECT_TRUE(frameElement->contentDocument()->view()->canThrottleRendering());
|
| EXPECT_TRUE(
|
| childFrameElement->contentDocument()->view()->canThrottleRendering());
|
| @@ -786,10 +786,34 @@ TEST_F(FrameThrottlingTest, ThrottleSubtreeAtomically) {
|
| // Both frames should still be throttled after the second notification.
|
| childFrameElement->contentDocument()
|
| ->view()
|
| - ->notifyRenderThrottlingObserversForTesting();
|
| + ->updateRenderThrottlingStatusForTesting();
|
| EXPECT_TRUE(frameElement->contentDocument()->view()->canThrottleRendering());
|
| EXPECT_TRUE(
|
| childFrameElement->contentDocument()->view()->canThrottleRendering());
|
| +
|
| + // Move the frame back on screen but don't update throttling yet.
|
| + frameElement->setAttribute(styleAttr, "transform: translateY(0px)");
|
| + compositor().beginFrame();
|
| + EXPECT_TRUE(frameElement->contentDocument()->view()->canThrottleRendering());
|
| + EXPECT_TRUE(
|
| + childFrameElement->contentDocument()->view()->canThrottleRendering());
|
| +
|
| + // Update throttling for the child. It should remain throttled because the
|
| + // parent is still throttled.
|
| + childFrameElement->contentDocument()
|
| + ->view()
|
| + ->updateRenderThrottlingStatusForTesting();
|
| + EXPECT_TRUE(frameElement->contentDocument()->view()->canThrottleRendering());
|
| + EXPECT_TRUE(
|
| + childFrameElement->contentDocument()->view()->canThrottleRendering());
|
| +
|
| + // Updating throttling on the parent should unthrottle both frames.
|
| + frameElement->contentDocument()
|
| + ->view()
|
| + ->updateRenderThrottlingStatusForTesting();
|
| + EXPECT_FALSE(frameElement->contentDocument()->view()->canThrottleRendering());
|
| + EXPECT_FALSE(
|
| + childFrameElement->contentDocument()->view()->canThrottleRendering());
|
| }
|
|
|
| TEST_F(FrameThrottlingTest, SkipPaintingLayersInThrottledFrames) {
|
|
|