Default scope used when registering a service worker is wrong
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Dec 2017 05:08:52 +0000 (05:08 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Dec 2017 05:08:52 +0000 (05:08 +0000)
commit6a83d13cd37ae271707096a36f4f9318a2b86d6d
treeed0f22e481ddaef5f1fc2e9563dfd3e952718782
parentea2d6c7e64caf0fcdcef22c8c2bf845a96810ab5
Default scope used when registering a service worker is wrong
https://bugs.webkit.org/show_bug.cgi?id=180961

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline WPT test now that more checks are passing.

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

Source/WebCore:

The default scope we used when registering a service worker was wrong, it did not match:
- https://w3c.github.io/ServiceWorker/#start-register (Step 4)

This patch aligns our behavior with the specification.

No new tests, rebaselined existing test.

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::addRegistration):

LayoutTests:

Update / Rebaseline WebKit tests due to behavior change.

* http/tests/workers/service/basic-register-exceptions-expected.txt:
* http/tests/workers/service/basic-unregister.https-expected.txt:
* http/tests/workers/service/resources/basic-unregister.js:
(async.test):
* http/tests/workers/service/resources/service-worker-getRegistration.js:
(async.test):
* http/tests/workers/service/self_registration-expected.txt:
* http/tests/workers/service/service-worker-clear.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/workers/service/basic-register-exceptions-expected.txt
LayoutTests/http/tests/workers/service/basic-unregister.https-expected.txt
LayoutTests/http/tests/workers/service/resources/basic-unregister.js
LayoutTests/http/tests/workers/service/resources/service-worker-getRegistration.js
LayoutTests/http/tests/workers/service/self_registration-expected.txt
LayoutTests/http/tests/workers/service/service-worker-clear.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/register-default-scope.https-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/workers/service/ServiceWorkerContainer.cpp