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 --- .../tests/appmanifest/id-member/icon.png | Bin 0 -> 14565 bytes .../id-member-manifest-update-manual-v1.html | 29 ++++++++++++++++++ .../id-member-manifest-update-manual-v2.html | 25 +++++++++++++++ ...id-member-manifest-update-manual.tentative.html | 22 +++++++++++++ .../id-member-manifest-update-v1.webmanifest | 13 ++++++++ ...d-member-manifest-update-v1.webmanifest.headers | 1 + .../id-member-manifest-update-v2.webmanifest | 13 ++++++++ ...d-member-manifest-update-v2.webmanifest.headers | 1 + .../id-member/id-member-manifest-update.js | 34 +++++++++++++++++++++ .../id-member/id-member-service-worker.js | 8 +++++ 10 files changed, 146 insertions(+) create mode 100644 testing/web-platform/tests/appmanifest/id-member/icon.png create mode 100644 testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-manual-v1.html create mode 100644 testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-manual-v2.html create mode 100644 testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-manual.tentative.html create mode 100644 testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v1.webmanifest create mode 100644 testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v1.webmanifest.headers create mode 100644 testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v2.webmanifest create mode 100644 testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v2.webmanifest.headers create mode 100644 testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update.js create mode 100644 testing/web-platform/tests/appmanifest/id-member/id-member-service-worker.js (limited to 'testing/web-platform/tests/appmanifest/id-member') diff --git a/testing/web-platform/tests/appmanifest/id-member/icon.png b/testing/web-platform/tests/appmanifest/id-member/icon.png new file mode 100644 index 0000000000..4b9c7c8f32 Binary files /dev/null and b/testing/web-platform/tests/appmanifest/id-member/icon.png differ diff --git a/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-manual-v1.html b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-manual-v1.html new file mode 100644 index 0000000000..3f4a331e0b --- /dev/null +++ b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-manual-v1.html @@ -0,0 +1,29 @@ + + + + + Manifest Id Web Platform Test + + + + + + + +

+ Manifest Id Test +

+

+ start_url v1 +

+ + diff --git a/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-manual-v2.html b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-manual-v2.html new file mode 100644 index 0000000000..4454017eaf --- /dev/null +++ b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-manual-v2.html @@ -0,0 +1,25 @@ + + + + Manifest Id Web Platform Test + + + + + +

+ Manifest Id Test +

+

+ start_url v2 +

+ + diff --git a/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-manual.tentative.html b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-manual.tentative.html new file mode 100644 index 0000000000..c534d7404a --- /dev/null +++ b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-manual.tentative.html @@ -0,0 +1,22 @@ + + + + Manifest Id Web Platform Test + + + + + +

+ Manifest Id Test +

+ + \ No newline at end of file diff --git a/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v1.webmanifest b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v1.webmanifest new file mode 100644 index 0000000000..5d02d2b10a --- /dev/null +++ b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v1.webmanifest @@ -0,0 +1,13 @@ +{ + "name": "id member test", + "id": "/testId", + "start_url": "id-member-manifest-update-manual-v1.html", + "icons": [ + { + "src": "icon.png", + "sizes": "256x256", + "type": "image/png" + } + ], + "display": "standalone" +} diff --git a/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v1.webmanifest.headers b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v1.webmanifest.headers new file mode 100644 index 0000000000..23f36ea27c --- /dev/null +++ b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v1.webmanifest.headers @@ -0,0 +1 @@ +Content-Type: application/manifest+json; charset=utf-8 \ No newline at end of file diff --git a/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v2.webmanifest b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v2.webmanifest new file mode 100644 index 0000000000..582620186e --- /dev/null +++ b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v2.webmanifest @@ -0,0 +1,13 @@ +{ + "name": "id member test", + "id": "testId", + "start_url": "id-member-manifest-update-manual-v2.html", + "icons": [ + { + "src": "icon.png", + "sizes": "256x256", + "type": "image/png" + } + ], + "display": "standalone" +} diff --git a/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v2.webmanifest.headers b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v2.webmanifest.headers new file mode 100644 index 0000000000..23f36ea27c --- /dev/null +++ b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update-v2.webmanifest.headers @@ -0,0 +1 @@ +Content-Type: application/manifest+json; charset=utf-8 \ No newline at end of file diff --git a/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update.js b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update.js new file mode 100644 index 0000000000..7d6e344ed9 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/id-member/id-member-manifest-update.js @@ -0,0 +1,34 @@ +window.onload = () => { + const instruction = document.createElement("div"); + instruction.innerHTML = ` +

+ Instructions +

+
    +
  1. Install id-member-manifest-update-manual.html as a PWA
  2. +
  3. + Launch the app from OS. The page should be launched to start_url v1. +
  4. +
  5. + Close the app window. +
  6. +
  7. + Trigger a manifest update event. +

    + This step is specific to each browser implementation. + On Chrome, trigger the update by restarting the browser through chrome://restart. +

    +
  8. +
  9. + Launch the app from OS again, start_url should be updated to v2. +
  10. +
+`; + + document.body.appendChild(instruction); +}; +async function main() { + await navigator.serviceWorker.register("id-member-service-worker.js"); + await navigator.serviceWorker.ready; +} +main(); \ No newline at end of file diff --git a/testing/web-platform/tests/appmanifest/id-member/id-member-service-worker.js b/testing/web-platform/tests/appmanifest/id-member/id-member-service-worker.js new file mode 100644 index 0000000000..c0a16c4a46 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/id-member/id-member-service-worker.js @@ -0,0 +1,8 @@ +// Some user agents only offer app installation if there is a SW and it handles +// offline requests. + +self.addEventListener("fetch", e => { + e.respondWith(fetch(e.request).catch(_ => { + return new Response('Offline test.'); + })); +}); -- cgit v1.2.3