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/shared/test/unit/mocks/mock_mediadb.js
Executable file
29
gaia/shared/test/unit/mocks/mock_mediadb.js
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
'use strict';
|
||||
/* exported MockMediaDB */
|
||||
|
||||
var MockMediaDB = (function() {
|
||||
|
||||
function MockMediaDB(blob) {
|
||||
this.blob = blob;
|
||||
|
||||
this.OPENING = 'opening'; // this is initializing itself
|
||||
this.UPGRADING = 'upgrading'; // this is upgrading database
|
||||
this.READY = 'ready'; // this is available and ready for use
|
||||
this.NOCARD = 'nocard'; // Unavailable because there is no sd card
|
||||
this.UNMOUNTED = 'unmounted'; // Unavailable because card unmounted
|
||||
this.CLOSED = 'closed'; // Unavailable because closed() was called
|
||||
}
|
||||
|
||||
MockMediaDB.prototype = {
|
||||
getFile: function getFile(filename, callback) {
|
||||
callback(this.blob);
|
||||
},
|
||||
|
||||
updateMetadata: sinon.spy()
|
||||
};
|
||||
|
||||
sinon.spy(MockMediaDB.prototype, 'getFile');
|
||||
|
||||
return MockMediaDB;
|
||||
|
||||
}());
|
||||
Loading…
Reference in a new issue