diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /testing/specialpowers | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/specialpowers')
4 files changed, 17 insertions, 45 deletions
diff --git a/testing/specialpowers/content/MockFilePicker.sys.mjs b/testing/specialpowers/content/MockFilePicker.sys.mjs index ee2f11af75..0ce8c25d4e 100644 --- a/testing/specialpowers/content/MockFilePicker.sys.mjs +++ b/testing/specialpowers/content/MockFilePicker.sys.mjs @@ -48,11 +48,11 @@ export var MockFilePicker = { window: null, pendingPromises: [], - init(window) { - this.window = window; + init(browsingContext) { + this.window = browsingContext.window; this.reset(); - this.factory = newFactory(window); + this.factory = newFactory(this.window); if (!registrar.isCIDRegistered(newClassID)) { oldClassID = registrar.contractIDToCID(CONTRACT_ID); registrar.registerFactory(newClassID, "", CONTRACT_ID, this.factory); diff --git a/testing/specialpowers/content/SpecialPowersChild.sys.mjs b/testing/specialpowers/content/SpecialPowersChild.sys.mjs index 20afe12d39..ed972e4315 100644 --- a/testing/specialpowers/content/SpecialPowersChild.sys.mjs +++ b/testing/specialpowers/content/SpecialPowersChild.sys.mjs @@ -69,7 +69,7 @@ function SPConsoleListener(callback, contentWindow) { SPConsoleListener.prototype = { // Overload the observe method for both nsIConsoleListener and nsIObserver. // The topic will be null for nsIConsoleListener. - observe(msg, topic) { + observe(msg) { let m = { message: msg.message, errorMessage: null, @@ -158,12 +158,11 @@ export class SpecialPowersChild extends JSWindowActorChild { this.nondeterministicGetWeakMapKeys, this.snapshotWindowWithOptions, this.snapshotWindow, - this.snapshotRect, - this.getDOMRequestService + this.snapshotRect ); } - observe(aSubject, aTopic, aData) { + observe() { // Ignore the "{chrome/content}-document-global-created" event. It // is only observed to force creation of the actor. } @@ -1090,7 +1089,7 @@ export class SpecialPowersChild extends JSWindowActorChild { } return val; } - _getPref(prefName, prefType, { defaultValue }) { + _getPref(prefName, prefType) { switch (prefType) { case "BOOL": return Services.prefs.getBoolPref(prefName); @@ -1133,7 +1132,7 @@ export class SpecialPowersChild extends JSWindowActorChild { removeAutoCompletePopupEventListener(window, eventname, listener) { this._getAutoCompletePopup(window).removeEventListener(eventname, listener); } - getFormFillController(window) { + getFormFillController() { return Cc["@mozilla.org/satchel/form-fill-controller;1"].getService( Ci.nsIFormFillController ); @@ -1451,13 +1450,6 @@ export class SpecialPowersChild extends JSWindowActorChild { return this.getIntPref("fission.webContentIsolationStrategy"); } - addSystemEventListener(target, type, listener, useCapture) { - Services.els.addSystemEventListener(target, type, listener, useCapture); - } - removeSystemEventListener(target, type, listener, useCapture) { - Services.els.removeSystemEventListener(target, type, listener, useCapture); - } - // helper method to check if the event is consumed by either default group's // event listener or system group's event listener. defaultPreventedInAnyGroup(event) { @@ -1466,26 +1458,6 @@ export class SpecialPowersChild extends JSWindowActorChild { return event.defaultPrevented; } - getDOMRequestService() { - var serv = Services.DOMRequest; - var res = {}; - var props = [ - "createRequest", - "createCursor", - "fireError", - "fireSuccess", - "fireDone", - "fireDetailedError", - ]; - for (var i in props) { - let prop = props[i]; - res[prop] = function () { - return serv[prop].apply(serv, arguments); - }; - } - return Cu.cloneInto(res, this.contentWindow, { cloneFunctions: true }); - } - addCategoryEntry(category, entry, value, persists, replace) { Services.catMan.addCategoryEntry(category, entry, value, persists, replace); } @@ -1948,11 +1920,11 @@ export class SpecialPowersChild extends JSWindowActorChild { return this.sendQuery("SPRemoveServiceWorkerDataForExampleDomain", {}); } - cleanUpSTSData(origin, flags) { + cleanUpSTSData(origin) { return this.sendQuery("SPCleanUpSTSData", { origin }); } - async requestDumpCoverageCounters(cb) { + async requestDumpCoverageCounters() { // We want to avoid a roundtrip between child and parent. if (!lazy.PerTestCoverageUtils.enabled) { return; @@ -1961,7 +1933,7 @@ export class SpecialPowersChild extends JSWindowActorChild { await this.sendQuery("SPRequestDumpCoverageCounters", {}); } - async requestResetCoverageCounters(cb) { + async requestResetCoverageCounters() { // We want to avoid a roundtrip between child and parent. if (!lazy.PerTestCoverageUtils.enabled) { return; @@ -2296,7 +2268,7 @@ SpecialPowersChild.prototype._proxiedObservers = { ); }, - "specialpowers-service-worker-shutdown": function (aMessage) { + "specialpowers-service-worker-shutdown": function () { Services.obs.notifyObservers(null, "specialpowers-service-worker-shutdown"); }, diff --git a/testing/specialpowers/content/SpecialPowersParent.sys.mjs b/testing/specialpowers/content/SpecialPowersParent.sys.mjs index 3ed660d71c..e0ce35bb67 100644 --- a/testing/specialpowers/content/SpecialPowersParent.sys.mjs +++ b/testing/specialpowers/content/SpecialPowersParent.sys.mjs @@ -247,7 +247,7 @@ export class SpecialPowersParent extends JSWindowActorParent { swm.removeListener(this._serviceWorkerListener); } - observe(aSubject, aTopic, aData) { + observe(aSubject, aTopic) { function addDumpIDToMessage(propertyName) { try { var id = aSubject.getPropertyAsAString(propertyName); diff --git a/testing/specialpowers/content/WrapPrivileged.sys.mjs b/testing/specialpowers/content/WrapPrivileged.sys.mjs index 5fe67a94e2..1db8a7d9f7 100644 --- a/testing/specialpowers/content/WrapPrivileged.sys.mjs +++ b/testing/specialpowers/content/WrapPrivileged.sys.mjs @@ -257,7 +257,7 @@ let SpecialPowersHandler = { return Reflect.has(this.wrapped.get(target).obj, prop); }, - get(target, prop, receiver) { + get(target, prop) { let global = Cu.getGlobalForObject(this); return wrapExceptions(global, () => { let obj = waiveXraysIfAppropriate(this.wrapped.get(target).obj, prop); @@ -266,7 +266,7 @@ let SpecialPowersHandler = { }); }, - set(target, prop, val, receiver) { + set(target, prop, val) { return wrapExceptions(Cu.getGlobalForObject(this), () => { let obj = waiveXraysIfAppropriate(this.wrapped.get(target).obj, prop); return Reflect.set(obj, prop, unwrapIfWrapped(val)); @@ -279,7 +279,7 @@ let SpecialPowersHandler = { }); }, - defineProperty(target, prop, descriptor) { + defineProperty() { throw new Error( "Can't call defineProperty on SpecialPowers wrapped object" ); @@ -332,7 +332,7 @@ let SpecialPowersHandler = { return Cu.cloneInto(props, Cu.getGlobalForObject(this)); }, - preventExtensions(target) { + preventExtensions() { throw new Error( "Can't call preventExtensions on SpecialPowers wrapped object" ); |