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

Unified Diff: content/test/layouttest_support.cc

Issue 14859017: [content shell] implement auto resize related WebTestDelegate interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates 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: content/test/layouttest_support.cc
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
index a186e191ff4beeee921a6dbbe48902c310626307..05be2315597c4d378ee35bf97082638d02faf338 100644
--- a/content/test/layouttest_support.cc
+++ b/content/test/layouttest_support.cc
@@ -24,6 +24,7 @@
#endif
using WebKit::WebGamepads;
+using WebKit::WebSize;
using WebTestRunner::WebTestProxy;
using WebTestRunner::WebTestProxyBase;
@@ -95,7 +96,7 @@ void EnableShortCircuitSizeUpdates() {
}
void ForceResizeRenderView(RenderView* render_view,
- const WebKit::WebSize& new_size) {
+ const WebSize& new_size) {
static_cast<RenderViewImpl*>(render_view)->didAutoResize(new_size);
}
@@ -120,4 +121,16 @@ void DisableModalPopupMenus() {
#endif
}
+void EnableAutoResizeMode(RenderView* render_view,
+ const WebSize& min_size,
+ const WebSize& max_size) {
+ static_cast<RenderViewImpl*>(render_view)
+ ->EnableAutoResizeForTesting(min_size, max_size);
+}
+
+void DisableAutoResizeMode(RenderView* render_view, const WebSize& new_size) {
+ static_cast<RenderViewImpl*>(render_view)
+ ->DisableAutoResizeForTesting(new_size);
+}
+
} // namespace content
« content/shell/renderer/webkit_test_runner.cc ('K') | « content/shell/renderer/webkit_test_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698