Support container.register() / registration.unregister() / inside service workers
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Dec 2017 04:17:12 +0000 (04:17 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Dec 2017 04:17:12 +0000 (04:17 +0000)
commitdf76ad23ea9ddeec53aecec28ad6826e33d08918
tree5928d25bf010fbb00e3d6481e37c26c9d95d7591
parent49db0ef67dcbce1f0d599c8762cba4e0bb6261f8
Support container.register() / registration.unregister() /  inside service workers
https://bugs.webkit.org/show_bug.cgi?id=180326

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline WPT test that now passes most checks.

* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/unregister.https-expected.txt:

Source/WebCore:

Support container.register() / registration.unregister() /  inside service workers.
This is mostly about removing the is<Document>() checks and adding testing given
that most of the work was done in r225455.

Test: http/tests/workers/service/ServiceWorkerGlobalScope_register.html

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

LayoutTests:

* TestExpectations:
Unskip test for registration.unregister() that now passes.

* http/tests/workers/service/ServiceWorkerGlobalScope_register-expected.txt: Added.
* http/tests/workers/service/ServiceWorkerGlobalScope_register.html: Added.
* http/tests/workers/service/resources/ServiceWorkerGlobalScope_register-worker.js: Added.
Add test coverage for container.register().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/http/tests/workers/service/ServiceWorkerGlobalScope_register-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/workers/service/ServiceWorkerGlobalScope_register.html [new file with mode: 0644]
LayoutTests/http/tests/workers/service/resources/ServiceWorkerGlobalScope_register-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/unregister.https-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/workers/service/ServiceWorkerContainer.cpp
Source/WebCore/workers/service/ServiceWorkerRegistration.cpp