Skip to content
Permalink
Browse files
2011-04-11 Sam Weinig <sam@webkit.org>
        Reviewed by Anders Carlsson.

        REGRESSION(r77974): http/tests/security/aboutBlank/security-context-window-open.html is failing
        <rdar://problem/8981346>
        https://bugs.webkit.org/show_bug.cgi?id=54159

        * platform/mac-wk2/Skipped:
        Remove http/tests/security/aboutBlank/security-context-window-open.html from the skipped list.
2011-04-11  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        REGRESSION(r77974): http/tests/security/aboutBlank/security-context-window-open.html is failing
        <rdar://problem/8981346>
        https://bugs.webkit.org/show_bug.cgi?id=54159

        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
        (WTR::InjectedBundlePage::InjectedBundlePage):
        (WTR::InjectedBundlePage::decidePolicyForNavigationAction):
        (WTR::InjectedBundlePage::decidePolicyForNewWindowAction):
        (WTR::InjectedBundlePage::decidePolicyForResponse):
        (WTR::InjectedBundlePage::unableToImplementPolicy):
        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
        Add short-circuited policy client which matches WebKit1.

        * WebKitTestRunner/TestController.cpp:
        (WTR::TestController::resetStateToConsistentValues):
        Clear the cache between tests to ensure consistent results.


Canonical link: https://commits.webkit.org/73310@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
weinig committed Apr 12, 2011
1 parent f980991 commit 0a593a5ffb6803c2b601b5e4e36436066116d722
Showing 6 changed files with 98 additions and 4 deletions.
@@ -1,3 +1,14 @@
2011-04-11 Sam Weinig <sam@webkit.org>

Reviewed by Anders Carlsson.

REGRESSION(r77974): http/tests/security/aboutBlank/security-context-window-open.html is failing
<rdar://problem/8981346>
https://bugs.webkit.org/show_bug.cgi?id=54159

* platform/mac-wk2/Skipped:
Remove http/tests/security/aboutBlank/security-context-window-open.html from the skipped list.

2011-04-11 Ryosuke Niwa <rniwa@webkit.org>

Reviewed by Tony Chang.
@@ -1492,10 +1492,6 @@ fast/dom/global-constructors.html
# <rdar://problem/8735596>
compositing/tiling/huge-layer-resize.html

# REGRESSION(r77974): http/tests/security/aboutBlank/security-context-window-open.html is failing
# <https://bugs.webkit.org/show_bug.cgi?id=54159>
http/tests/security/aboutBlank/security-context-window-open.html

# transitions/default-timing-function.html failing on WebKit2 since it was added
# <https://bugs.webkit.org/show_bug.cgi?id=56531>
transitions/default-timing-function.html
@@ -1,3 +1,24 @@
2011-04-11 Sam Weinig <sam@webkit.org>

Reviewed by Anders Carlsson.

REGRESSION(r77974): http/tests/security/aboutBlank/security-context-window-open.html is failing
<rdar://problem/8981346>
https://bugs.webkit.org/show_bug.cgi?id=54159

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):
(WTR::InjectedBundlePage::decidePolicyForNavigationAction):
(WTR::InjectedBundlePage::decidePolicyForNewWindowAction):
(WTR::InjectedBundlePage::decidePolicyForResponse):
(WTR::InjectedBundlePage::unableToImplementPolicy):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
Add short-circuited policy client which matches WebKit1.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
Clear the cache between tests to ensure consistent results.

2011-04-11 George Guo <George.Guo@nokia.com>

Reviewed by Eric Seidel.
@@ -202,6 +202,16 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
};
WKBundlePageSetResourceLoadClient(m_page, &resourceLoadClient);

WKBundlePagePolicyClient policyClient = {
0,
this,
decidePolicyForNavigationAction,
decidePolicyForNewWindowAction,
decidePolicyForResponse,
unableToImplementPolicy
};
WKBundlePageSetPolicyClient(m_page, &policyClient);

WKBundlePageUIClient uiClient = {
0,
this,
@@ -669,6 +679,48 @@ void InjectedBundlePage::didFailLoadForResource(WKBundlePageRef, WKBundleFrameRe
{
}


// Policy Client Callbacks

WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForNavigationAction(WKBundlePageRef page, WKBundleFrameRef frame, WKBundleNavigationActionRef navigationAction, WKURLRequestRef request, WKTypeRef* userData, const void* clientInfo)
{
return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->decidePolicyForNavigationAction(page, frame, navigationAction, request, userData);
}

WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForNewWindowAction(WKBundlePageRef page, WKBundleFrameRef frame, WKBundleNavigationActionRef navigationAction, WKURLRequestRef request, WKStringRef frameName, WKTypeRef* userData, const void* clientInfo)
{
return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->decidePolicyForNewWindowAction(page, frame, navigationAction, request, frameName, userData);
}

WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForResponse(WKBundlePageRef page, WKBundleFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKTypeRef* userData, const void* clientInfo)
{
return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->decidePolicyForResponse(page, frame, response, request, userData);
}

void InjectedBundlePage::unableToImplementPolicy(WKBundlePageRef page, WKBundleFrameRef frame, WKErrorRef error, WKTypeRef* userData, const void* clientInfo)
{
static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->unableToImplementPolicy(page, frame, error, userData);
}

WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForNavigationAction(WKBundlePageRef, WKBundleFrameRef, WKBundleNavigationActionRef, WKURLRequestRef request, WKTypeRef*)
{
return WKBundlePagePolicyActionUse;
}

WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForNewWindowAction(WKBundlePageRef, WKBundleFrameRef, WKBundleNavigationActionRef, WKURLRequestRef, WKStringRef, WKTypeRef*)
{
return WKBundlePagePolicyActionUse;
}

WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForResponse(WKBundlePageRef, WKBundleFrameRef, WKURLResponseRef, WKURLRequestRef, WKTypeRef*)
{
return WKBundlePagePolicyActionUse;
}

void InjectedBundlePage::unableToImplementPolicy(WKBundlePageRef, WKBundleFrameRef, WKErrorRef, WKTypeRef*)
{
}

// UI Client Callbacks

void InjectedBundlePage::willAddMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo)
@@ -94,6 +94,16 @@ class InjectedBundlePage {
void didFinishLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier);
void didFailLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKErrorRef);

// WKBundlePagePolicyClient
static WKBundlePagePolicyAction decidePolicyForNavigationAction(WKBundlePageRef, WKBundleFrameRef, WKBundleNavigationActionRef, WKURLRequestRef, WKTypeRef*, const void*);
static WKBundlePagePolicyAction decidePolicyForNewWindowAction(WKBundlePageRef, WKBundleFrameRef, WKBundleNavigationActionRef, WKURLRequestRef, WKStringRef frameName, WKTypeRef*, const void*);
static WKBundlePagePolicyAction decidePolicyForResponse(WKBundlePageRef, WKBundleFrameRef, WKURLResponseRef, WKURLRequestRef, WKTypeRef*, const void*);
static void unableToImplementPolicy(WKBundlePageRef, WKBundleFrameRef, WKErrorRef, WKTypeRef*, const void*);
WKBundlePagePolicyAction decidePolicyForNavigationAction(WKBundlePageRef, WKBundleFrameRef, WKBundleNavigationActionRef, WKURLRequestRef, WKTypeRef*);
WKBundlePagePolicyAction decidePolicyForNewWindowAction(WKBundlePageRef, WKBundleFrameRef, WKBundleNavigationActionRef, WKURLRequestRef, WKStringRef frameName, WKTypeRef*);
WKBundlePagePolicyAction decidePolicyForResponse(WKBundlePageRef, WKBundleFrameRef, WKURLResponseRef, WKURLRequestRef, WKTypeRef*);
void unableToImplementPolicy(WKBundlePageRef, WKBundleFrameRef, WKErrorRef, WKTypeRef*);

// UI Client
static void willAddMessageToConsole(WKBundlePageRef, WKStringRef message, uint32_t lineNumber, const void* clientInfo);
static void willSetStatusbarText(WKBundlePageRef, WKStringRef statusbarText, const void* clientInfo);
@@ -33,6 +33,7 @@
#include <WebKit2/WKContextPrivate.h>
#include <WebKit2/WKPageGroup.h>
#include <WebKit2/WKPreferencesPrivate.h>
#include <WebKit2/WKResourceCacheManager.h>
#include <WebKit2/WKRetainPtr.h>
#include <wtf/PassOwnPtr.h>

@@ -377,6 +378,9 @@ bool TestController::resetStateToConsistentValues()
WKPreferencesSetSansSerifFontFamily(preferences, sansSerifFontFamily);
WKPreferencesSetSerifFontFamily(preferences, serifFontFamily);

WKResourceCacheManagerRef cacheManager = WKContextGetResourceCacheManager(m_context.get());
WKResourceCacheManagerClearCacheForAllOrigins(cacheManager, WKResourceCachesToClearAll);

m_mainWebView->focus();

// Reset main page back to about:blank

0 comments on commit 0a593a5

Please sign in to comment.