Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
WebCore: Using the decidePolicyForMIMEType delegate message in an asy…
…nchronous manner does not work https://bugs.webkit.org/show_bug.cgi?id=48014 <rdar://problem/8202716> Reviewed by Adam Barth and Darin Adler. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy): Resume loading. (WebCore::MainResourceLoader::didReceiveResponse): Defer loading until we hear back from the policy client. WebKitTools: Using the decidePolicyForMIMEType delegate message in an asynchronous manner does not work https://bugs.webkit.org/show_bug.cgi?id=48014 <rdar://problem/8202716> Reviewed by Adam Barth and Darin Adler. * DumpRenderTree/LayoutTestController.cpp: (setCustomPolicyDelegateCallback): Add callIgnoreInDecidePolicyForMIMETypeAfterOneSecond argument. * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: (LayoutTestController::setCustomPolicyDelegate): Add callIgnoreInDecidePolicyForMIMETypeAfterOneSecond argument. * DumpRenderTree/mac/LayoutTestControllerMac.mm: (LayoutTestController::setCustomPolicyDelegate): Add callIgnoreInDecidePolicyForMIMETypeAfterOneSecond argument. * DumpRenderTree/mac/PolicyDelegate.h: * DumpRenderTree/mac/PolicyDelegate.mm: (-[PolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]): If _callIgnoreInDecidePolicyForMIMETypeAfterOneSecond is true, call [listener ignore] after one second. (-[PolicyDelegate setCallIgnoreInDecidePolicyForMIMETypeAfterOneSecond:]): Update _callIgnoreInDecidePolicyForMIMETypeAfterOneSecond. * DumpRenderTree/win/LayoutTestControllerWin.cpp: (LayoutTestController::setCustomPolicyDelegate): Add callIgnoreInDecidePolicyForMIMETypeAfterOneSecond argument. * DumpRenderTree/wx/LayoutTestControllerWx.cpp: (LayoutTestController::setCustomPolicyDelegate): Add callIgnoreInDecidePolicyForMIMETypeAfterOneSecond argument. LayoutTests: Using the decidePolicyForMIMEType delegate message in an asynchronous manner does not work https://bugs.webkit.org/show_bug.cgi?id=48014 <rdar://problem/8202716> Reviewed by Adam Barth and Darin Adler. Add tests and update the skipped list. * fast/loader/decide-policy-for-mime-type-async-expected.txt: Added. * fast/loader/decide-policy-for-mime-type-async.html: Added. * platform/gtk/Skipped: * platform/mac-wk2/Skipped: * platform/qt/Skipped: * platform/qt-wk2/Skipped: * platform/win/Skipped: Canonical link: https://commits.webkit.org/60906@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@70367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Anders Carlsson
committed
Oct 22, 2010
1 parent
9015d3a
commit 96e65aa4969ace1acda1a7d22071a2ae3f276e4d
Showing
20 changed files
with
169 additions
and
15 deletions.
There are no files selected for viewing
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
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
@@ -0,0 +1,5 @@ | ||
Policy delegate: attempt to load data:text/html,Hello,%20I%20am%20a%20subframe! with navigation type 'other' | ||
Test for Using the decidePolicyForMIMEType delegate message in an asynchronous manner does not work. If the test passes, you should see the word "PASSED" below. | ||
|
||
PASSED | ||
|
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
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script> | ||
if (window.layoutTestController) { | ||
layoutTestController.dumpAsText(); | ||
layoutTestController.setCustomPolicyDelegate(true, true, true); | ||
} | ||
|
||
window.onload = function() { | ||
var result = document.getElementById('result') | ||
var frame = document.getElementById('frame') | ||
if (!window.layoutTestController) { | ||
result.innerText = "This test can only be run in DumpRenderTree."; | ||
return; | ||
} | ||
|
||
// We shouldn't have any text in the frame since the load was ignored. | ||
if (!frame.contentDocument.documentElement.innerText) | ||
result.innerText = "PASSED"; | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<p>Test for <a href="http://webkit.org/b/48014">Using the decidePolicyForMIMEType delegate message in an asynchronous manner does not work</a>. If the test passes, you should see the word "PASSED" below.</p> | ||
<div id=result>FAILED</div> | ||
<iframe id="frame" src="data:text/html,Hello, I am a subframe!"></iframe> | ||
</body> | ||
</html> |
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
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
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
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
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
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
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
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
@@ -108,6 +108,7 @@ namespace WebCore { | ||
bool m_loadingMultipartContent; | ||
bool m_waitingForContentPolicy; | ||
double m_timeOfLastDataReceived; | ||
unsigned m_deferLoadingCount; | ||
}; | ||
|
||
} | ||
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
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
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
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
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
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
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
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
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