Populate self.registration.installing/waiting/active inside service workers
https://bugs.webkit.org/show_bug.cgi?id=180168
Reviewed by Brady Eidson.
LayoutTests/imported/w3c:
Rebaseline a couple of WPT that now pass for checks.
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/registration-attribute.https-expected.txt:
* web-platform-tests/service-workers/service-worker/navigation-redirect.https-expected.txt:
Source/WebCore:
Populate self.registration.installing/waiting/active inside service workers.
Also make sure the ServiceWorker's state properly gets updated inside
service workers.
No new tests, extended existing test for self.registration.
* workers/service/ServiceWorker.cpp:
(WebCore::ServiceWorker::scheduleTaskToUpdateState):
* workers/service/context/SWContextManager.cpp:
(WebCore::SWContextManager::forEachServiceWorkerThread):
* workers/service/context/SWContextManager.h:
* workers/service/context/ServiceWorkerThread.cpp:
(WebCore::ServiceWorkerThread::fireInstallEvent):
(WebCore::ServiceWorkerThread::fireActivateEvent):
* workers/service/server/SWClientConnection.cpp:
(WebCore::SWClientConnection::updateRegistrationState):
(WebCore::SWClientConnection::updateWorkerState):
(WebCore::SWClientConnection::fireUpdateFoundEvent):
* workers/service/server/SWClientConnection.h:
Source/WTF:
Add CrossThreadCopier support for std::optional<>.
* wtf/CrossThreadCopier.h:
LayoutTests:
Extend layout test coverage.
* http/tests/workers/service/resources/self_registration-worker.js:
* http/tests/workers/service/self_registration-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225341
268f45cc-cd09-0410-ab3c-
d52691b4dbfc