Skip to content
Permalink
Browse files
REGRESSION (r293506): [ iOS ][ macOS ] imported/w3c/web-platform-test…
…s/service-workers/service-worker/registration-updateviacache.https.html is a flaky failure

https://bugs.webkit.org/show_bug.cgi?id=240074
rdar://problem/92742526

Patch by Youenn Fablet <youennf@gmail.com> on 2022-06-22
Reviewed by Chris Dumez.

Before r293506, we were refreshing the imported scripts from network process only.
We are now correctly refreshing them from the caller of update.
This makes it possible to load the same scripts from various processes (web process, service worker process), which have different memory caches.
The failure happened due to the fact that different subtests were importing the same subscript with various options.
This triggered storing the subscript in different memory caches.
Some tests expect cache to kick in and expect in that case to have the same resource.
If the cache kicks in, but on different memory caches, we end up with different resources.
To prevent this in the test, we simply append the test name to each subscript import.

* LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/update-max-aged-worker.py:
(main):
* LayoutTests/platform/mac/TestExpectations:

Canonical link: https://commits.webkit.org/251742@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295737 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
youennf authored and webkit-commit-queue committed Jun 22, 2022
1 parent 84d3422 commit c2dfbf67f1585c532096e680e6e7cf641315d2f7
Showing 2 changed files with 1 addition and 3 deletions.
@@ -13,7 +13,7 @@ def main(request, response):
body = u'''
const mainTime = {time:8f};
const testName = {test};
importScripts('update-max-aged-worker-imported-script.py');
importScripts('update-max-aged-worker-imported-script.py?test={test}');
addEventListener('message', event => {{
event.source.postMessage({{
@@ -2289,8 +2289,6 @@ webkit.org/b/239791 webanimations/accelerated-animation-slot-invalidation.html [

webkit.org/b/239990 css3/calc/transitions-dependent.html [ Pass Failure ]

webkit.org/b/240074 imported/w3c/web-platform-tests/service-workers/service-worker/registration-updateviacache.https.html [ Pass Failure ]

webkit.org/b/231298 accessibility/mac/selection-sync.html [ Skip ] # Timeout

webkit.org/b/227845 [ Debug ] webaudio/audioworket-out-of-memory.html [ Pass Timeout DumpJSConsoleLogInStdErr ]

0 comments on commit c2dfbf6

Please sign in to comment.