Skip to content
  • bweinstein@apple.com's avatar
    Source/WebKit2: After relaunching an unresponsive web process, web page stops... · ff211541
    bweinstein@apple.com authored
    Source/WebKit2: After relaunching an unresponsive web process, web page stops responding to mouse movement
    https://bugs.webkit.org/show_bug.cgi?id=60669
    <rdar://problem/9409934>
    
    Reviewed by Anders Carlsson.
    
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::processDidCrash): Set m_processingMouseMoveEvent to false when the WebProcess
        crashes.
    
    Tools: After relaunching an unresponsive web process, web page stops responding to mouse movement
    https://bugs.webkit.org/show_bug.cgi?id=60669
    <rdar://problem/9409934>
            
    Reviewed by Anders Carlsson.
    
    This test follows the steps needed to reproduce this bug:
    1) Hang the web process
    2) While the web process is hung, move the mouse (so WebPageProxy thinks it is processing a mouse move event)
    3) Kill and restart the WebProcess
    4) Move the mouse
            
    We are testing that we receive mouse move events after the WebProcess has restarted.
    
    * TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash.cpp: Added.
    (TestWebKitAPI::didFinishLoadForFrame): Set a flag that we finished loading.
    (TestWebKitAPI::processDidBecomeUnresponsive): Kill the web process once we become unresponsive.
    (TestWebKitAPI::processDidCrash): Reload the page when the process crashes, which restarts the web process.
    (TestWebKitAPI::setPageLoaderClient):
    (TestWebKitAPI::TEST):
    * TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash_Bundle.cpp: Added.
    (TestWebKitAPI::MouseMoveAfterCrashTest::MouseMoveAfterCrashTest):
    (TestWebKitAPI::MouseMoveAfterCrashTest::didReceiveMessage):
    * TestWebKitAPI/Tests/WebKit2/mouse-move-listener.html: Added.
    
    * TestWebKitAPI/PlatformWebView.h:
    * TestWebKitAPI/mac/PlatformWebViewMac.mm:
    (TestWebKitAPI::PlatformWebView::simulateMouseMove): Sends the messages that simulate a mouse move.
    * TestWebKitAPI/win/PlatformWebViewWin.cpp:
    (TestWebKitAPI::PlatformWebView::simulateMouseMove): Ditto.
    
    Add new files.
    * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
    * TestWebKitAPI/win/TestWebKitAPI.vcproj:
    * TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj:
    * TestWebKitAPI/win/copy-resources.cmd:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    ff211541