Commit 29bba910 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

WebKitTestRunner needs layoutTestController.setStopProvisionalFrameLoads

https://bugs.webkit.org/show_bug.cgi?id=42691

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-09-14
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Add WKBundleFrame private API to stop loading of a frame.
This is needed by WebKitTestRunner to implement
testrunner.setStopProvisionalFrameLoads.

Original patch by Alexey Proskuryakov.

* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameStopLoading):
* WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::stopLoading):
(WebKit):
* WebProcess/WebPage/WebFrame.h:
(WebFrame):

Tools:

Add implementation for testrunner.setStopProvisionalFrameLoads()
in WebKitTestRunner.

Original patch by Alexey Proskuryakov.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didStartProvisionalLoadForFrame):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::TestRunner):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(TestRunner):
(WTR::TestRunner::setStopProvisionalFrameLoads):
(WTR::TestRunner::shouldStopProvisionalFrameLoads):

LayoutTests:

Unskip fast/loader/stop-provisional-loads.html now that WebKitTestRunner
implements testrunner.setStopProvisionalFrameLoads().

* platform/wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent afc84378
2012-09-14 Christophe Dumez <christophe.dumez@intel.com>
WebKitTestRunner needs layoutTestController.setStopProvisionalFrameLoads
https://bugs.webkit.org/show_bug.cgi?id=42691
Reviewed by Kenneth Rohde Christiansen.
Unskip fast/loader/stop-provisional-loads.html now that WebKitTestRunner
implements testrunner.setStopProvisionalFrameLoads().
* platform/wk2/Skipped:
2012-09-14 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
 
[EFL] Attempt to create a theme for 0 sized element leads to assertion hit
......@@ -428,10 +428,6 @@ fast/encoding/idn-security.html
# <https://bugs.webkit.org/show_bug.cgi?id=69548>
fast/events/show-modal-dialog-onblur-onfocus.html
# WebKitTestRunner needs layoutTestController.setStopProvisionalFrameLoads
# <https://bugs.webkit.org/show_bug.cgi?id=42691>
fast/loader/stop-provisional-loads.html
# WebKitTestRunner needs layoutTestController.setPrinting
# <https://bugs.webkit.org/show_bug.cgi?id=42693>
printing/compositing-layer-printing.html
......
2012-09-14 Christophe Dumez <christophe.dumez@intel.com>
WebKitTestRunner needs layoutTestController.setStopProvisionalFrameLoads
https://bugs.webkit.org/show_bug.cgi?id=42691
Reviewed by Kenneth Rohde Christiansen.
Add WKBundleFrame private API to stop loading of a frame.
This is needed by WebKitTestRunner to implement
testrunner.setStopProvisionalFrameLoads.
Original patch by Alexey Proskuryakov.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameStopLoading):
* WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::stopLoading):
(WebKit):
* WebProcess/WebPage/WebFrame.h:
(WebFrame):
2012-09-14 Kenneth Rohde Christiansen <kenneth@webkit.org>
 
[EFL] Add unit test for RefPtr<Evas_Object>
......
......@@ -182,6 +182,11 @@ void WKBundleFrameClearOpener(WKBundleFrameRef frameRef)
coreFrame->loader()->setOpener(0);
}
void WKBundleFrameStopLoading(WKBundleFrameRef frameRef)
{
toImpl(frameRef)->stopLoading();
}
WKStringRef WKBundleFrameCopyLayerTreeAsText(WKBundleFrameRef frameRef)
{
return toCopiedAPI(toImpl(frameRef)->layerTreeAsText());
......
......@@ -49,6 +49,7 @@ WK_EXPORT void WKBundleFrameResumeAnimations(WKBundleFrameRef frame);
WK_EXPORT unsigned WKBundleFrameGetPendingUnloadCount(WKBundleFrameRef frame);
WK_EXPORT WKStringRef WKBundleFrameCopyLayerTreeAsText(WKBundleFrameRef frame);
WK_EXPORT void WKBundleFrameClearOpener(WKBundleFrameRef frame);
WK_EXPORT void WKBundleFrameStopLoading(WKBundleFrameRef frame);
WK_EXPORT bool WKBundleFrameContainsAnyFormElements(WKBundleFrameRef frame);
WK_EXPORT void WKBundleFrameSetTextDirection(WKBundleFrameRef frame, WKStringRef);
......
......@@ -651,6 +651,14 @@ bool WebFrame::containsAnyFormElements() const
return false;
}
void WebFrame::stopLoading()
{
if (!m_coreFrame)
return;
m_coreFrame->loader()->stopForUserCancel();
}
WebFrame* WebFrame::frameForContext(JSContextRef context)
{
JSObjectRef globalObjectRef = JSContextGetGlobalObject(context);
......
......@@ -113,6 +113,7 @@ public:
bool hasVerticalScrollbar() const;
bool getDocumentBackgroundColor(double* red, double* green, double* blue, double* alpha);
bool containsAnyFormElements() const;
void stopLoading();
static WebFrame* frameForContext(JSContextRef);
......
2012-09-14 Christophe Dumez <christophe.dumez@intel.com>
WebKitTestRunner needs layoutTestController.setStopProvisionalFrameLoads
https://bugs.webkit.org/show_bug.cgi?id=42691
Reviewed by Kenneth Rohde Christiansen.
Add implementation for testrunner.setStopProvisionalFrameLoads()
in WebKitTestRunner.
Original patch by Alexey Proskuryakov.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didStartProvisionalLoadForFrame):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::TestRunner):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(TestRunner):
(WTR::TestRunner::setStopProvisionalFrameLoads):
(WTR::TestRunner::shouldStopProvisionalFrameLoads):
2012-09-14 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
 
[Qt] Fix handling of debug/release/debug_and_release/build_all
......
......@@ -142,6 +142,7 @@ module WTR {
void setShouldStayOnPageAfterHandlingBeforeUnload(in boolean flag);
void setDefersLoading(in boolean flag);
void setStopProvisionalFrameLoads();
// Web intents testing.
void sendWebIntentResponse(in DOMString reply);
......
......@@ -732,9 +732,14 @@ void InjectedBundlePage::didStartProvisionalLoadForFrame(WKBundleFrameRef frame)
InjectedBundle::shared().stringBuilder()->appendLiteral(" - didStartProvisionalLoadForFrame\n");
}
if (InjectedBundle::shared().topLoadingFrame())
return;
InjectedBundle::shared().setTopLoadingFrame(frame);
if (!InjectedBundle::shared().topLoadingFrame())
InjectedBundle::shared().setTopLoadingFrame(frame);
if (InjectedBundle::shared().testRunner()->shouldStopProvisionalFrameLoads()) {
dumpFrameDescriptionSuitableForTestResult(frame);
InjectedBundle::shared().stringBuilder()->appendLiteral(" - stopping load in didStartProvisionalLoadForFrame callback\n");
WKBundleFrameStopLoading(frame);
}
}
void InjectedBundlePage::didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef frame)
......
......@@ -86,6 +86,7 @@ TestRunner::TestRunner()
, m_testRepaint(false)
, m_testRepaintSweepHorizontally(false)
, m_willSendRequestReturnsNull(false)
, m_shouldStopProvisionalFrameLoads(false)
, m_policyDelegateEnabled(false)
, m_policyDelegatePermissive(false)
, m_globalFlag(false)
......
......@@ -206,6 +206,9 @@ public:
void setShouldStayOnPageAfterHandlingBeforeUnload(bool);
void setDefersLoading(bool);
void setStopProvisionalFrameLoads() { m_shouldStopProvisionalFrameLoads = true; }
bool shouldStopProvisionalFrameLoads() const { return m_shouldStopProvisionalFrameLoads; }
bool globalFlag() const { return m_globalFlag; }
void setGlobalFlag(bool value) { m_globalFlag = value; }
......@@ -282,6 +285,7 @@ private:
bool m_testRepaintSweepHorizontally;
bool m_willSendRequestReturnsNull;
bool m_shouldStopProvisionalFrameLoads;
bool m_policyDelegateEnabled;
bool m_policyDelegatePermissive;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment