diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-05 21:42:11 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-05 21:42:11 +0000 |
commit | 9df1e3015f43cecc69ded3399bbf3049b3b4768e (patch) | |
tree | 205aa6659ca2806b2b1ecb106fb841b6f71cc830 | |
parent | bb9a72b14465e7d74543afe1bdec8ae31486ee02 (diff) | |
download | chromium_src-9df1e3015f43cecc69ded3399bbf3049b3b4768e.zip chromium_src-9df1e3015f43cecc69ded3399bbf3049b3b4768e.tar.gz chromium_src-9df1e3015f43cecc69ded3399bbf3049b3b4768e.tar.bz2 |
Update test shell for new dragImage api.
I don't think this actually caused the layout test failures, but it is worth tidying up anyway.
patch mostly by Nico Weber
BUG=none
TEST=layout tests
Review URL: http://codereview.chromium.org/1519018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43653 0039d316-1c4b-4281-b951-d872f2087c98
4 files changed, 18 insertions, 7 deletions
diff --git a/webkit/tools/test_shell/event_sending_controller.cc b/webkit/tools/test_shell/event_sending_controller.cc index de2d664..10fb325 100644 --- a/webkit/tools/test_shell/event_sending_controller.cc +++ b/webkit/tools/test_shell/event_sending_controller.cc @@ -336,8 +336,7 @@ WebView* EventSendingController::webview() { return shell_->webView(); } -void EventSendingController::DoDragDrop(const WebKit::WebPoint &event_pos, - const WebDragData& drag_data, +void EventSendingController::DoDragDrop(const WebDragData& drag_data, WebDragOperationsMask mask) { WebMouseEvent event; InitMouseEvent(WebInputEvent::MouseDown, pressed_button_, last_mouse_pos_, &event); diff --git a/webkit/tools/test_shell/event_sending_controller.h b/webkit/tools/test_shell/event_sending_controller.h index da7e4df..e7db529 100644 --- a/webkit/tools/test_shell/event_sending_controller.h +++ b/webkit/tools/test_shell/event_sending_controller.h @@ -41,8 +41,7 @@ class EventSendingController : public CppBoundClass { void Reset(); // Simulate drag&drop system call. - void DoDragDrop(const WebKit::WebPoint &event_pos, - const WebKit::WebDragData& drag_data, + void DoDragDrop(const WebKit::WebDragData& drag_data, WebKit::WebDragOperationsMask operations_mask); // JS callback methods. diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index 3446a7d..e3600cd 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -24,6 +24,7 @@ #include "third_party/WebKit/WebKit/chromium/public/WebDataSource.h" #include "third_party/WebKit/WebKit/chromium/public/WebDragData.h" #include "third_party/WebKit/WebKit/chromium/public/WebHistoryItem.h" +#include "third_party/WebKit/WebKit/chromium/public/WebImage.h" #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" #include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h" @@ -74,6 +75,7 @@ using WebKit::WebEditingAction; using WebKit::WebFormElement; using WebKit::WebFrame; using WebKit::WebHistoryItem; +using WebKit::WebImage; using WebKit::WebMediaPlayer; using WebKit::WebMediaPlayerClient; using WebKit::WebNavigationType; @@ -547,8 +549,16 @@ void TestWebViewDelegate::setStatusText(const WebString& text) { } void TestWebViewDelegate::startDragging( - const WebPoint& mouse_coords, const WebDragData& data, - WebDragOperationsMask mask) { + const WebPoint& from, const WebDragData& data, + WebDragOperationsMask allowed_mask) { + startDragging(data, allowed_mask, WebImage(), WebPoint()); +} + +void TestWebViewDelegate::startDragging( + const WebDragData& data, + WebDragOperationsMask mask, + const WebImage& image, + const WebPoint& image_offset) { if (WebKit::layoutTestMode()) { WebDragData mutable_drag_data = data; if (shell_->layout_test_controller()->ShouldAddFileToPasteboard()) { @@ -559,7 +569,7 @@ void TestWebViewDelegate::startDragging( // When running a test, we need to fake a drag drop operation otherwise // Windows waits for real mouse events to know when the drag is over. shell_->event_sending_controller()->DoDragDrop( - mouse_coords, mutable_drag_data, mask); + mutable_drag_data, mask); } else { // TODO(tc): Drag and drop is disabled in the test shell because we need // to be able to convert from WebDragData to an IDataObject. diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h index 762fc25..cfdabe0 100644 --- a/webkit/tools/test_shell/test_webview_delegate.h +++ b/webkit/tools/test_shell/test_webview_delegate.h @@ -124,6 +124,9 @@ class TestWebViewDelegate : public WebKit::WebViewClient, virtual void startDragging( const WebKit::WebPoint& from, const WebKit::WebDragData& data, WebKit::WebDragOperationsMask mask); + virtual void startDragging( + const WebKit::WebDragData& data, WebKit::WebDragOperationsMask mask, + const WebKit::WebImage& image, const WebKit::WebPoint& offset); virtual void navigateBackForwardSoon(int offset); virtual int historyBackListCount(); virtual int historyForwardListCount(); |