mozilla/fireplace — pull request #823 by diox (2014-11-25 13:13:47+00:00)
Title: [WIP] Check for Marketplace update, offer to download it if one is available (bug 1097430)

WIP, TODO:
* [ ] Merge zamboni side for the packaged app: mozilla/zamboni#2740
* [ ] Implement `applyUpdate()` in direct installer
* [ ] Style the banner and its buttons following mockups
* [ ] Map banner buttons, and change the content when the user chooses "download"
* [ ] Unit/Integration Tests

To test locally, you need to emulate the fact that you've got a Marketplace package installed. It can be done on Firefox Desktop while serving fireplace with gulp:
- Build a dummy packaged app, put it in `src/app.zip`
- Build a dummy manifest referencing that app, put it in `src/packaged.webapp`
- Install the app from the origin you are serving fireplace in the console. `navigator.mozApps.installPackage('http://localhost:8675/packaged.webapp')` should do it. Verify with `navigator.getInstalled()` that it worked, the package and manifest need to be valid, the result of `installPackage()` should give you hints if it failed.
- Reload Marketplace at the same origin. It should check for update in the background, but not find any yet.
- Bump version in manifest, reload Marketplace, now it should offer you to upgrade
- To be continued with download.