A javascript mock for Cordova.js file