Changeset 141392 in webkit


Ignore:
Timestamp:
Jan 31, 2013 2:02:04 AM (11 years ago)
Author:
jochen@chromium.org
Message:

[chromium] move runModalBeforeUnloadDialog to TestRunner library
https://bugs.webkit.org/show_bug.cgi?id=108442

Reviewed by Adam Barth.

  • DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:

(WebTestRunner::WebTestProxy::runModalBeforeUnloadDialog):

  • DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:

(WebTestRunner::WebTestProxyBase::runModalBeforeUnloadDialog):

  • DumpRenderTree/chromium/WebViewHost.cpp:
  • DumpRenderTree/chromium/WebViewHost.h:
Location:
trunk/Tools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r141385 r141392  
     12013-01-31  Jochen Eisinger  <jochen@chromium.org>
     2
     3        [chromium] move runModalBeforeUnloadDialog to TestRunner library
     4        https://bugs.webkit.org/show_bug.cgi?id=108442
     5
     6        Reviewed by Adam Barth.
     7
     8        * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
     9        (WebTestRunner::WebTestProxy::runModalBeforeUnloadDialog):
     10        * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
     11        (WebTestRunner::WebTestProxyBase::runModalBeforeUnloadDialog):
     12        * DumpRenderTree/chromium/WebViewHost.cpp:
     13        * DumpRenderTree/chromium/WebViewHost.h:
     14
    1152013-01-31  Jochen Eisinger  <jochen@chromium.org>
    216
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h

    r141385 r141392  
    466466    virtual bool runModalBeforeUnloadDialog(WebKit::WebFrame* frame, const WebKit::WebString& message)
    467467    {
    468         WebTestProxyBase::runModalBeforeUnloadDialog(frame, message);
    469         return Base::runModalBeforeUnloadDialog(frame, message);
     468        return WebTestProxyBase::runModalBeforeUnloadDialog(frame, message);
    470469    }
    471470    virtual WebKit::WebNavigationPolicy decidePolicyForNavigation(WebKit::WebFrame* frame, const WebKit::WebURLRequest& request, WebKit::WebNavigationType type, const WebKit::WebNode& originatingNode, WebKit::WebNavigationPolicy defaultPolicy, bool isRedirect)
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp

    r141385 r141392  
    976976{
    977977    m_delegate->printMessage(string("CONFIRM NAVIGATION: ") + message.utf8().data() + "\n");
    978     return true;
     978    if (!m_testInterfaces->testRunner())
     979        return true;
     980    return !m_testInterfaces->testRunner()->shouldStayOnPageAfterHandlingBeforeUnload();
    979981}
    980982
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp

    r141385 r141392  
    237237}
    238238
    239 bool WebViewHost::runModalBeforeUnloadDialog(WebFrame*, const WebString& message)
    240 {
    241     return !testRunner()->shouldStayOnPageAfterHandlingBeforeUnload();
    242 }
    243 
    244239void WebViewHost::showContextMenu(WebFrame*, const WebContextMenuData& contextMenuData)
    245240{
     
    11351130// Private functions ----------------------------------------------------------
    11361131
    1137 ::WebTestRunner::WebTestRunner* WebViewHost::testRunner() const
    1138 {
    1139     return m_shell->testRunner();
    1140 }
    1141 
    11421132void WebViewHost::updateForCommittedLoad(WebFrame* frame, bool isNewNavigation)
    11431133{
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.h

    r141381 r141392  
    208208    virtual bool runModalConfirmDialog(WebKit::WebFrame*, const WebKit::WebString&);
    209209    virtual bool runModalPromptDialog(WebKit::WebFrame*, const WebKit::WebString& message, const WebKit::WebString& defaultValue, WebKit::WebString* actualValue);
    210     virtual bool runModalBeforeUnloadDialog(WebKit::WebFrame*, const WebKit::WebString&);
    211210    virtual void showContextMenu(WebKit::WebFrame*, const WebKit::WebContextMenuData&);
    212211    virtual void didUpdateLayout();
     
    303302    };
    304303
    305     WebTestRunner::WebTestRunner* testRunner() const;
    306 
    307304    // Called the title of the page changes.
    308305    // Can be used to update the title of the window.
Note: See TracChangeset for help on using the changeset viewer.