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
61
gaia/shared/test/unit/mocks/smart-screen/mock_channel_manager.js
Executable file
61
gaia/shared/test/unit/mocks/smart-screen/mock_channel_manager.js
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
(function(exports) {
|
||||
'use strict';
|
||||
|
||||
function MockChannelManager() {
|
||||
var handler = {};
|
||||
|
||||
this.isReady = true;
|
||||
this.playingState = {};
|
||||
|
||||
this.getTuner = function() {
|
||||
return {
|
||||
tuner: {
|
||||
stream: 'stream'
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
this.getSource = function() {
|
||||
return {
|
||||
channels: []
|
||||
};
|
||||
};
|
||||
|
||||
this.getChannel = function() {};
|
||||
|
||||
this.scanTuners = function() {};
|
||||
|
||||
this.scanSources = function() {};
|
||||
|
||||
this.scanChannels = function() {};
|
||||
|
||||
this.updatePinButton = function() {};
|
||||
|
||||
this.switchChannel = function() {};
|
||||
|
||||
this.setPlayingSource = function(callback) {
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
this.fetchSettingFromHash = function() {
|
||||
};
|
||||
|
||||
this.on = function(evt, fn) {
|
||||
if (!handler[evt]) {
|
||||
handler[evt] = [];
|
||||
}
|
||||
handler[evt].push(fn);
|
||||
};
|
||||
|
||||
this.mTrigger = function(evt) {
|
||||
handler[evt].forEach(function(fn) {
|
||||
fn();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
exports.MockChannelManager = MockChannelManager;
|
||||
}(window));
|
||||
|
||||
10
gaia/shared/test/unit/mocks/smart-screen/mock_clock.js
Executable file
10
gaia/shared/test/unit/mocks/smart-screen/mock_clock.js
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
'use strict';
|
||||
(function(exports) {
|
||||
|
||||
function MockClock() {
|
||||
this.start = function() {};
|
||||
this.stop = function() {};
|
||||
}
|
||||
|
||||
exports.MockClock = MockClock;
|
||||
})(window);
|
||||
9
gaia/shared/test/unit/mocks/smart-screen/mock_f_t_e_wizard.js
Executable file
9
gaia/shared/test/unit/mocks/smart-screen/mock_f_t_e_wizard.js
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
/* exported MockFTEWizard */
|
||||
|
||||
var MockFTEWizard = function() {};
|
||||
|
||||
MockFTEWizard.prototype = {
|
||||
running: false
|
||||
};
|
||||
25
gaia/shared/test/unit/mocks/smart-screen/mock_key_navigation_adapter.js
Executable file
25
gaia/shared/test/unit/mocks/smart-screen/mock_key_navigation_adapter.js
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
(function(exports) {
|
||||
'use strict';
|
||||
|
||||
var handler = {};
|
||||
|
||||
var MockKeyNavigationAdapter = function() {
|
||||
this.init = function() {
|
||||
};
|
||||
|
||||
this.on = function(evt, fn) {
|
||||
if (!handler[evt]) {
|
||||
handler[evt] = [];
|
||||
}
|
||||
handler[evt].push(fn);
|
||||
};
|
||||
|
||||
this.mTrigger = function(evt) {
|
||||
handler[evt].forEach(function(fn) {
|
||||
fn();
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
exports.MockKeyNavigationAdapter = MockKeyNavigationAdapter;
|
||||
}(window));
|
||||
22
gaia/shared/test/unit/mocks/smart-screen/mock_pin_card.js
Executable file
22
gaia/shared/test/unit/mocks/smart-screen/mock_pin_card.js
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
(function(exports) {
|
||||
'use strict';
|
||||
|
||||
function MockPinCard() {
|
||||
var handler = {};
|
||||
this.pinnedChannels = {};
|
||||
this.on = function(evt, fn) {
|
||||
if (!handler[evt]) {
|
||||
handler[evt] = [];
|
||||
}
|
||||
handler[evt].push(fn);
|
||||
};
|
||||
|
||||
this.mTrigger = function(evt) {
|
||||
handler[evt].forEach(function(fn) {
|
||||
fn();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
exports.MockPinCard = MockPinCard;
|
||||
}(window));
|
||||
19
gaia/shared/test/unit/mocks/smart-screen/mock_simple_key_navigation.js
Executable file
19
gaia/shared/test/unit/mocks/smart-screen/mock_simple_key_navigation.js
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
(function(exports) {
|
||||
'use strict';
|
||||
|
||||
function MockSimpleKeyNavigation() {
|
||||
this.start = function() {
|
||||
|
||||
};
|
||||
|
||||
this.stop = function() {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
MockSimpleKeyNavigation.DIRECTION = {
|
||||
HORIZONTAL: 1
|
||||
};
|
||||
|
||||
exports.MockSimpleKeyNavigation = MockSimpleKeyNavigation;
|
||||
}(window));
|
||||
20
gaia/shared/test/unit/mocks/smart-screen/mock_spatial_navigator.js
Executable file
20
gaia/shared/test/unit/mocks/smart-screen/mock_spatial_navigator.js
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
(function(exports) {
|
||||
'use strict';
|
||||
|
||||
var MockSpatialNavigator = function MockSpatialNavigator() {};
|
||||
|
||||
MockSpatialNavigator.prototype = {
|
||||
on: function() {},
|
||||
add: function() {},
|
||||
remove: function() {},
|
||||
init: function() {},
|
||||
focus: function() {},
|
||||
getFocusedElement: function() {
|
||||
return this.m_focusedElement;
|
||||
},
|
||||
|
||||
m_focusedElement: null
|
||||
};
|
||||
|
||||
exports.MockSpatialNavigator = MockSpatialNavigator;
|
||||
}(window));
|
||||
8
gaia/shared/test/unit/mocks/smart-screen/mock_tv_channel.js
Executable file
8
gaia/shared/test/unit/mocks/smart-screen/mock_tv_channel.js
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
(function(exports) {
|
||||
'use strict';
|
||||
|
||||
var MockTVChannel = function() {
|
||||
};
|
||||
|
||||
exports.MockTVChannel = MockTVChannel;
|
||||
}(window));
|
||||
26
gaia/shared/test/unit/mocks/smart-screen/mock_tv_manager.js
Executable file
26
gaia/shared/test/unit/mocks/smart-screen/mock_tv_manager.js
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
/* global MockTVTuner */
|
||||
|
||||
(function(exports) {
|
||||
'use strict';
|
||||
|
||||
function MockTVManager() {
|
||||
this.tuners = [];
|
||||
var tuner = new MockTVTuner();
|
||||
tuner.id = '0';
|
||||
this.tuners.push(tuner);
|
||||
|
||||
tuner = new MockTVTuner();
|
||||
tuner.id = '1';
|
||||
this.tuners.push(tuner);
|
||||
|
||||
this.getTuners = function() {
|
||||
return {
|
||||
then: function(callback) {
|
||||
callback(this.tuners);
|
||||
}.bind(this)
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
exports.MockTVManager = MockTVManager;
|
||||
}(window));
|
||||
61
gaia/shared/test/unit/mocks/smart-screen/mock_tv_source.js
Executable file
61
gaia/shared/test/unit/mocks/smart-screen/mock_tv_source.js
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
/* global MockTVChannel */
|
||||
|
||||
(function(exports) {
|
||||
'use strict';
|
||||
|
||||
function MockTVSource() {
|
||||
|
||||
this.channels = [];
|
||||
this.currentChannel = null;
|
||||
|
||||
var channel = new MockTVChannel();
|
||||
channel.name = 'name0';
|
||||
channel.number = '0';
|
||||
this.channels.push(channel);
|
||||
|
||||
channel = new MockTVChannel();
|
||||
channel.name = 'name1';
|
||||
channel.number = '1';
|
||||
this.channels.push(channel);
|
||||
|
||||
channel = new MockTVChannel();
|
||||
channel.name = 'name2';
|
||||
channel.number = '2';
|
||||
this.channels.push(channel);
|
||||
|
||||
channel = new MockTVChannel();
|
||||
channel.name = 'name3';
|
||||
channel.number = '3';
|
||||
this.channels.push(channel);
|
||||
|
||||
channel = new MockTVChannel();
|
||||
channel.name = 'name4';
|
||||
channel.number = '4';
|
||||
this.channels.push(channel);
|
||||
|
||||
this.getChannels = function() {
|
||||
var self = this;
|
||||
var promise = {
|
||||
then: function(callback) {
|
||||
callback(self.channels);
|
||||
return promise;
|
||||
},
|
||||
catch: function() {
|
||||
return promise;
|
||||
}
|
||||
};
|
||||
return promise;
|
||||
};
|
||||
|
||||
this.setCurrentChannel = function(number) {
|
||||
this.currentChannel = number;
|
||||
return {
|
||||
then: function(callback) {
|
||||
callback();
|
||||
}.bind(this)
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
exports.MockTVSource = MockTVSource;
|
||||
}(window));
|
||||
42
gaia/shared/test/unit/mocks/smart-screen/mock_tv_tuner.js
Executable file
42
gaia/shared/test/unit/mocks/smart-screen/mock_tv_tuner.js
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
/* global MockTVSource */
|
||||
|
||||
(function(exports) {
|
||||
'use strict';
|
||||
|
||||
function MockTVTuner() {
|
||||
this.stream = 'http://mystream.moz';
|
||||
this.currentSource = null;
|
||||
this.sources = [];
|
||||
|
||||
var source = new MockTVSource();
|
||||
source.type = 'dvb-0';
|
||||
this.sources.push(source);
|
||||
|
||||
source = new MockTVSource();
|
||||
source.type = 'dvb-1';
|
||||
this.sources.push(source);
|
||||
|
||||
source = new MockTVSource();
|
||||
source.type = 'dvb-2';
|
||||
this.sources.push(source);
|
||||
|
||||
this.getSources = function() {
|
||||
return {
|
||||
then: function(callback) {
|
||||
callback(this.sources);
|
||||
}.bind(this)
|
||||
};
|
||||
};
|
||||
|
||||
this.setCurrentSource = function(type) {
|
||||
this.currentSource = this.sources[type];
|
||||
return {
|
||||
then: function(callback) {
|
||||
callback();
|
||||
}.bind(this)
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
exports.MockTVTuner = MockTVTuner;
|
||||
}(window));
|
||||
Loading…
Reference in a new issue