VulpesOS/gaia/shared/test/unit/mocks/mock_icons_helper.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

38 lines
788 B
JavaScript
Executable file

'use strict';
/* exported MockIconsHelper */
var _defaultIconSize = 0;
var MockIconsHelper = {
set _defaultIconSize(size) {
_defaultIconSize = size;
},
getIcon: function(url, placeObject, siteObject) {
return new Promise(resolve => {
resolve();
});
},
getIconBlob: function(uri, iconTargetSize, placeObj = {}, siteObj = {}) {
return Promise.resolve({
blob: 'abc',
originalUrl: 'http://example.com/icons/16.png',
timestamp: Date.now()
});
},
setElementIcon: Promise.resolve.bind(Promise),
getBestIconFromWebManifest: function() {},
getBestIconFromMetaTags: function() {},
fetchIcon: function() {},
fetchIconBlob: function() {},
get defaultIconSize() {
return _defaultIconSize;
},
clear: function() {}
};