VulpesOS/gaia/shared/test/unit/mocks/mock_bookmarks_database.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

32 lines
730 B
JavaScript
Executable file

'use strict';
(function(exports) {
exports.MockBookmarksDatabase = {
get: function() {},
_callbacks: {},
getAll: function() {},
getRevisionId: function() {},
addEventListener: function(type, cb) {
this._callbacks[type] = cb;
},
removeEventListener: function(type) {
this._callbacks[type] = null;
},
add: function(data) {
if (this._callbacks.added) {
this._callbacks.added(data);
}
},
put: function(data) {
if (this._callbacks.added) {
this._callbacks.added(data);
}
},
remove: function(id) {
if (this._callbacks.removed) {
this._callbacks.removed(id);
}
},
clear: function() {}
};
}(window));