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
29
gaia/apps/operatorvariant/test/unit/resources_test.js
Executable file
29
gaia/apps/operatorvariant/test/unit/resources_test.js
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
/* global requireApp, suite, test, assert, Resources */
|
||||
|
||||
'use strict';
|
||||
|
||||
requireApp('operatorvariant/js/resources.js');
|
||||
|
||||
var resourcePath = '/test/unit/resources/wallpaper.jpg';
|
||||
|
||||
suite(' Resources > ', function() {
|
||||
test(' load properly ', function(done) {
|
||||
var onerror = function errorHandler() {
|
||||
assert.ok(false, 'Resource not loaded properly');
|
||||
done();
|
||||
};
|
||||
Resources.load(resourcePath, 'blob', function() {
|
||||
done();
|
||||
}, onerror);
|
||||
});
|
||||
|
||||
test(' error while loading ', function(done) {
|
||||
var onerror = function errorHandler() {
|
||||
done();
|
||||
};
|
||||
Resources.load('/wrong/path/file.jpg', 'blob', function() {
|
||||
assert.ok(false, 'Resource loaded when it should not.');
|
||||
done();
|
||||
}, onerror);
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue