Bug 1010387 - [appmgr v2] write tests and make good use of promises & tasks. r=janx r=jryans

---
 browser/devtools/app-manager/app-validator.js    |   2 +-
 browser/devtools/webide/content/newapp.js        |  30 +++-
 browser/devtools/webide/content/webide.js        | 180 +++++++++++++++--------
 browser/devtools/webide/modules/app-manager.js   |  27 +++-
 browser/devtools/webide/moz.build                |   1 +
 browser/devtools/webide/test/app.zip             | Bin 0 -> 480 bytes
 browser/devtools/webide/test/app/index.html      |   6 +
 browser/devtools/webide/test/app/manifest.webapp |   5 +
 browser/devtools/webide/test/chrome.ini          |  13 ++
 browser/devtools/webide/test/head.js             |  81 ++++++++++
 browser/devtools/webide/test/hosted_app.manifest |   3 +
 browser/devtools/webide/test/templates.json      |  14 ++
 browser/devtools/webide/test/test_basic.html     |  39 +++++
 browser/devtools/webide/test/test_import.html    |  65 ++++++++
 browser/devtools/webide/test/test_newapp.html    |  48 ++++++
 browser/devtools/webide/test/test_runtime.html   | 118 +++++++++++++++
 browser/devtools/webide/themes/details.css       |   1 -
 browser/devtools/webide/themes/newapp.css        |   4 -
 18 files changed, 558 insertions(+), 79 deletions(-)
 create mode 100644 browser/devtools/webide/test/app.zip
 create mode 100644 browser/devtools/webide/test/app/index.html
 create mode 100644 browser/devtools/webide/test/app/manifest.webapp
 create mode 100644 browser/devtools/webide/test/chrome.ini
 create mode 100644 browser/devtools/webide/test/head.js
 create mode 100644 browser/devtools/webide/test/hosted_app.manifest
 create mode 100644 browser/devtools/webide/test/templates.json
 create mode 100644 browser/devtools/webide/test/test_basic.html
 create mode 100644 browser/devtools/webide/test/test_import.html
 create mode 100644 browser/devtools/webide/test/test_newapp.html
 create mode 100644 browser/devtools/webide/test/test_runtime.html