Title: [253592] trunk/LayoutTests/imported/w3c
- Revision
- 253592
- Author
- [email protected]
- Date
- 2019-12-16 15:33:20 -0800 (Mon, 16 Dec 2019)
Log Message
REGRESSION: [ Mac wk2 ] imported/w3c/web-platform-tests/service-workers/service-worker/update-no-cache-request-headers.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=205286
<rdar://problem/57976344>
Reviewed by Alexey Proskuryakov.
The test triggers a registration update and then expects registration.installing to be non-null
once the registration update promise is resolved. This is only true if the content of the service
worker script is different since last update. The script included a timestamp to try and make
the script different every time but it would sometimes not suffice if the update happens quickly
enough. To address the issue, include a UUID in the script instead of a timestamp.
Upstream PR: https://github.com/web-platform-tests/wpt/pull/20797
* web-platform-tests/service-workers/service-worker/resources/test-request-headers-worker.js:
* web-platform-tests/service-workers/service-worker/resources/test-request-headers-worker.py:
(main):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (253591 => 253592)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2019-12-16 23:28:27 UTC (rev 253591)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2019-12-16 23:33:20 UTC (rev 253592)
@@ -1,3 +1,23 @@
+2019-12-16 Chris Dumez <[email protected]>
+
+ REGRESSION: [ Mac wk2 ] imported/w3c/web-platform-tests/service-workers/service-worker/update-no-cache-request-headers.https.html is a flaky failure
+ https://bugs.webkit.org/show_bug.cgi?id=205286
+ <rdar://problem/57976344>
+
+ Reviewed by Alexey Proskuryakov.
+
+ The test triggers a registration update and then expects registration.installing to be non-null
+ once the registration update promise is resolved. This is only true if the content of the service
+ worker script is different since last update. The script included a timestamp to try and make
+ the script different every time but it would sometimes not suffice if the update happens quickly
+ enough. To address the issue, include a UUID in the script instead of a timestamp.
+
+ Upstream PR: https://github.com/web-platform-tests/wpt/pull/20797
+
+ * web-platform-tests/service-workers/service-worker/resources/test-request-headers-worker.js:
+ * web-platform-tests/service-workers/service-worker/resources/test-request-headers-worker.py:
+ (main):
+
2019-12-13 Chris Dumez <[email protected]>
Implement PostMessageOptions for postMessage
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/test-request-headers-worker.js (253591 => 253592)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/test-request-headers-worker.js 2019-12-16 23:28:27 UTC (rev 253591)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/test-request-headers-worker.js 2019-12-16 23:33:20 UTC (rev 253592)
@@ -1,5 +1,5 @@
-// Add a unique timestamp per request to induce service worker script update.
-// Time stamp: %TIMESTAMP%
+// Add a unique UUID per request to induce service worker script update.
+// Time stamp: %UUID%
// The server injects the request headers here as a JSON string.
const headersAsJson = `%HEADERS%`;
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/test-request-headers-worker.py (253591 => 253592)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/test-request-headers-worker.py 2019-12-16 23:28:27 UTC (rev 253591)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/test-request-headers-worker.py 2019-12-16 23:33:20 UTC (rev 253592)
@@ -1,6 +1,6 @@
import json
import os
-import time
+import uuid
def main(request, response):
path = os.path.join(os.path.dirname(__file__),
@@ -9,7 +9,7 @@
data = "" for key,value in request.headers.iteritems()}
body = body.replace("%HEADERS%", json.dumps(data))
- body = body.replace("%TIMESTAMP%", str(time.time()))
+ body = body.replace("%UUID%", str(uuid.uuid4()))
headers = []
headers.append(("ETag", "etag"))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes