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

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

Issue 1591013: Fix drag&drop layout tests. (Closed)
Patch Set: '' Created 10 years, 9 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
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_webview_delegate.cc
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 3446a7d3de640b686fb0f8130894bd91e633b25d..9a5b2d2aed374da631eeca114de7bf57b8502561 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -23,6 +23,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebData.h"
#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/WebImage.h"
#include "third_party/WebKit/WebKit/chromium/public/WebHistoryItem.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
@@ -73,6 +74,7 @@ using WebKit::WebDragOperationsMask;
using WebKit::WebEditingAction;
using WebKit::WebFormElement;
using WebKit::WebFrame;
+using WebKit::WebImage;
using WebKit::WebHistoryItem;
using WebKit::WebMediaPlayer;
using WebKit::WebMediaPlayerClient;
@@ -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);
+ image_offset, 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.
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698