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
17
gaia/apps/communications/test/unit/.jshintrc
Executable file
17
gaia/apps/communications/test/unit/.jshintrc
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"extends": "../../../../.jshintrc",
|
||||
"predef": [
|
||||
"assert",
|
||||
"suite",
|
||||
"test",
|
||||
"setup",
|
||||
"teardown",
|
||||
"suiteSetup",
|
||||
"suiteTeardown",
|
||||
"require",
|
||||
"requireApp",
|
||||
"sinon",
|
||||
"mocha",
|
||||
"loadBodyHTML"
|
||||
]
|
||||
}
|
||||
BIN
gaia/apps/communications/test/unit/media/gaia.png
Executable file
BIN
gaia/apps/communications/test/unit/media/gaia.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
BIN
gaia/apps/communications/test/unit/media/sadpanda.png
Executable file
BIN
gaia/apps/communications/test/unit/media/sadpanda.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
gaia/apps/communications/test/unit/media/tiny-gaia.png
Executable file
BIN
gaia/apps/communications/test/unit/media/tiny-gaia.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
58
gaia/apps/communications/test/unit/mocks_helper.js
Executable file
58
gaia/apps/communications/test/unit/mocks_helper.js
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
'use strict';
|
||||
|
||||
var MocksHelper = function(mocks) {
|
||||
this.mocks = mocks;
|
||||
this.realWindowObjects = {};
|
||||
};
|
||||
|
||||
MocksHelper.prototype = {
|
||||
|
||||
init: function mh_init() {
|
||||
this.mocks.forEach(function(objName) {
|
||||
if (! window[objName]) {
|
||||
window[objName] = null;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
setup: function mh_setup() {
|
||||
this._forEachMock('mSetup');
|
||||
},
|
||||
|
||||
suiteSetup: function mh_suiteSetup() {
|
||||
this.mocks.forEach(function(objName) {
|
||||
var mockName = 'Mock' + objName;
|
||||
if (!window[mockName]) {
|
||||
var errMsg = 'Mock ' + mockName + ' has not been loaded into the test';
|
||||
throw new Error(errMsg);
|
||||
}
|
||||
|
||||
this.realWindowObjects[objName] = window[objName];
|
||||
window[objName] = window[mockName];
|
||||
}, this);
|
||||
this._forEachMock('mSuiteSetup');
|
||||
},
|
||||
|
||||
suiteTeardown: function mh_suiteTeardown() {
|
||||
this._forEachMock('mSuiteTeardown');
|
||||
this.mocks.forEach(function(objName) {
|
||||
window[objName] = this.realWindowObjects[objName];
|
||||
}, this);
|
||||
},
|
||||
|
||||
teardown: function mh_teardown() {
|
||||
this._forEachMock('mTeardown');
|
||||
},
|
||||
|
||||
_forEachMock: function mh_forEachMock(funcName) {
|
||||
this.mocks.forEach(function(objName) {
|
||||
var mockName = 'Mock' + objName;
|
||||
var mock = window[mockName];
|
||||
|
||||
if (mock[funcName]) {
|
||||
mock[funcName]();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
6
gaia/apps/communications/test/unit/setup.js
Executable file
6
gaia/apps/communications/test/unit/setup.js
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
require('/shared/test/unit/mocks/elements/custom_elements_helper.js');
|
||||
require('/shared/test/unit/mocks/mocks_helper.js');
|
||||
require('/shared/test/unit/load_body_html_helper.js');
|
||||
|
||||
Loading…
Reference in a new issue