diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index 879c47358212..b089f57a0eca 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -64843,6 +64843,16 @@ {} ] ], + "service-workers/service-worker/resources/bytecheck-worker-imported-script.py": [ + [ + {} + ] + ], + "service-workers/service-worker/resources/bytecheck-worker.py": [ + [ + {} + ] + ], "service-workers/service-worker/resources/claim-with-redirect-iframe.html": [ [ {} @@ -127676,6 +127686,12 @@ {} ] ], + "service-workers/service-worker/update-bytecheck.https.html": [ + [ + "/service-workers/service-worker/update-bytecheck.https.html", + {} + ] + ], "service-workers/service-worker/update-recovery.https.html": [ [ "/service-workers/service-worker/update-recovery.https.html", @@ -213561,6 +213577,14 @@ "0ddb4f1cf84729ed673295719ec58a3e5d600a12", "support" ], + "service-workers/service-worker/resources/bytecheck-worker-imported-script.py": [ + "772d029d4efbe22f62f3473d4afe9e501a792571", + "support" + ], + "service-workers/service-worker/resources/bytecheck-worker.py": [ + "2693790af1dcd812bc3741db7fa355e23eef0e01", + "support" + ], "service-workers/service-worker/resources/claim-with-redirect-iframe.html": [ "fdc472f4e9a591f0b471174b2aa1783107731f49", "support" @@ -214353,6 +214377,10 @@ "7c8c6c3edca83d54f1838eccf3afb0b1223c7a44", "testharness" ], + "service-workers/service-worker/update-bytecheck.https.html": [ + "6562348b198124822297c6b622c3e63870427672", + "testharness" + ], "service-workers/service-worker/update-recovery.https.html": [ "aac5705d6844e4a33200418504adb57053a45be2", "testharness" diff --git a/testing/web-platform/tests/service-workers/service-worker/resources/bytecheck-worker-imported-script.py b/testing/web-platform/tests/service-workers/service-worker/resources/bytecheck-worker-imported-script.py new file mode 100644 index 000000000000..e96022026c52 --- /dev/null +++ b/testing/web-platform/tests/service-workers/service-worker/resources/bytecheck-worker-imported-script.py @@ -0,0 +1,19 @@ +import time + +def main(request, response): + headers = [('Content-Type', 'application/javascript'), + ('Cache-Control', 'max-age=0')] + + imported_content_type = '' + if 'imported' in request.GET: + imported_content_type = request.GET['imported'] + + imported_content = 'default' + if imported_content_type == 'time': + imported_content = time.time() + + body = ''' + // %s + ''' % (imported_content) + + return headers, body diff --git a/testing/web-platform/tests/service-workers/service-worker/resources/bytecheck-worker.py b/testing/web-platform/tests/service-workers/service-worker/resources/bytecheck-worker.py new file mode 100644 index 000000000000..0b12de9f3084 --- /dev/null +++ b/testing/web-platform/tests/service-workers/service-worker/resources/bytecheck-worker.py @@ -0,0 +1,32 @@ +import time + +def main(request, response): + headers = [('Content-Type', 'application/javascript'), + ('Cache-Control', 'max-age=0')] + + main_content_type = '' + if 'main' in request.GET: + main_content_type = request.GET['main'] + + main_content = 'default' + if main_content_type == 'time': + main_content = time.time() + + imported_request_path = '' + if 'path' in request.GET: + imported_request_path = request.GET['path'] + + imported_request_type = '' + if 'imported' in request.GET: + imported_request_type = request.GET['imported'] + + imported_request = '' + if imported_request_type == 'time': + imported_request = '?imported=time'; + + body = ''' + // %s + importScripts('%sbytecheck-worker-imported-script.py%s'); + ''' % (main_content, imported_request_path, imported_request) + + return headers, body diff --git a/testing/web-platform/tests/service-workers/service-worker/update-bytecheck.https.html b/testing/web-platform/tests/service-workers/service-worker/update-bytecheck.https.html new file mode 100644 index 000000000000..6e4c6ec403a9 --- /dev/null +++ b/testing/web-platform/tests/service-workers/service-worker/update-bytecheck.https.html @@ -0,0 +1,72 @@ + + + + + + + +