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

Unified Diff: Source/web/tests/WebViewTest.cpp

Issue 473903002: Avoid auto-resize re-entrancy problems. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed incorrect return. Created 6 years, 4 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: Source/web/tests/WebViewTest.cpp
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp
index 35feefd9540a1cd157e02b3457f4e3f4021d5ce3..c1c2efc2a88bf50d850412044453f4da43b0e196 100644
--- a/Source/web/tests/WebViewTest.cpp
+++ b/Source/web/tests/WebViewTest.cpp
@@ -82,6 +82,7 @@
#include <gtest/gtest.h>
using namespace blink;
+using blink::FrameTestHelpers::loadFrame;
using blink::FrameTestHelpers::runPendingTasks;
using blink::URLTestHelpers::toKURL;
@@ -2155,4 +2156,20 @@ TEST_F(WebViewTest, CompareSelectAllToContentAsText)
EXPECT_EQ(expected, actual);
}
+TEST_F(WebViewTest, AutoResizeSubtreeLayout)
levin 2014/08/22 02:11:00 If you care about this area, and you seem to, ther
rune 2014/08/22 08:52:26 They pass for me when I enable them locally. Runn
+{
+ std::string url = m_baseURL + "subtree-layout.html";
+ URLTestHelpers::registerMockedURLLoad(toKURL(url), "subtree-layout.html");
+ WebView* webView = m_webViewHelper.initialize(true);
+
+ webView->enableAutoResizeMode(WebSize(200, 200), WebSize(200, 200));
+ loadFrame(webView->mainFrame(), url);
+
+ blink::FrameView* frameView = m_webViewHelper.webViewImpl()->mainFrameImpl()->frameView();
+
+ // Auto-resizing used to ASSERT(needsLayout()) in RenderBlockFlow::layout. This EXPECT is
+ // merely a dummy. The real test is that we don't trigger asserts in debug builds.
+ EXPECT_FALSE(frameView->needsLayout());
+};
+
} // namespace

Powered by Google App Engine
This is Rietveld 408576698