Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
38 lines
788 B
JavaScript
Executable file
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() {}
|
|
};
|