Skip to content
  • jpfau@apple.com's avatar
    Allow blocking of application cache in third-party contexts · 398b1b59
    jpfau@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=112288
    
    Reviewed by Adam Barth.
    
    Source/WebCore:
    
    Return early if we can't access the application cache due to security
    restrictions.
    
    Tests: http/tests/security/cross-origin-appcache-allowed.html
           http/tests/security/cross-origin-appcache.html
           http/tests/security/same-origin-appcache-blocked.html
    
    * loader/appcache/ApplicationCacheGroup.cpp:
    (WebCore::ApplicationCacheGroup::selectCache):
    (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
    * page/SecurityOrigin.h:
    (WebCore::SecurityOrigin::canAccessApplicationCache):
    
    LayoutTests:
    
    * http/tests/security/cross-origin-appcache-allowed-expected.txt: Added.
    * http/tests/security/cross-origin-appcache-allowed.html: Added.
    * http/tests/security/cross-origin-appcache-expected.txt: Added.
    * http/tests/security/cross-origin-appcache.html: Added.
    * http/tests/security/resources/cross-origin-iframe-for-appcache-allowed.html: Added.
    * http/tests/security/resources/cross-origin-iframe-for-appcache.html: Added.
    * http/tests/security/resources/manifest-for-appcache-allowed.manifest: Added.
    * http/tests/security/resources/manifest-for-appcache-blocked.manifest: Added.
    * http/tests/security/resources/manifest-for-appcache.manifest: Added.
    * http/tests/security/resources/same-origin-iframe-for-appcache-blocked.html: Added.
    * http/tests/security/same-origin-appcache-blocked-expected.txt: Added.
    * http/tests/security/same-origin-appcache-blocked.html: Added.
    * platform/chromium/TestExpectations:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    398b1b59