| Index: third_party/WebKit/Source/web/tests/DocumentLoadingRenderingTest.cpp
|
| diff --git a/third_party/WebKit/Source/web/tests/DocumentLoadingRenderingTest.cpp b/third_party/WebKit/Source/web/tests/DocumentLoadingRenderingTest.cpp
|
| index db54b4ac706c7fb35be0bdb33f05bf7093fa3e6c..cc69fe6b751b0afcf69e98eaed069e6203efa7de 100644
|
| --- a/third_party/WebKit/Source/web/tests/DocumentLoadingRenderingTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/DocumentLoadingRenderingTest.cpp
|
| @@ -291,4 +291,22 @@ TEST_F(DocumentLoadingRenderingTest, ShouldNotPaintIframeContentWithPendingSheet
|
| EXPECT_TRUE(frame3.containsText());
|
| }
|
|
|
| +TEST_F(DocumentLoadingRenderingTest, ShouldNotLayoutBeforeNavigation)
|
| +{
|
| + EXPECT_TRUE(compositor().deferCommits());
|
| + EXPECT_FALSE(hadFirstLayout());
|
| +
|
| + // Blink embedder may resize the WebView before navigation, but it shouldn't
|
| + // trigger empty layout.
|
| + webView().resize(WebSize(800, 600));
|
| + EXPECT_TRUE(compositor().deferCommits());
|
| + EXPECT_FALSE(hadFirstLayout());
|
| +
|
| + // Blink embedder may set focus on the WebView before navigation,
|
| + // but it shouldn't trigger empty layout.
|
| + webView().setFocus(true);
|
| + EXPECT_TRUE(compositor().deferCommits());
|
| + EXPECT_FALSE(hadFirstLayout());
|
| +}
|
| +
|
| } // namespace blink
|
|
|