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

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

Issue 1397713004: Don't bother layout until first navigation is done. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another attempt to fix tests 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
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
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/web/tests/TextFinderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698