From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- .../icons-member-cors-fail-manual.sub.html | 16 ++++++ .../icons-member/icons-member-cors-manual.sub.html | 16 ++++++ .../icons-member-csp-fail-manual.sub.html | 17 ++++++ .../icons-member/icons-member-csp-manual.sub.html | 17 ++++++ .../icons-member-last-matching-manual.html | 9 ++++ .../icons-member/icons-member-manual.html | 9 ++++ .../icons-member-next-appropriate-manual.html | 9 ++++ .../icons-member/icons-member-service-worker.js | 59 +++++++++++++++++++++ .../appmanifest/icons-member/resources/fail.png | Bin 0 -> 5957 bytes .../icons-member-cors-fail.sub.webmanifest | 10 ++++ .../icons-member-cors-fail.webmanifest.headers | 1 + .../resources/icons-member-cors.sub.webmanifest | 10 ++++ .../icons-member-cors.webmanifest.headers | 1 + .../resources/icons-member-csp-fail.webmanifest | 10 ++++ .../icons-member-csp-fail.webmanifest.headers | 1 + .../resources/icons-member-csp.sub.webmanifest | 10 ++++ .../resources/icons-member-csp.webmanifest.headers | 1 + .../icons-member-last-matching.webmanifest | 14 +++++ .../icons-member-last-matching.webmanifest.headers | 1 + .../icons-member/resources/icons-member-manual.js | 4 ++ .../icons-member-next-appropriate.webmanifest | 13 +++++ ...ons-member-next-appropriate.webmanifest.headers | 1 + .../resources/icons-member.webmanifest | 10 ++++ .../resources/icons-member.webmanifest.headers | 1 + .../appmanifest/icons-member/resources/pass.png | Bin 0 -> 5684 bytes .../icons-member/resources/pass.png.sub.headers | 1 + 26 files changed, 241 insertions(+) create mode 100644 testing/web-platform/tests/appmanifest/icons-member/icons-member-cors-fail-manual.sub.html create mode 100644 testing/web-platform/tests/appmanifest/icons-member/icons-member-cors-manual.sub.html create mode 100644 testing/web-platform/tests/appmanifest/icons-member/icons-member-csp-fail-manual.sub.html create mode 100644 testing/web-platform/tests/appmanifest/icons-member/icons-member-csp-manual.sub.html create mode 100644 testing/web-platform/tests/appmanifest/icons-member/icons-member-last-matching-manual.html create mode 100644 testing/web-platform/tests/appmanifest/icons-member/icons-member-manual.html create mode 100644 testing/web-platform/tests/appmanifest/icons-member/icons-member-next-appropriate-manual.html create mode 100644 testing/web-platform/tests/appmanifest/icons-member/icons-member-service-worker.js create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/fail.png create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors-fail.sub.webmanifest create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors-fail.webmanifest.headers create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors.sub.webmanifest create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors.webmanifest.headers create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp-fail.webmanifest create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp-fail.webmanifest.headers create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp.sub.webmanifest create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp.webmanifest.headers create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-last-matching.webmanifest create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-last-matching.webmanifest.headers create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-manual.js create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-next-appropriate.webmanifest create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-next-appropriate.webmanifest.headers create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/icons-member.webmanifest create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/icons-member.webmanifest.headers create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/pass.png create mode 100644 testing/web-platform/tests/appmanifest/icons-member/resources/pass.png.sub.headers (limited to 'testing/web-platform/tests/appmanifest/icons-member') diff --git a/testing/web-platform/tests/appmanifest/icons-member/icons-member-cors-fail-manual.sub.html b/testing/web-platform/tests/appmanifest/icons-member/icons-member-cors-fail-manual.sub.html new file mode 100644 index 0000000000..f49dac6057 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/icons-member-cors-fail-manual.sub.html @@ -0,0 +1,16 @@ + +Test that icons member is supported (CORS violation) + + + +

Testing support for icons member (CORS violation)

+ +

+ To pass, the icon must not show a white cross on a red background. +

diff --git a/testing/web-platform/tests/appmanifest/icons-member/icons-member-cors-manual.sub.html b/testing/web-platform/tests/appmanifest/icons-member/icons-member-cors-manual.sub.html new file mode 100644 index 0000000000..aa0fe89db6 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/icons-member-cors-manual.sub.html @@ -0,0 +1,16 @@ + +Test that icons member is supported (via CORS) + + + +

Testing support for icons member (via CORS)

+ +

+ To pass, the icon must show a white check mark on a green background. +

diff --git a/testing/web-platform/tests/appmanifest/icons-member/icons-member-csp-fail-manual.sub.html b/testing/web-platform/tests/appmanifest/icons-member/icons-member-csp-fail-manual.sub.html new file mode 100644 index 0000000000..e4706011f8 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/icons-member-csp-fail-manual.sub.html @@ -0,0 +1,17 @@ + + +Test that icons member is supported (CSP violation) + + + +

Testing support for icons member (CSP violation)

+ +

+ To pass, the icon must not show a white cross on a red background. +

diff --git a/testing/web-platform/tests/appmanifest/icons-member/icons-member-csp-manual.sub.html b/testing/web-platform/tests/appmanifest/icons-member/icons-member-csp-manual.sub.html new file mode 100644 index 0000000000..c76364b83f --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/icons-member-csp-manual.sub.html @@ -0,0 +1,17 @@ + + +Test that icons member is supported (CSP check) + + + +

Testing support for icons member (CSP check)

+ +

+ To pass, the icon must show a white check mark on a green background. +

diff --git a/testing/web-platform/tests/appmanifest/icons-member/icons-member-last-matching-manual.html b/testing/web-platform/tests/appmanifest/icons-member/icons-member-last-matching-manual.html new file mode 100644 index 0000000000..a02ddc3a50 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/icons-member-last-matching-manual.html @@ -0,0 +1,9 @@ + +Test that icons member is supported + + + +

Testing support for icons member

+

+ To pass, the icon must show a white check mark on a green background. +

diff --git a/testing/web-platform/tests/appmanifest/icons-member/icons-member-manual.html b/testing/web-platform/tests/appmanifest/icons-member/icons-member-manual.html new file mode 100644 index 0000000000..6a9b7620ed --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/icons-member-manual.html @@ -0,0 +1,9 @@ + +Test that icons member is supported + + + +

Testing support for icons member

+

+ To pass, the icon should must a white check mark on a green background. +

diff --git a/testing/web-platform/tests/appmanifest/icons-member/icons-member-next-appropriate-manual.html b/testing/web-platform/tests/appmanifest/icons-member/icons-member-next-appropriate-manual.html new file mode 100644 index 0000000000..8e87fc1062 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/icons-member-next-appropriate-manual.html @@ -0,0 +1,9 @@ + +Test that icons member is supported + + + +

Testing support for icons member

+

+ To pass, the icon must show a white check mark on a green background. +

diff --git a/testing/web-platform/tests/appmanifest/icons-member/icons-member-service-worker.js b/testing/web-platform/tests/appmanifest/icons-member/icons-member-service-worker.js new file mode 100644 index 0000000000..21b07f8515 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/icons-member-service-worker.js @@ -0,0 +1,59 @@ +// Some user agents only offer app installation if there is a SW and it handles +// offline requests. + +const cacheVersion = "1.2"; +const CACHE_NAME = `cache-v${cacheVersion}`; + +// The resources cached by this service worker. +const resources = [ + "icons-member-cors-fail-manual.sub.html", + "icons-member-cors-manual.sub.html", + "icons-member-csp-fail-manual.sub.html", + "icons-member-csp-manual.sub.html", + "icons-member-last-matching-manual.html", + "icons-member-manual.html", + "icons-member-next-appropriate-manual.html", + "icons-member-service-worker.js", + "resources/icons-member-manual.js", + "resources/fail.png", + "resources/pass.png" +]; + +// Load all resources for this service worker. +const precache = async () => { + const cache = await caches.open(CACHE_NAME); + await cache.addAll(resources); +}; + +// Get a resource from the cache. +const fromCache = async request => { + const cache = await caches.open(CACHE_NAME); + return await cache.match(request.url); +}; + +// Attempt to get resources from the network first, fallback to the cache if we're +// offline. +const networkFallbackToCache = async request => { + try { + const response = await fetch(request); + if (response.ok) return response; + } catch (err) {} + return await fromCache(request); +}; + +// When we have a new service worker, update the caches and swap immediately. +self.addEventListener("install", e => { + e.waitUntil(precache().then(() => self.skipWaiting())); +}); + +// Claim existing clients. +self.addEventListener("activate", e => { + e.waitUntil(self.clients.claim()); +}); + +// When a resource need to be fetched, check whether it is +// contained in the cache and return the cached version, otherwise +// get it from the network. +self.addEventListener("fetch", e => { + e.respondWith(networkFallbackToCache(e.request)); +}); diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/fail.png b/testing/web-platform/tests/appmanifest/icons-member/resources/fail.png new file mode 100644 index 0000000000..1d596c6ba6 Binary files /dev/null and b/testing/web-platform/tests/appmanifest/icons-member/resources/fail.png differ diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors-fail.sub.webmanifest b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors-fail.sub.webmanifest new file mode 100644 index 0000000000..24e2214365 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors-fail.sub.webmanifest @@ -0,0 +1,10 @@ +{ + "name": "Icons member (CORS violation) WPT", + "icons": [{ + "src": "https://{{host}}:{{ports[https][1]}}/appmanifest/icons-member/resources/fail.png", + "sizes": "256x256", + "type": "image/png" + }], + "start_url": "../icons-member-cors-fail-manual.sub.html", + "display": "fullscreen" +} diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors-fail.webmanifest.headers b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors-fail.webmanifest.headers new file mode 100644 index 0000000000..2bab061d43 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors-fail.webmanifest.headers @@ -0,0 +1 @@ +Content-Type: application/manifest+json; charset=utf-8 diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors.sub.webmanifest b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors.sub.webmanifest new file mode 100644 index 0000000000..33cb12654b --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors.sub.webmanifest @@ -0,0 +1,10 @@ +{ + "name": "Icons member (via CORS) WPT", + "icons": [{ + "src": "https://{{host}}:{{ports[https][1]}}/appmanifest/icons-member/resources/pass.png", + "sizes": "256x256", + "type": "image/png" + }], + "start_url": "../icons-member-cors-manual.sub.html", + "display": "fullscreen" +} diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors.webmanifest.headers b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors.webmanifest.headers new file mode 100644 index 0000000000..2bab061d43 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-cors.webmanifest.headers @@ -0,0 +1 @@ +Content-Type: application/manifest+json; charset=utf-8 diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp-fail.webmanifest b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp-fail.webmanifest new file mode 100644 index 0000000000..2b614ebb01 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp-fail.webmanifest @@ -0,0 +1,10 @@ +{ + "name": "Icons member (CSP violation) WPT", + "icons": [{ + "src": "fail.png", + "sizes": "256x256", + "type": "image/png" + }], + "start_url": "../icons-member-csp-fail-manual.sub.html", + "display": "fullscreen" +} diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp-fail.webmanifest.headers b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp-fail.webmanifest.headers new file mode 100644 index 0000000000..2bab061d43 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp-fail.webmanifest.headers @@ -0,0 +1 @@ +Content-Type: application/manifest+json; charset=utf-8 diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp.sub.webmanifest b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp.sub.webmanifest new file mode 100644 index 0000000000..f1089bba3c --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp.sub.webmanifest @@ -0,0 +1,10 @@ +{ + "name": "Icons member (CSP check) WPT", + "icons": [{ + "src": "https://{{host}}:{{ports[https][1]}}/appmanifest/icons-member/resources/pass.png", + "sizes": "256x256", + "type": "image/png" + }], + "start_url": "../icons-member-csp-manual.sub.html", + "display": "fullscreen" +} diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp.webmanifest.headers b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp.webmanifest.headers new file mode 100644 index 0000000000..2bab061d43 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-csp.webmanifest.headers @@ -0,0 +1 @@ +Content-Type: application/manifest+json; charset=utf-8 diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-last-matching.webmanifest b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-last-matching.webmanifest new file mode 100644 index 0000000000..04ac33112d --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-last-matching.webmanifest @@ -0,0 +1,14 @@ +{ + "name": "Icons member WPT", + "icons": [{ + "src": "fail.png", + "sizes": "256x256", + "type": "image/png" + }, { + "src": "pass.png", + "sizes": "256x256", + "type": "image/png" + }], + "start_url": "../icons-member-last-matching-manual.html", + "display": "fullscreen" +} diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-last-matching.webmanifest.headers b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-last-matching.webmanifest.headers new file mode 100644 index 0000000000..2bab061d43 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-last-matching.webmanifest.headers @@ -0,0 +1 @@ +Content-Type: application/manifest+json; charset=utf-8 diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-manual.js b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-manual.js new file mode 100644 index 0000000000..cf149792a3 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-manual.js @@ -0,0 +1,4 @@ +if ('serviceWorker' in navigator) { + navigator.serviceWorker.register( + 'icons-member-service-worker.js'); +} diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-next-appropriate.webmanifest b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-next-appropriate.webmanifest new file mode 100644 index 0000000000..e65169b06a --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-next-appropriate.webmanifest @@ -0,0 +1,13 @@ +{ + "name": "Icons member WPT", + "icons": [{ + "src": "pass.png", + "sizes": "256x256", + "type": "image/png" + }, { + "src": "../icons-member-manual.html", + "sizes": "256x256" + }], + "start_url": "../icons-member-next-appropriate-manual.html", + "display": "fullscreen" +} diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-next-appropriate.webmanifest.headers b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-next-appropriate.webmanifest.headers new file mode 100644 index 0000000000..2bab061d43 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member-next-appropriate.webmanifest.headers @@ -0,0 +1 @@ +Content-Type: application/manifest+json; charset=utf-8 diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member.webmanifest b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member.webmanifest new file mode 100644 index 0000000000..8e7a2c3426 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member.webmanifest @@ -0,0 +1,10 @@ +{ + "name": "Icons member WPT", + "icons": [{ + "src": "pass.png", + "sizes": "256x256", + "type": "image/png" + }], + "start_url": "../icons-member-manual.html", + "display": "fullscreen" +} diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member.webmanifest.headers b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member.webmanifest.headers new file mode 100644 index 0000000000..2bab061d43 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/icons-member.webmanifest.headers @@ -0,0 +1 @@ +Content-Type: application/manifest+json; charset=utf-8 diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/pass.png b/testing/web-platform/tests/appmanifest/icons-member/resources/pass.png new file mode 100644 index 0000000000..be7433a3e2 Binary files /dev/null and b/testing/web-platform/tests/appmanifest/icons-member/resources/pass.png differ diff --git a/testing/web-platform/tests/appmanifest/icons-member/resources/pass.png.sub.headers b/testing/web-platform/tests/appmanifest/icons-member/resources/pass.png.sub.headers new file mode 100644 index 0000000000..adf190aa8e --- /dev/null +++ b/testing/web-platform/tests/appmanifest/icons-member/resources/pass.png.sub.headers @@ -0,0 +1 @@ +Access-Control-Allow-Origin: https://{{host}}:{{ports[https][0]}} -- cgit v1.2.3