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
46
gaia/apps/system/test/unit/logo_loader_test.js
Executable file
46
gaia/apps/system/test/unit/logo_loader_test.js
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
'use strict';
|
||||
/* global LogoLoader, MockPng, MockVideo */
|
||||
|
||||
requireApp('system/test/unit/mock_media_files.js');
|
||||
requireApp('system/js/logo_loader.js');
|
||||
|
||||
suite('logoLoader', function() {
|
||||
|
||||
var image;
|
||||
var video;
|
||||
var subject;
|
||||
const invalidURL = 'INVALID_URL';
|
||||
|
||||
setup(function() {
|
||||
image = MockPng;
|
||||
video = MockVideo;
|
||||
});
|
||||
|
||||
test('Find image logo', function(done) {
|
||||
subject = new LogoLoader({image: image, video: invalidURL});
|
||||
subject.onload = function() {
|
||||
assert.equal(subject.element.tagName, 'IMG');
|
||||
done();
|
||||
};
|
||||
});
|
||||
|
||||
test('Find movie logo', function(done) {
|
||||
subject = new LogoLoader({image: 'INVALIDURL', video: video});
|
||||
subject.onload = function() {
|
||||
assert.equal(subject.element.tagName, 'VIDEO');
|
||||
done();
|
||||
};
|
||||
});
|
||||
|
||||
test('Logo not found', function(done) {
|
||||
subject = new LogoLoader({image: invalidURL, video: invalidURL});
|
||||
subject.onnotfound = function() {
|
||||
assert.isFalse(subject.found);
|
||||
assert.isTrue(subject.ready);
|
||||
done();
|
||||
};
|
||||
});
|
||||
|
||||
teardown(function() {
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue