Title: [141392] trunk/Tools
Revision
141392
Author
[email protected]
Date
2013-01-31 02:02:04 -0800 (Thu, 31 Jan 2013)

Log 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:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (141391 => 141392)


--- trunk/Tools/ChangeLog	2013-01-31 09:46:02 UTC (rev 141391)
+++ trunk/Tools/ChangeLog	2013-01-31 10:02:04 UTC (rev 141392)
@@ -1,5 +1,19 @@
 2013-01-31  Jochen Eisinger  <[email protected]>
 
+        [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:
+
+2013-01-31  Jochen Eisinger  <[email protected]>
+
         [chromium] move postMessage related methods to TestRunner library
         https://bugs.webkit.org/show_bug.cgi?id=108343
 

Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h (141391 => 141392)


--- trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h	2013-01-31 09:46:02 UTC (rev 141391)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h	2013-01-31 10:02:04 UTC (rev 141392)
@@ -465,8 +465,7 @@
     }
     virtual bool runModalBeforeUnloadDialog(WebKit::WebFrame* frame, const WebKit::WebString& message)
     {
-        WebTestProxyBase::runModalBeforeUnloadDialog(frame, message);
-        return Base::runModalBeforeUnloadDialog(frame, message);
+        return WebTestProxyBase::runModalBeforeUnloadDialog(frame, message);
     }
     virtual WebKit::WebNavigationPolicy decidePolicyForNavigation(WebKit::WebFrame* frame, const WebKit::WebURLRequest& request, WebKit::WebNavigationType type, const WebKit::WebNode& originatingNode, WebKit::WebNavigationPolicy defaultPolicy, bool isRedirect)
     {

Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp (141391 => 141392)


--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp	2013-01-31 09:46:02 UTC (rev 141391)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp	2013-01-31 10:02:04 UTC (rev 141392)
@@ -975,7 +975,9 @@
 bool WebTestProxyBase::runModalBeforeUnloadDialog(WebFrame*, const WebString& message)
 {
     m_delegate->printMessage(string("CONFIRM NAVIGATION: ") + message.utf8().data() + "\n");
-    return true;
+    if (!m_testInterfaces->testRunner())
+        return true;
+    return !m_testInterfaces->testRunner()->shouldStayOnPageAfterHandlingBeforeUnload();
 }
 
 void WebTestProxyBase::locationChangeDone(WebFrame* frame)

Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp (141391 => 141392)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp	2013-01-31 09:46:02 UTC (rev 141391)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp	2013-01-31 10:02:04 UTC (rev 141392)
@@ -236,11 +236,6 @@
     return true;
 }
 
-bool WebViewHost::runModalBeforeUnloadDialog(WebFrame*, const WebString& message)
-{
-    return !testRunner()->shouldStayOnPageAfterHandlingBeforeUnload();
-}
-
 void WebViewHost::showContextMenu(WebFrame*, const WebContextMenuData& contextMenuData)
 {
     m_lastContextMenuData = adoptPtr(new WebContextMenuData(contextMenuData));
@@ -1134,11 +1129,6 @@
 
 // Private functions ----------------------------------------------------------
 
-::WebTestRunner::WebTestRunner* WebViewHost::testRunner() const
-{
-    return m_shell->testRunner();
-}
-
 void WebViewHost::updateForCommittedLoad(WebFrame* frame, bool isNewNavigation)
 {
     // Code duplicated from RenderView::DidCommitLoadForFrame.

Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.h (141391 => 141392)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.h	2013-01-31 09:46:02 UTC (rev 141391)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.h	2013-01-31 10:02:04 UTC (rev 141392)
@@ -207,7 +207,6 @@
     virtual void runModalAlertDialog(WebKit::WebFrame*, const WebKit::WebString&);
     virtual bool runModalConfirmDialog(WebKit::WebFrame*, const WebKit::WebString&);
     virtual bool runModalPromptDialog(WebKit::WebFrame*, const WebKit::WebString& message, const WebKit::WebString& defaultValue, WebKit::WebString* actualValue);
-    virtual bool runModalBeforeUnloadDialog(WebKit::WebFrame*, const WebKit::WebString&);
     virtual void showContextMenu(WebKit::WebFrame*, const WebKit::WebContextMenuData&);
     virtual void didUpdateLayout();
     virtual void navigateBackForwardSoon(int offset);
@@ -302,8 +301,6 @@
         CallbackMethodType m_callback;
     };
 
-    WebTestRunner::WebTestRunner* testRunner() const;
-
     // Called the title of the page changes.
     // Can be used to update the title of the window.
     void setPageTitle(const WebKit::WebString&);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to