Skip to content
  • andersca@apple.com's avatar
    WebCore: Using the decidePolicyForMIMEType delegate message in an asynchronous manner does not work · b600db87
    andersca@apple.com authored
    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:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b600db87