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
19
gaia/apps/homescreen/test/unit/mocks/mock_apps.js
Executable file
19
gaia/apps/homescreen/test/unit/mocks/mock_apps.js
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
/* exported Apps */
|
||||
'use strict';
|
||||
|
||||
(function(exports) {
|
||||
|
||||
function Apps() {
|
||||
this.panel = document.getElementById('apps-panel');
|
||||
this.scrollable = document.querySelector('#apps-panel .scrollable');
|
||||
this.editMode = false;
|
||||
this.dialogs = [];
|
||||
}
|
||||
|
||||
Apps.prototype = {
|
||||
exitEditMode: function() {}
|
||||
};
|
||||
|
||||
exports.Apps = Apps;
|
||||
|
||||
})(window);
|
||||
42
gaia/apps/homescreen/test/unit/mocks/mock_appsmetadata.js
Executable file
42
gaia/apps/homescreen/test/unit/mocks/mock_appsmetadata.js
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
/* exported AppsMetadata */
|
||||
'use strict';
|
||||
|
||||
(function(exports) {
|
||||
|
||||
let _data = [];
|
||||
|
||||
function AppsMetadata() {
|
||||
}
|
||||
|
||||
AppsMetadata.prototype = {
|
||||
db: null,
|
||||
|
||||
init: () => {
|
||||
return Promise.resolve();
|
||||
},
|
||||
upgradeSchema: () => {},
|
||||
set: data=> {
|
||||
_data = data;
|
||||
return Promise.resolve();
|
||||
},
|
||||
remove: () => {
|
||||
return Promise.resolve();
|
||||
},
|
||||
getAll: () => {
|
||||
return Promise.resolve(_data);
|
||||
},
|
||||
|
||||
get _data() {
|
||||
return _data;
|
||||
},
|
||||
set _data(data) {
|
||||
_data = data;
|
||||
},
|
||||
mSetup: () => {
|
||||
_data = [];
|
||||
}
|
||||
};
|
||||
|
||||
exports.AppsMetadata = AppsMetadata;
|
||||
|
||||
})(window);
|
||||
58
gaia/apps/homescreen/test/unit/mocks/mock_datastore.js
Executable file
58
gaia/apps/homescreen/test/unit/mocks/mock_datastore.js
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
/* exported Datastore */
|
||||
'use strict';
|
||||
|
||||
(function(exports) {
|
||||
|
||||
let _name = '';
|
||||
|
||||
function Datastore(name) {
|
||||
_name = name;
|
||||
}
|
||||
|
||||
Datastore.prototype = {
|
||||
init: () => {
|
||||
return Promise.resolve();
|
||||
},
|
||||
upgradeSchema: () => {
|
||||
return Promise.resolve();
|
||||
},
|
||||
synchronise: () => {
|
||||
return Promise.resolve();
|
||||
},
|
||||
set: (data) => {
|
||||
return Promise.resolve();
|
||||
},
|
||||
remove: (id) => {
|
||||
return Promise.resolve();
|
||||
},
|
||||
clear: () => {
|
||||
return Promise.resolve();
|
||||
},
|
||||
updateRevision: () => {
|
||||
return Promise.resolve();
|
||||
},
|
||||
onChange: () => {},
|
||||
get: (id) => {
|
||||
return Promise.resolve();
|
||||
},
|
||||
getAll: () => {
|
||||
return Promise.resolve([]);
|
||||
},
|
||||
datastore: {
|
||||
put: (data, id) => Promise.resolve()
|
||||
},
|
||||
|
||||
get _name() {
|
||||
return _name;
|
||||
},
|
||||
set _name(name) {
|
||||
_name = name;
|
||||
},
|
||||
mSetup: () => {
|
||||
_name = [];
|
||||
}
|
||||
};
|
||||
|
||||
exports.Datastore = Datastore;
|
||||
|
||||
})(window);
|
||||
26
gaia/apps/homescreen/test/unit/mocks/mock_localStorage.js
Executable file
26
gaia/apps/homescreen/test/unit/mocks/mock_localStorage.js
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
/* exported mockLocalStorage */
|
||||
'use strict';
|
||||
|
||||
var _rawContent = {};
|
||||
|
||||
var mockLocalStorage = {
|
||||
setItem: (key, val) => {
|
||||
_rawContent[key] = val;
|
||||
},
|
||||
getItem: key => {
|
||||
return _rawContent[key];
|
||||
},
|
||||
removeItem: key => {
|
||||
delete _rawContent[key];
|
||||
},
|
||||
|
||||
set mRawContent(val) {
|
||||
_rawContent = val;
|
||||
},
|
||||
get mRawContent() {
|
||||
return _rawContent;
|
||||
},
|
||||
mSetup: () => {
|
||||
_rawContent = {};
|
||||
}
|
||||
};
|
||||
19
gaia/apps/homescreen/test/unit/mocks/mock_pages.js
Executable file
19
gaia/apps/homescreen/test/unit/mocks/mock_pages.js
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
/* exported Pages */
|
||||
'use strict';
|
||||
|
||||
(function(exports) {
|
||||
|
||||
function Pages() {
|
||||
this.panel = document.getElementById('pages-panel');
|
||||
this.scrollable = document.querySelector('#pages-panel .scrollable');
|
||||
this.editMode = false;
|
||||
this.dialogs = [];
|
||||
}
|
||||
|
||||
Pages.prototype = {
|
||||
exitEditMode: function() {}
|
||||
};
|
||||
|
||||
exports.Pages = Pages;
|
||||
|
||||
})(window);
|
||||
17
gaia/apps/homescreen/test/unit/mocks/mock_settings.js
Executable file
17
gaia/apps/homescreen/test/unit/mocks/mock_settings.js
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
/* exported Settings */
|
||||
'use strict';
|
||||
|
||||
(function(exports) {
|
||||
|
||||
function Settings() {
|
||||
this.small = false;
|
||||
this.scrollSnapping = false;
|
||||
this.firstRun = false;
|
||||
}
|
||||
|
||||
Settings.prototype = {
|
||||
};
|
||||
|
||||
exports.Settings = Settings;
|
||||
|
||||
})(window);
|
||||
Loading…
Reference in a new issue