1 function sendMessage(msg) {
7 sendMessage("OK: " + msg);
9 sendMessage("KO: " + msg);
12 function is(a, b, msg) {
14 sendMessage("OK: " + a + " == " + b + " - " + msg);
16 sendMessage("KO: " + a + " != " + b + " - " + msg);
19 function installed(p) {
21 sendMessage("IS_INSTALLED");
23 sendMessage("NOT_INSTALLED");
27 sendMessage("VERSION: MyWebApp vVERSIONTOKEN");
32 ok(false, "Error callback invoked");
37 ok(true, "Launched APPTYPETOKEN app");
38 var request = window.navigator.mozApps.getSelf();
39 request.onsuccess = function() {
40 var app = request.result;
43 request.onerror = cbError;
46 function checkApp(app) {
47 // If the app is installed, |app| will be non-null. If it is, verify its state.
50 var appName = "Really Rapid Release (APPTYPETOKEN)";
51 var manifest = SpecialPowers.wrap(app.manifest);
52 is(manifest.name, appName, "Manifest name should be correct");
53 is(app.origin, "http://test", "App origin should be correct");
54 is(app.installOrigin, "http://mochi.test:8888", "Install origin should be correct");