Created
August 19, 2011 08:38
-
-
Save Smith1123/1156343 to your computer and use it in GitHub Desktop.
setCustomPolicyDelegate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl | |
index f1468d0..a62c850 100644 | |
--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl | |
+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl | |
@@ -44,6 +44,7 @@ module WTR { | |
// Special options. | |
void keepWebHistory(); | |
+ void setCustomPolicyDelegate(in boolean enabled, in boolean permissive); | |
void setAcceptsEditing(in boolean value); | |
void setCanOpenWindows(in boolean value); | |
void setCloseRemainingWindowsWhenComplete(in boolean value); | |
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp | |
index 9c80ad0..5173cd5 100644 | |
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp | |
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp | |
@@ -750,15 +750,13 @@ WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForNavigationAction(WKB | |
if (!InjectedBundle::shared().layoutTestController()->isPolicyDelegateEnabled()) | |
return WKBundlePagePolicyActionUse; | |
- if (InjectedBundle::shared().layoutTestController()->waitToDump()) { | |
- InjectedBundle::shared().os() << "Policy delegate: attempt to load " << adoptWK(WKURLRequestCopyURL(request)) << " with navigation type \'" << navigationTypeToString(WKBundleNavigationActionGetNavigationType(navigationAction)) << "\'"; | |
- WKBundleHitTestResultRef hitTestResultRef = WKBundleNavigationActionCopyHitTestResult(navigationAction); | |
- if (hitTestResultRef) | |
- InjectedBundle::shared().os() << " originating from " << dumpPath(m_page, m_world.get(), WKBundleHitTestResultCopyNodeHandle(hitTestResultRef)); | |
- | |
- InjectedBundle::shared().os() << "\n"; | |
- InjectedBundle::shared().layoutTestController()->notifyDone(); | |
- } | |
+ InjectedBundle::shared().os() << "Policy delegate: attempt to load " << adoptWK(WKURLRequestCopyURL(request)) << " with navigation type \'" << navigationTypeToString(WKBundleNavigationActionGetNavigationType(navigationAction)) << "\'"; | |
+ WKBundleHitTestResultRef hitTestResultRef = WKBundleNavigationActionCopyHitTestResult(navigationAction); | |
+ if (hitTestResultRef) | |
+ InjectedBundle::shared().os() << " originating from " << dumpPath(m_page, m_world.get(), WKBundleHitTestResultCopyNodeHandle(hitTestResultRef)); | |
+ | |
+ InjectedBundle::shared().os() << "\n"; | |
+ InjectedBundle::shared().layoutTestController()->notifyDone(); | |
if (InjectedBundle::shared().layoutTestController()->isPolicyDelegatePermissive()) | |
return WKBundlePagePolicyActionUse; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment