Add optimization when updating a SW registration results in the exact same script
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Dec 2017 16:37:11 +0000 (16:37 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Dec 2017 16:37:11 +0000 (16:37 +0000)
commitb0f52fb9b1bb6a2c6fcc1a360f002d8a4755187f
tree9c3f287d2bede07f32f19063ecd8c1b6beef055a
parent7ac2a798b23297749ee3e7a9991fcfb9312cbe35
Add optimization when updating a SW registration results in the exact same script
https://bugs.webkit.org/show_bug.cgi?id=180891

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT test now that all checks are passing.

* web-platform-tests/service-workers/service-worker/registration-updateviacache.https-expected.txt:

Source/WebCore:

Add optimization when updating a SW registration results in the exact same script:
- https://w3c.github.io/ServiceWorker/#update-algorithm (step 8)

No new tests, rebaselined existing test.

* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::scriptFetchFinished):

LayoutTests:

* TestExpectations:
Skip bad WPT test that is timing out for us and Firefox. I'll file an upstream PR
to fix it.

* http/tests/workers/service/controller-change.html:
* http/tests/workers/service/registration-updateViaCache-all-importScripts.html:
* http/tests/workers/service/registration-updateViaCache-all.html:
* http/tests/workers/service/registration-updateViaCache-imports-importScripts.html:
* http/tests/workers/service/registration-updateViaCache-none-importScripts.html:
* http/tests/workers/service/registration-updateViaCache-none.html:
* http/tests/workers/service/resources/self_registration_update-worker.js: Removed.
* http/tests/workers/service/resources/self_registration_update-worker.php: Added.
* http/tests/workers/service/resources/service-worker-fetch-worker.js:
* http/tests/workers/service/resources/updating-fetch-worker.php: Added.
* http/tests/workers/service/resources/updating-worker.php: Added.
* http/tests/workers/service/self_registration_update.html:
* http/tests/workers/service/service-worker-registration-gc-event.html:
Undate WebKit-specific tests to reflect behavior change.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/http/tests/workers/service/controller-change.html
LayoutTests/http/tests/workers/service/registration-updateViaCache-all-importScripts.html
LayoutTests/http/tests/workers/service/registration-updateViaCache-all.html
LayoutTests/http/tests/workers/service/registration-updateViaCache-imports-importScripts.html
LayoutTests/http/tests/workers/service/registration-updateViaCache-none-importScripts.html
LayoutTests/http/tests/workers/service/registration-updateViaCache-none.html
LayoutTests/http/tests/workers/service/resources/self_registration_update-worker.js [deleted file]
LayoutTests/http/tests/workers/service/resources/self_registration_update-worker.php [new file with mode: 0644]
LayoutTests/http/tests/workers/service/resources/service-worker-fetch-worker.js
LayoutTests/http/tests/workers/service/resources/updating-fetch-worker.php [new file with mode: 0644]
LayoutTests/http/tests/workers/service/resources/updating-worker.php [new file with mode: 0644]
LayoutTests/http/tests/workers/service/self_registration_update.html
LayoutTests/http/tests/workers/service/service-worker-registration-gc-event.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/registration-updateviacache.https-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/workers/service/server/SWServerJobQueue.cpp