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

Unified Diff: Tools/DumpRenderTree/chromium/WebViewHost.cpp

Issue 14776006: Add an interface to WebTestDelegate for auto resizing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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: Tools/DumpRenderTree/chromium/WebViewHost.cpp
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.cpp b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
index b7369bcdbf41fe305e70c8970c6998b032d2711e..73b82b09bfc06a3985600e957bc6d96875754672 100644
--- a/Tools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -844,6 +844,18 @@ void WebViewHost::setClientWindowRect(const WebKit::WebRect& rect)
setWindowRect(rect);
}
+void WebViewHost::enableAutoResizeMode(const WebSize& minSize, const WebSize& maxSize)
+{
+ webView()->enableAutoResizeMode(minSize, maxSize);
+}
+
+void WebViewHost::disableAutoResizeMode(const WebKit::WebSize& newSize)
+{
+ setWindowRect(WebRect(0, 0, newSize.width, newSize.height));
+ webView()->disableAutoResizeMode();
+ webView()->resize(newSize);
+}
+
bool WebViewHost::navigate(const TestNavigationEntry& entry, bool reload)
{
// Get the right target frame for the entry.

Powered by Google App Engine
This is Rietveld 408576698