From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../bad-extensions/invalid-json/manifest.json | 1 + .../bad-extensions/invalid-property/manifest.json | 23 ++++++++ ..._aboutdebugging_devtoolstoolbox_breakpoint.html | 9 +++ .../packaged-extension/packaged-extension.xpi | Bin 0 -> 4580 bytes .../resources/real/usb-runtimes-sample.json | 14 +++++ ...pt_aboutdebugging_devtoolstoolbox_breakpoint.js | 12 ++++ .../resources/service-workers/controlled-sw.html | 38 +++++++++++++ .../resources/service-workers/controlled-sw.js | 31 +++++++++++ .../resources/service-workers/empty-sw.html | 30 ++++++++++ .../browser/resources/service-workers/empty-sw.js | 1 + .../resources/service-workers/fetch-sw.html | 30 ++++++++++ .../browser/resources/service-workers/fetch-sw.js | 6 ++ .../browser/resources/service-workers/push-sw.html | 61 +++++++++++++++++++++ .../browser/resources/service-workers/push-sw.js | 35 ++++++++++++ .../test-adb-extension/adb-extension-linux.xpi | Bin 0 -> 495578 bytes .../test-adb-extension/adb-extension-linux64.xpi | Bin 0 -> 824421 bytes .../test-adb-extension/adb-extension-mac64.xpi | Bin 0 -> 782572 bytes .../test-adb-extension/adb-extension-win32.xpi | Bin 0 -> 713900 bytes .../test-temporary-extension/manifest.json | 13 +++++ .../resources/test-temporary-extension/script.js | 8 +++ 20 files changed, 312 insertions(+) create mode 100644 devtools/client/aboutdebugging/test/browser/resources/bad-extensions/invalid-json/manifest.json create mode 100644 devtools/client/aboutdebugging/test/browser/resources/bad-extensions/invalid-property/manifest.json create mode 100644 devtools/client/aboutdebugging/test/browser/resources/doc_aboutdebugging_devtoolstoolbox_breakpoint.html create mode 100644 devtools/client/aboutdebugging/test/browser/resources/packaged-extension/packaged-extension.xpi create mode 100644 devtools/client/aboutdebugging/test/browser/resources/real/usb-runtimes-sample.json create mode 100644 devtools/client/aboutdebugging/test/browser/resources/script_aboutdebugging_devtoolstoolbox_breakpoint.js create mode 100644 devtools/client/aboutdebugging/test/browser/resources/service-workers/controlled-sw.html create mode 100644 devtools/client/aboutdebugging/test/browser/resources/service-workers/controlled-sw.js create mode 100644 devtools/client/aboutdebugging/test/browser/resources/service-workers/empty-sw.html create mode 100644 devtools/client/aboutdebugging/test/browser/resources/service-workers/empty-sw.js create mode 100644 devtools/client/aboutdebugging/test/browser/resources/service-workers/fetch-sw.html create mode 100644 devtools/client/aboutdebugging/test/browser/resources/service-workers/fetch-sw.js create mode 100644 devtools/client/aboutdebugging/test/browser/resources/service-workers/push-sw.html create mode 100644 devtools/client/aboutdebugging/test/browser/resources/service-workers/push-sw.js create mode 100644 devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-linux.xpi create mode 100644 devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-linux64.xpi create mode 100644 devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-mac64.xpi create mode 100644 devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-win32.xpi create mode 100644 devtools/client/aboutdebugging/test/browser/resources/test-temporary-extension/manifest.json create mode 100644 devtools/client/aboutdebugging/test/browser/resources/test-temporary-extension/script.js (limited to 'devtools/client/aboutdebugging/test/browser/resources') diff --git a/devtools/client/aboutdebugging/test/browser/resources/bad-extensions/invalid-json/manifest.json b/devtools/client/aboutdebugging/test/browser/resources/bad-extensions/invalid-json/manifest.json new file mode 100644 index 0000000000..4ab10b4de7 --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/resources/bad-extensions/invalid-json/manifest.json @@ -0,0 +1 @@ +this is not valid json diff --git a/devtools/client/aboutdebugging/test/browser/resources/bad-extensions/invalid-property/manifest.json b/devtools/client/aboutdebugging/test/browser/resources/bad-extensions/invalid-property/manifest.json new file mode 100644 index 0000000000..992818bd77 --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/resources/bad-extensions/invalid-property/manifest.json @@ -0,0 +1,23 @@ +{ + "manifest_version": 2, + "name": "test-invalid-extension", + "version": "1", + "description": "the name says it all", + "permissions": ["*://*.foo.com/*", "alarms", "notifications", "tabs"], + "background": { + "scripts": ["background.js"] + }, + "content_scripts": [ + { + "matches": "*://*.foo.com/*", + "js": ["content.js"] + } + ], + "browser_action": { + "default_icon": { + "32": "home.svg" + }, + "default_title": "foobarbaz (v1)", + "browser_style": true + } +} diff --git a/devtools/client/aboutdebugging/test/browser/resources/doc_aboutdebugging_devtoolstoolbox_breakpoint.html b/devtools/client/aboutdebugging/test/browser/resources/doc_aboutdebugging_devtoolstoolbox_breakpoint.html new file mode 100644 index 0000000000..bb28556775 --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/resources/doc_aboutdebugging_devtoolstoolbox_breakpoint.html @@ -0,0 +1,9 @@ + + + + BREAKPOINT TEST PAGE + + + + + diff --git a/devtools/client/aboutdebugging/test/browser/resources/packaged-extension/packaged-extension.xpi b/devtools/client/aboutdebugging/test/browser/resources/packaged-extension/packaged-extension.xpi new file mode 100644 index 0000000000..c1c7af9600 Binary files /dev/null and b/devtools/client/aboutdebugging/test/browser/resources/packaged-extension/packaged-extension.xpi differ diff --git a/devtools/client/aboutdebugging/test/browser/resources/real/usb-runtimes-sample.json b/devtools/client/aboutdebugging/test/browser/resources/real/usb-runtimes-sample.json new file mode 100644 index 0000000000..bce334e95a --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/resources/real/usb-runtimes-sample.json @@ -0,0 +1,14 @@ +[ + { + "sidebarInfo": { + "deviceName": "Pixel 2", + "shortName": "Firefox Nightly" + }, + "runtimeDetails": { + "info": { + "name": "Mozilla Nightly", + "version": "64.0a1" + } + } + } +] diff --git a/devtools/client/aboutdebugging/test/browser/resources/script_aboutdebugging_devtoolstoolbox_breakpoint.js b/devtools/client/aboutdebugging/test/browser/resources/script_aboutdebugging_devtoolstoolbox_breakpoint.js new file mode 100644 index 0000000000..99401016e4 --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/resources/script_aboutdebugging_devtoolstoolbox_breakpoint.js @@ -0,0 +1,12 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +// Random method on which a breakpoint will be set from the DevTools UI in the +// test. +window.testMethod = function () { + const a = 1; + const b = 2; + return a + b; +}; diff --git a/devtools/client/aboutdebugging/test/browser/resources/service-workers/controlled-sw.html b/devtools/client/aboutdebugging/test/browser/resources/service-workers/controlled-sw.html new file mode 100644 index 0000000000..98d3bffd95 --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/resources/service-workers/controlled-sw.html @@ -0,0 +1,38 @@ + + + + + Service worker controlled + + + + + diff --git a/devtools/client/aboutdebugging/test/browser/resources/service-workers/controlled-sw.js b/devtools/client/aboutdebugging/test/browser/resources/service-workers/controlled-sw.js new file mode 100644 index 0000000000..0a6d9cfdc6 --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/resources/service-workers/controlled-sw.js @@ -0,0 +1,31 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +/* eslint-env worker */ + +"use strict"; + +// Copied from shared-head.js +function waitUntil(predicate, interval = 10) { + if (predicate()) { + return Promise.resolve(true); + } + return new Promise(resolve => { + setTimeout(function () { + waitUntil(predicate, interval).then(() => resolve(true)); + }, interval); + }); +} + +// This flag will be flipped from controlled-sw.html::installServiceWorker() +let canInstall = false; +self.addEventListener("message", function (event) { + if (event.data === "install-service-worker") { + canInstall = true; + } +}); + +// Wait for the canInstall flag to be flipped before completing the install. +self.addEventListener("install", function (event) { + event.waitUntil(waitUntil(() => canInstall)); +}); diff --git a/devtools/client/aboutdebugging/test/browser/resources/service-workers/empty-sw.html b/devtools/client/aboutdebugging/test/browser/resources/service-workers/empty-sw.html new file mode 100644 index 0000000000..ab862743a7 --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/resources/service-workers/empty-sw.html @@ -0,0 +1,30 @@ + + + + + Service worker test + + + + + diff --git a/devtools/client/aboutdebugging/test/browser/resources/service-workers/empty-sw.js b/devtools/client/aboutdebugging/test/browser/resources/service-workers/empty-sw.js new file mode 100644 index 0000000000..1e7226402c --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/resources/service-workers/empty-sw.js @@ -0,0 +1 @@ +// Empty, just test registering. diff --git a/devtools/client/aboutdebugging/test/browser/resources/service-workers/fetch-sw.html b/devtools/client/aboutdebugging/test/browser/resources/service-workers/fetch-sw.html new file mode 100644 index 0000000000..a1bb218341 --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/resources/service-workers/fetch-sw.html @@ -0,0 +1,30 @@ + + + + + Service worker test + + + + + diff --git a/devtools/client/aboutdebugging/test/browser/resources/service-workers/fetch-sw.js b/devtools/client/aboutdebugging/test/browser/resources/service-workers/fetch-sw.js new file mode 100644 index 0000000000..de6ee1fb32 --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/resources/service-workers/fetch-sw.js @@ -0,0 +1,6 @@ +"use strict"; + +// Bug 1328293 +self.onfetch = function (event) { + // do nothing. +}; diff --git a/devtools/client/aboutdebugging/test/browser/resources/service-workers/push-sw.html b/devtools/client/aboutdebugging/test/browser/resources/service-workers/push-sw.html new file mode 100644 index 0000000000..bf5b0b0b0a --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/resources/service-workers/push-sw.html @@ -0,0 +1,61 @@ + + + + + Service worker push test + + + + + diff --git a/devtools/client/aboutdebugging/test/browser/resources/service-workers/push-sw.js b/devtools/client/aboutdebugging/test/browser/resources/service-workers/push-sw.js new file mode 100644 index 0000000000..1231697ddd --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/resources/service-workers/push-sw.js @@ -0,0 +1,35 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +/* eslint-env worker */ +/* global clients */ + +"use strict"; + +// Send a message to all controlled windows. +function postMessage(message) { + return clients.matchAll().then(function (clientlist) { + clientlist.forEach(function (client) { + client.postMessage(message); + }); + }); +} + +// Don't wait for the next page load to become the active service worker. +self.addEventListener("install", function (event) { + event.waitUntil(self.skipWaiting()); +}); + +// Claim control over the currently open test page when activating. +self.addEventListener("activate", function (event) { + event.waitUntil( + self.clients.claim().then(function () { + return postMessage("sw-claimed"); + }) + ); +}); + +// Forward all "push" events to the controlled window. +self.addEventListener("push", function (event) { + event.waitUntil(postMessage("sw-pushed")); +}); diff --git a/devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-linux.xpi b/devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-linux.xpi new file mode 100644 index 0000000000..56054c341c Binary files /dev/null and b/devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-linux.xpi differ diff --git a/devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-linux64.xpi b/devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-linux64.xpi new file mode 100644 index 0000000000..9cd737b017 Binary files /dev/null and b/devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-linux64.xpi differ diff --git a/devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-mac64.xpi b/devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-mac64.xpi new file mode 100644 index 0000000000..5af9bc963d Binary files /dev/null and b/devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-mac64.xpi differ diff --git a/devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-win32.xpi b/devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-win32.xpi new file mode 100644 index 0000000000..0c10c8502c Binary files /dev/null and b/devtools/client/aboutdebugging/test/browser/resources/test-adb-extension/adb-extension-win32.xpi differ diff --git a/devtools/client/aboutdebugging/test/browser/resources/test-temporary-extension/manifest.json b/devtools/client/aboutdebugging/test/browser/resources/test-temporary-extension/manifest.json new file mode 100644 index 0000000000..c62b2ddbd6 --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/resources/test-temporary-extension/manifest.json @@ -0,0 +1,13 @@ +{ + "manifest_version": 2, + "name": "test-temporary-extension", + "version": "1.0", + "browser_specific_settings": { + "gecko": { + "id": "test-temporary-extension@mozilla.org" + } + }, + "background": { + "scripts": ["script.js"] + } +} diff --git a/devtools/client/aboutdebugging/test/browser/resources/test-temporary-extension/script.js b/devtools/client/aboutdebugging/test/browser/resources/test-temporary-extension/script.js new file mode 100644 index 0000000000..02d5604c3a --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/resources/test-temporary-extension/script.js @@ -0,0 +1,8 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +/* eslint-env browser */ + +"use strict"; + +document.body.innerText = "Background Page Body Test Content"; -- cgit v1.2.3