- Revision
- 135006
- Author
- [email protected]
- Date
- 2012-11-16 14:51:12 -0800 (Fri, 16 Nov 2012)
Log Message
[chromium] fake drag drop operations in the WebTestProxyBase instead of the WebViewHost
https://bugs.webkit.org/show_bug.cgi?id=102495
Reviewed by Adam Barth.
When a drag operation is initiated in a layout test, we need to
simulate a corresponding drop event, otherwise the WebViewImpl will sit
there waiting for it. Instead of having the embedder taking care of
this, move this into the TestRunner library.
* DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
(WebKit):
(WebTestProxyBase):
(WebTestRunner::WebTestProxy::startDragging):
* DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
(WebTestRunner::WebTestProxyBase::startDragging):
(WebTestRunner):
* DumpRenderTree/chromium/WebViewHost.cpp:
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (135005 => 135006)
--- trunk/Tools/ChangeLog 2012-11-16 22:48:30 UTC (rev 135005)
+++ trunk/Tools/ChangeLog 2012-11-16 22:51:12 UTC (rev 135006)
@@ -1,3 +1,26 @@
+2012-11-16 Jochen Eisinger <[email protected]>
+
+ [chromium] fake drag drop operations in the WebTestProxyBase instead of the WebViewHost
+ https://bugs.webkit.org/show_bug.cgi?id=102495
+
+ Reviewed by Adam Barth.
+
+ When a drag operation is initiated in a layout test, we need to
+ simulate a corresponding drop event, otherwise the WebViewImpl will sit
+ there waiting for it. Instead of having the embedder taking care of
+ this, move this into the TestRunner library.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestProxyBase):
+ (WebTestRunner::WebTestProxy::startDragging):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::startDragging):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
2012-11-16 Tien-Ren Chen <[email protected]>
Rename applyDefaultDeviceScaleFactorInCompositor to setApplyDeviceScaleFactorInCompositor
Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h (135005 => 135006)
--- trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h 2012-11-16 22:48:30 UTC (rev 135005)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h 2012-11-16 22:51:12 UTC (rev 135006)
@@ -33,10 +33,15 @@
#include "Platform/chromium/public/WebRect.h"
#include "WebKit/chromium/public/WebAccessibilityNotification.h"
+#include "WebKit/chromium/public/WebDragOperation.h"
#include "WebKit/chromium/public/WebNavigationPolicy.h"
namespace WebKit {
class WebAccessibilityObject;
+class WebDragData;
+class WebFrame;
+class WebImage;
+struct WebPoint;
struct WebSize;
}
@@ -65,6 +70,7 @@
void show(WebKit::WebNavigationPolicy);
void didAutoResize(const WebKit::WebSize&);
void postAccessibilityNotification(const WebKit::WebAccessibilityObject&, WebKit::WebAccessibilityNotification);
+ void startDragging(WebKit::WebFrame*, const WebKit::WebDragData&, WebKit::WebDragOperationsMask, const WebKit::WebImage&, const WebKit::WebPoint&);
private:
WebTestInterfaces* m_testInterfaces;
@@ -125,6 +131,11 @@
WebTestProxyBase::postAccessibilityNotification(object, notification);
WebViewClientImpl::postAccessibilityNotification(object, notification);
}
+ virtual void startDragging(WebKit::WebFrame* frame, const WebKit::WebDragData& data, WebKit::WebDragOperationsMask mask, const WebKit::WebImage& image, const WebKit::WebPoint& point)
+ {
+ WebTestProxyBase::startDragging(frame, data, mask, image, point);
+ WebViewClientImpl::startDragging(frame, data, mask, image, point);
+ }
};
}
Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp (135005 => 135006)
--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp 2012-11-16 22:48:30 UTC (rev 135005)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp 2012-11-16 22:51:12 UTC (rev 135006)
@@ -35,6 +35,7 @@
#include "WebAccessibilityNotification.h"
#include "WebAccessibilityObject.h"
#include "WebElement.h"
+#include "WebEventSender.h"
#include "WebNode.h"
#include "WebTestDelegate.h"
#include "WebTestInterfaces.h"
@@ -212,4 +213,11 @@
}
}
+void WebTestProxyBase::startDragging(WebFrame*, const WebDragData& data, WebDragOperationsMask mask, const WebImage&, const WebPoint&)
+{
+ // 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.
+ m_testInterfaces->eventSender()->doDragDrop(data, mask);
}
+
+}
Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp (135005 => 135006)
--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp 2012-11-16 22:48:30 UTC (rev 135005)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp 2012-11-16 22:51:12 UTC (rev 135006)
@@ -577,13 +577,6 @@
printf("UI DELEGATE STATUS CALLBACK: setStatusText:%s\n", text.utf8().data());
}
-void WebViewHost::startDragging(WebFrame*, const WebDragData& data, WebDragOperationsMask mask, const WebImage&, const WebPoint&)
-{
- // 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.
- m_shell->eventSender()->doDragDrop(data, mask);
-}
-
void WebViewHost::didUpdateLayout()
{
#if OS(MAC_OS_X)
Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.h (135005 => 135006)
--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.h 2012-11-16 22:48:30 UTC (rev 135005)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.h 2012-11-16 22:51:12 UTC (rev 135006)
@@ -185,7 +185,6 @@
virtual bool runModalBeforeUnloadDialog(WebKit::WebFrame*, const WebKit::WebString&);
virtual void showContextMenu(WebKit::WebFrame*, const WebKit::WebContextMenuData&);
virtual void setStatusText(const WebKit::WebString&);
- virtual void startDragging(WebKit::WebFrame*, const WebKit::WebDragData&, WebKit::WebDragOperationsMask, const WebKit::WebImage&, const WebKit::WebPoint&);
virtual void didUpdateLayout();
virtual void navigateBackForwardSoon(int offset);
virtual int historyBackListCount();