• tsepez@chromium.org's avatar
    Source/WebCore: Pass Content-Security-Policy directives to worker threads. · 34a3d9f3
    tsepez@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=73242
    
    Reviewed by David Levin.
    
    Tests: http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed.html
           http/tests/security/contentSecurityPolicy/shared-worker-connect-src-blocked.html
           http/tests/security/contentSecurityPolicy/worker-connect-src-allowed.html
           http/tests/security/contentSecurityPolicy/worker-connect-src-blocked.html
    
    * page/ContentSecurityPolicy.h:
    (WebCore::ContentSecurityPolicy::policy):
    (WebCore::ContentSecurityPolicy::headerType):
    * workers/DedicatedWorkerContext.cpp:
    (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
    * workers/DedicatedWorkerContext.h:
    (WebCore::DedicatedWorkerContext::create):
    * workers/DedicatedWorkerThread.cpp:
    (WebCore::DedicatedWorkerThread::create):
    (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
    (WebCore::DedicatedWorkerThread::createWorkerContext):
    * workers/DedicatedWorkerThread.h:
    * workers/DefaultSharedWorkerRepository.cpp:
    (WebCore::SharedWorkerScriptLoader::notifyFinished):
    (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
    * workers/DefaultSharedWorkerRepository.h:
    * workers/SharedWorkerContext.cpp:
    (WebCore::SharedWorkerContext::SharedWorkerContext):
    * workers/SharedWorkerContext.h:
    (WebCore::SharedWorkerContext::create):
    * workers/SharedWorkerThread.cpp:
    (WebCore::SharedWorkerThread::create):
    (WebCore::SharedWorkerThread::SharedWorkerThread):
    (WebCore::SharedWorkerThread::createWorkerContext):
    * workers/SharedWorkerThread.h:
    * workers/WorkerContext.cpp:
    (WebCore::WorkerContext::WorkerContext):
    * workers/WorkerContext.h:
    * workers/WorkerMessagingProxy.cpp:
    (WebCore::WorkerMessagingProxy::startWorkerContext):
    * workers/WorkerThread.cpp:
    (WebCore::WorkerThreadStartupData::create):
    (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
    (WebCore::WorkerThread::WorkerThread):
    (WebCore::WorkerThread::workerThread):
    * workers/WorkerThread.h:
    
    Source/WebKit/chromium: Pass Content-security-policy directive to worker threads.
    https://bugs.webkit.org/show_bug.cgi?id=73242
    
    Reviewed by David Levin.
    
    * src/WebSharedWorkerImpl.cpp:
    (WebKit::WebSharedWorkerImpl::startWorkerContext):
    * src/WebWorkerClientImpl.cpp:
    (WebKit::WebWorkerClientImpl::startWorkerContext):
    
    LayoutTests: Pass Content-Security-Policy directives to worker threads.
    https://bugs.webkit.org/show_bug.cgi?id=73242
    
    Reviewed by David Levin.
    
    * http/tests/security/contentSecurityPolicy/resources/shared-worker-make-xhr.js: Added.
    (onconnect):
    * http/tests/security/contentSecurityPolicy/resources/worker-make-xhr.js: Added.
    * http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed-expected.txt: Added.
    * http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed.html: Added.
    * http/tests/security/contentSecurityPolicy/shared-worker-connect-src-blocked-expected.txt: Added.
    * http/tests/security/contentSecurityPolicy/shared-worker-connect-src-blocked.html: Added.
    * http/tests/security/contentSecurityPolicy/worker-connect-src-allowed-expected.txt: Added.
    * http/tests/security/contentSecurityPolicy/worker-connect-src-allowed.html: Added.
    * http/tests/security/contentSecurityPolicy/worker-connect-src-blocked-expected.txt: Added.
    * http/tests/security/contentSecurityPolicy/worker-connect-src-blocked.html: Added.
    * platform/chromium/test_expectations.txt:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    34a3d9f3
test_expectations.txt 206 KB