WebCore:
2009-06-16 Jian Li <jianli@chromium.org>
Reviewed by Adam Barth and David Levin.
Bug 26146: Change to use ThreadableLoader to load the worker script
in order to check URL origin for redirection.
https://bugs.webkit.org/show_bug.cgi?id=26146
Test: http/tests/workers/worker-redirect.html
* GNUmakefile.am:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* workers/Worker.cpp:
(WebCore::Worker::Worker):
(WebCore::Worker::notifyFinished):
* workers/Worker.h:
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::importScripts):
* workers/WorkerImportScriptsClient.cpp: Removed.
* workers/WorkerImportScriptsClient.h: Removed.
* workers/WorkerScriptLoader.cpp: Renamed from workers/WorkerImportScriptsClient.cpp.
This to make it more generic so worker script loading could use it.
(WebCore::WorkerScriptLoader::loadSynchronously):
(WebCore::WorkerScriptLoader::loadAsynchronously):
(WebCore::WorkerScriptLoader::didFinishLoading):
(WebCore::WorkerScriptLoader::didFail):
(WebCore::WorkerScriptLoader::didFailRedirectCheck):
(WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation):
(WebCore::WorkerScriptLoader::notifyFinished):
* workers/WorkerScriptLoader.h: Renamed from workers/WorkerImportScriptsClient.h.
This to make it more generic so worker script loading could use it.
* workers/WorkerScriptLoaderClient.h: Added.
LayoutTests:
2009-06-16 Jian Li <jianli@chromium.org>
Reviewed by Adam Barth and David Levin.
Bug 26146: Change to use ThreadableLoader to load the worker script
in order to check URL origin for redirection.
https://bugs.webkit.org/show_bug.cgi?id=26146
Add a layout test to cover the scenario that the worker script is
loaded from different redirect origin.
* http/tests/workers/resources/worker-redirect-target.js: Added.
* http/tests/workers/worker-redirect-expected.txt: Added.
* http/tests/workers/worker-redirect.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 11c43ec3..16fdb45 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -1404,7 +1404,7 @@
workers/WorkerMessagingProxy.cpp \
workers/WorkerRunLoop.cpp \
workers/WorkerThread.cpp \
- workers/WorkerImportScriptsClient.cpp
+ workers/WorkerScriptLoader.cpp
}
contains(DEFINES, ENABLE_VIDEO=1) {