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
40
gaia/apps/system/test/unit/mock_base_icon.js
Executable file
40
gaia/apps/system/test/unit/mock_base_icon.js
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
'use strict';
|
||||
|
||||
(function(exports) {
|
||||
var MockBaseIcon = function(name) {
|
||||
if (name) {
|
||||
this.name = name;
|
||||
}
|
||||
this.element = document.createElement('div');
|
||||
var pureName = this.name.replace(/Icon$/, '');
|
||||
this.dashPureName = this.camelToDash(pureName);
|
||||
};
|
||||
MockBaseIcon.prototype = {
|
||||
element: null,
|
||||
name: 'MockBaseIcon',
|
||||
show: function() {},
|
||||
hide: function() {},
|
||||
isVisible: function() {},
|
||||
setOrder: function() {}
|
||||
};
|
||||
|
||||
MockBaseIcon.prototype.camelToDash = function(strings) {
|
||||
var i = 0;
|
||||
var ch = '';
|
||||
while (i <= strings.length) {
|
||||
var character = strings.charAt(i);
|
||||
if (character !== character.toLowerCase()) {
|
||||
if (ch === '') {
|
||||
ch += character.toLowerCase();
|
||||
} else {
|
||||
ch += '-' + character.toLowerCase();
|
||||
}
|
||||
} else {
|
||||
ch += character;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return ch;
|
||||
};
|
||||
exports.MockBaseIcon = MockBaseIcon;
|
||||
}(window));
|
||||
Loading…
Reference in a new issue