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

Unified Diff: webkit/tools/test_shell/test_webview_delegate.h

Issue 212053: Fake main window resizing in the test shell.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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: webkit/tools/test_shell/test_webview_delegate.h
===================================================================
--- webkit/tools/test_shell/test_webview_delegate.h (revision 26736)
+++ webkit/tools/test_shell/test_webview_delegate.h (working copy)
@@ -25,8 +25,8 @@
#include "base/scoped_ptr.h"
#include "base/weak_ptr.h"
#include "webkit/api/public/WebFrameClient.h"
+#include "webkit/api/public/WebRect.h"
#if defined(OS_MACOSX)
-#include "webkit/api/public/WebRect.h"
#include "webkit/api/public/WebPopupMenuInfo.h"
#endif
#include "webkit/glue/webcursor.h"
@@ -306,6 +306,16 @@
// test.
void LocationChangeDone(WebKit::WebFrame*);
+ // Tests that require moving or resizing the main window (via resizeTo() or
+ // moveTo()) pass in Chrome even though Chrome disregards move requests for
+ // non-popup windows (see TabContents::RequestMove()). These functions allow
+ // the test shell to mimic its behavior. If setWindowRect() is called for
+ // the main window, the passed inWebRect is saved as fake_rect_ and we return
dglazkov 2009/09/23 18:17:14 ... passed in WebRect ...
+ // it instead of the real window dimensions whenever rootWindowRect() is
+ // called.
+ WebKit::WebRect getFakeWindowRect();
+ void setFakeWindowRect(const WebKit::WebRect&);
dglazkov 2009/09/23 18:17:14 these could be just straight accessor-style fake_w
+
WebWidgetHost* GetWidgetHost();
void UpdateForCommittedLoad(WebKit::WebFrame* webframe, bool is_new_navigation);
@@ -349,6 +359,9 @@
WebCursor current_cursor_;
+ WebKit::WebRect fake_rect_;
+ bool using_fake_rect_;
+
#if defined(OS_WIN)
// Classes needed by drag and drop.
scoped_refptr<TestDragDelegate> drag_delegate_;

Powered by Google App Engine
This is Rietveld 408576698