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.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
60
gaia/apps/verticalhome/test/unit/mock_app.js
Executable file
60
gaia/apps/verticalhome/test/unit/mock_app.js
Executable file
|
|
@ -0,0 +1,60 @@
|
|||
'use strict';
|
||||
|
||||
function MockApp() {
|
||||
MockApp.initialized = false;
|
||||
MockApp.mIcons = {};
|
||||
MockApp.mItems = [];
|
||||
}
|
||||
|
||||
MockApp.prototype = {
|
||||
HIDDEN_ROLES: [
|
||||
'system', 'keyboard', 'homescreen', 'search', 'addon', 'langpack'
|
||||
],
|
||||
init: function() {
|
||||
MockApp.initialized = true;
|
||||
},
|
||||
mGetInitialized: function () {
|
||||
return MockApp.initialized;
|
||||
},
|
||||
itemStore: {
|
||||
save: function() {},
|
||||
deferredSave: function() {}
|
||||
},
|
||||
grid: {
|
||||
add: function(detail) {
|
||||
if (detail) {
|
||||
MockApp.mItems.push(detail);
|
||||
}
|
||||
},
|
||||
appendItemToExpandedGroup: function(detail) {
|
||||
if (detail) {
|
||||
MockApp.mItems.push(detail);
|
||||
}
|
||||
},
|
||||
removeIconByIdentifier: function(identifier) {
|
||||
delete MockApp.mIcons[identifier];
|
||||
},
|
||||
removeItemByIndex: function(idx) {
|
||||
MockApp.mItems.splice(idx, 1);
|
||||
},
|
||||
getIcons: function() {
|
||||
return MockApp.mIcons;
|
||||
},
|
||||
getItems: function() {
|
||||
return MockApp.mItems;
|
||||
},
|
||||
render: function() {},
|
||||
|
||||
_grid: {
|
||||
dragdrop: {
|
||||
inEditMode: false
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
MockApp.mTeardown = function mp_mTeardown() {
|
||||
delete MockApp.initialized;
|
||||
MockApp.mIcons = {};
|
||||
MockApp.mItems = [];
|
||||
};
|
||||
Loading…
Reference in a new issue