scopeURL should start with the provided scriptURL
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Dec 2017 22:32:40 +0000 (22:32 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Dec 2017 22:32:40 +0000 (22:32 +0000)
commitacd867c503febd9ad254fd2f43181006d0f835cf
tree258980c8a94583f30a087cd928a077055c97e911
parent7c487e67b380819487ab26c114ed585ed379a801
scopeURL should start with the provided scriptURL
https://bugs.webkit.org/show_bug.cgi?id=180983

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

* web-platform-tests/service-workers/service-worker/register-default-scope.https-expected.txt:
* web-platform-tests/service-workers/service-worker/registration-iframe.https-expected.txt:
* web-platform-tests/service-workers/service-worker/registration-security-error.https-expected.txt:

Source/WebCore:

scopeURL should start with the provided scriptURL, as per:
- https://w3c.github.io/ServiceWorker/#update (steps 7.8 to 7.18)

No new tests, rebaselined existing tests.

* platform/network/HTTPHeaderNames.in:
* workers/service/ServiceWorkerJob.cpp:
(WebCore::ServiceWorkerJob::didReceiveResponse):

LayoutTests:

Update WebKit tests due to new restrictions.

* http/tests/workers/service/basic-unregister.https-expected.txt:
* http/tests/workers/service/controller-change.html:
* http/tests/workers/service/resources/ServiceWorkerGlobalScope_getRegistration-worker.js:
(async.runTest):
* http/tests/workers/service/resources/ServiceWorkerGlobalScope_register-worker.js:
(async.runTest):
* http/tests/workers/service/resources/basic-fetch.js:
(async.test):
* http/tests/workers/service/resources/basic-register.js:
(async.test):
* http/tests/workers/service/resources/basic-unregister.js:
(async.test):
* http/tests/workers/service/resources/service-worker-fetch.js:
(async.test):
* http/tests/workers/service/resources/service-worker-getRegistration.js:
(async.test):
* http/tests/workers/service/resources/service-worker-importScript.js:
(async.test):
* http/tests/workers/service/resources/shift-reload-navigation.js:
(async.test):
* http/tests/workers/service/service-worker-clear.html:
* http/tests/workers/service/service-worker-crossorigin-fetch.html:
* http/tests/workers/service/service-worker-getRegistration-expected.txt:
* http/tests/workers/service/service-worker-request-with-body.https.html:
* http/tests/workers/service/serviceworker-idb.https.html:
* http/tests/workers/service/serviceworker-websocket.https.html:
* http/tests/workers/service/serviceworkerclients-get.https.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/network/resource-response-service-worker.html
LayoutTests/http/tests/workers/service/basic-unregister.https-expected.txt
LayoutTests/http/tests/workers/service/controller-change.html
LayoutTests/http/tests/workers/service/resources/ServiceWorkerGlobalScope_getRegistration-worker.js
LayoutTests/http/tests/workers/service/resources/ServiceWorkerGlobalScope_register-worker.js
LayoutTests/http/tests/workers/service/resources/basic-fetch.js
LayoutTests/http/tests/workers/service/resources/basic-register.js
LayoutTests/http/tests/workers/service/resources/basic-unregister.js
LayoutTests/http/tests/workers/service/resources/service-worker-fetch.js
LayoutTests/http/tests/workers/service/resources/service-worker-getRegistration.js
LayoutTests/http/tests/workers/service/resources/service-worker-importScript.js
LayoutTests/http/tests/workers/service/resources/shift-reload-navigation.js
LayoutTests/http/tests/workers/service/service-worker-clear.html
LayoutTests/http/tests/workers/service/service-worker-crossorigin-fetch.html
LayoutTests/http/tests/workers/service/service-worker-getRegistration-expected.txt
LayoutTests/http/tests/workers/service/service-worker-request-with-body.https.html
LayoutTests/http/tests/workers/service/serviceworker-idb.https.html
LayoutTests/http/tests/workers/service/serviceworker-websocket.https.html
LayoutTests/http/tests/workers/service/serviceworkerclients-get.https.html
LayoutTests/http/wpt/service-workers/check-service-worker-header.https.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/register-default-scope.https-expected.txt
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/registration-iframe.https-expected.txt
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/registration-security-error.https-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/network/HTTPHeaderNames.in
Source/WebCore/workers/service/ServiceWorkerJob.cpp