[WK2][Mac] Drag and drop tests interfere with user's UI
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Sep 2013 06:36:21 +0000 (06:36 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Sep 2013 06:36:21 +0000 (06:36 +0000)
commitfaf06d2b26addfa9e15042fb068481105393ee9c
tree04fcbf06305cc4865cd7eb01f620850303cefd9e
parent3f7f09a8eb4c8b22944c50815429a0e9a6c0fe36
    [WK2][Mac] Drag and drop tests interfere with user's UI
        https://bugs.webkit.org/show_bug.cgi?id=120538

        Reviewed by Dan Bernstein.

        This makes running WebKit2 regression tests locally more viable. The patch doesn't
        fix drag and drop tests to work as expected, I posted some thought about that in
        <https://bugs.webkit.org/show_bug.cgi?id=68552>.

        * WebKitTestRunner/EventSenderProxy.h:
        (WTR::EventSenderProxy::position):
        * WebKitTestRunner/TestController.h:
        (WTR::TestController::eventSenderProxy):
        Expose a way to get current mouse position from anywhere in WKTR code.

        * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added new files.

        * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseUp):
        Copied a FIXME comment from DumpRenderTree.

        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
        (-[TestRunnerWKView dragImage:at:offset:event:pasteboard:source:slideBack:]):
        Override drag initiation, using a custom NSDraggingInfo implementation.

        * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformInitialize):
        Replace NSEvent with a custom class.

        * WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.h: Added.
        * WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm: Added.
        * WebKitTestRunner/mac/WebKitTestRunnerEvent.h: Added.
        * WebKitTestRunner/mac/WebKitTestRunnerEvent.mm: Added.
        Largely a copy of DumpRenderTree classes, modified to not use global variables.
        We should consider making these variables static in EventSenderProxy though, as
        it's strange that mouse state in WKTR is reset between tests without WebKit ever
        being told about that.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm
Tools/ChangeLog
Tools/WebKitTestRunner/EventSenderProxy.h
Tools/WebKitTestRunner/TestController.h
Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
Tools/WebKitTestRunner/mac/EventSenderProxy.mm
Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm
Tools/WebKitTestRunner/mac/TestControllerMac.mm
Tools/WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.h [new file with mode: 0644]
Tools/WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm [new file with mode: 0644]
Tools/WebKitTestRunner/mac/WebKitTestRunnerEvent.h [new file with mode: 0644]
Tools/WebKitTestRunner/mac/WebKitTestRunnerEvent.mm [new file with mode: 0644]