VulpesOS/gaia/apps/system/test/unit/mock_bluetooth_transfer.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

38 lines
890 B
JavaScript
Executable file

'use strict';
/* exported MockBluetoothTransfer */
/* globals MockDOMRequest */
(function(exports) {
var MockBluetoothTransfer = {
mNfcHandoverManager: null,
sendFileQueueEmpty: true,
fileTransferInProgress: false,
sendFileViaHandover: function(mac, blob) {
var self = this;
var req = new MockDOMRequest();
var details = {received: false,
success: true,
viaHandover: true};
req.onsuccess = function() {
self.mNfcHandoverManager.transferComplete({
detail: details
});
};
return req;
},
get isSendFileQueueEmpty() {
return MockBluetoothTransfer.sendFileQueueEmpty;
},
get isFileTransferInProgress() {
return MockBluetoothTransfer.fileTransferInProgress;
}
};
exports.MockBluetoothTransfer = MockBluetoothTransfer;
})(window);