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
20
gaia/apps/communications/contacts/test/unit/mock_wakelock.js
Executable file
20
gaia/apps/communications/contacts/test/unit/mock_wakelock.js
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
'use strict';
|
||||
/* exported MockWakeLock */
|
||||
|
||||
var MyLocks = {};
|
||||
|
||||
var MockWakeLock = function(type) {
|
||||
if (MyLocks[type] === true) {
|
||||
throw new Error('Already locked');
|
||||
}
|
||||
|
||||
MyLocks[type] = true;
|
||||
|
||||
var lock = {
|
||||
'unlock': function() {
|
||||
MyLocks[type] = false;
|
||||
}
|
||||
};
|
||||
|
||||
return lock;
|
||||
};
|
||||
Loading…
Reference in a new issue