Bug 1874103 - Add missing method externalProtocolHandlerExists in mock protocol service. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D198247 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
1dd763ad94
Коммит
d872175d70
|
@ -101,6 +101,30 @@ const mockExternalProtocolService = {
|
|||
|
||||
_deferred: null,
|
||||
|
||||
externalProtocolHandlerExists() {
|
||||
return false;
|
||||
},
|
||||
|
||||
isExposedProtocol(protocolScheme) {
|
||||
return true;
|
||||
},
|
||||
|
||||
getProtocolHandlerInfo(protocolScheme) {
|
||||
throw Components.Exception(
|
||||
"getProtocolHandlerInfo not implemented",
|
||||
Cr.NS_ERROR_NOT_IMPLEMENTED
|
||||
);
|
||||
},
|
||||
|
||||
getProtocolHandlerInfoFromOS(protocolScheme, aFound) {
|
||||
throw Components.Exception(
|
||||
"getProtocolHandlerInfoFromOS not implemented",
|
||||
Cr.NS_ERROR_NOT_IMPLEMENTED
|
||||
);
|
||||
},
|
||||
|
||||
setProtocolHandlerDefaults(handlerInfo, osHandlerExists) {},
|
||||
|
||||
loadURI(aURI, aWindowContext) {
|
||||
if (this._deferred) {
|
||||
const deferred = this._deferred;
|
||||
|
@ -113,6 +137,17 @@ const mockExternalProtocolService = {
|
|||
}
|
||||
},
|
||||
|
||||
getApplicationDescription(scheme) {
|
||||
throw Components.Exception(
|
||||
"getApplicationDescription not implemented",
|
||||
Cr.NS_ERROR_NOT_IMPLEMENTED
|
||||
);
|
||||
},
|
||||
|
||||
isCurrentAppOSDefaultForProtocol(scheme) {
|
||||
return true;
|
||||
},
|
||||
|
||||
promiseEvent() {
|
||||
this._deferred = Promise.withResolvers();
|
||||
return this._deferred.promise;
|
||||
|
|
Загрузка…
Ссылка в новой задаче