A simple harness for Firefox OS features in a packaged app, based on the mortar-app-stub.
- Clone or download a zip of the repo.
- Download the Firefox OS Simulator, an addon for the Firefox browser, from https://addons.mozilla.org/en-US/firefox/addon/firefox-os-simulator/
- Launch the Simulator from the (OS X) Tools > Web Developer > Firefox OS Simulator menu.
- Click Add Directory, browse to the manifest.webapp, and choose open.
There are currently four tests: two test loading external data via xhr, and two via jsonp.
It appears that jsonp is blocked by the default content security policy (CSP) for packaged apps. XHR requests may require CORS, but I haven't found documentation on this, and it seems like CORS should be unnecessary for a packaged app.
Documentation for manifests says that you should use network-http and network-tcp but the source code only has systemXHR. For an example see: https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/manifest.webapp