VulpesOS/gaia/apps/communications/contacts/test/unit/mock_wakelock.js
OverSu b38dea0597 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.
2026-09-30 23:13:03 +02:00

20 lines
300 B
JavaScript
Executable file

'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;
};