Fix issue #2
Add tests for cordova.