I think I have this code fixed so unit tests pass for me. Here's what I did:

1. This function is using wrong promise, so I updated it to take a param:

```
    function _closeLiveBrowser(deferred) {
        NativeApp.closeLiveBrowser()
            .done(function () {
                deferred.resolve();
            })
            .fail(function (err) {
                // Report error?
                _setStatus(STATUS_ERROR);
                deferred.reject("CLOSE_LIVE_BROWSER");
            });
    }
```