Bug 854975 - Print app.installTime, beforehand e installSuccess time to understand what's going on in test_install_app.xul. r=fabrice
authorMarco Castelluccio <mar.castelluccio@studenti.unina.it>
Wed, 07 Aug 2013 20:07:41 -0400
changeset 141773 eb4c765215c7ba3ed4105abd6fc343ed0a83b4aa
parent 141772 c5ed02feb7f42ff015f859e27284684e0b59b228
child 141774 81c29d7b95bdb0191f2a345519135272d07f30a9
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersfabrice
bugs854975
milestone26.0a1
Bug 854975 - Print app.installTime, beforehand e installSuccess time to understand what's going on in test_install_app.xul. r=fabrice
dom/tests/mochitest/webapps/test_install_app.xul
--- a/dom/tests/mochitest/webapps/test_install_app.xul
+++ b/dom/tests/mochitest/webapps/test_install_app.xul
@@ -45,18 +45,19 @@ function install(next) {
   var beforehand = Date.now();
 
   confirmNextInstall();
   navigator.mozApps.install(url, null).onsuccess = function onInstall() {
     app = this.result;
 
     is(app.origin, "http://test", "origin");
     is(app.installOrigin, "chrome://mochitests", "install origin");
-    ok(app.installTime >= beforehand, "install time is after install() call");
-    ok(app.installTime <= Date.now(), "install time is before install success");
+    ok(app.installTime >= beforehand, "install time (" + app.installTime + ") is after install() call (" + beforehand + ")");
+    let installSuccess = Date.now();
+    ok(app.installTime <= installSuccess, "install time (" + app.installTime + ") is before install success (" + installSuccess + ")");
     is(app.manifestURL, url, "manifest URL");
     is(app.manifest.name, "Basic App", "manifest.name");
     is(app.manifest.installs_allowed_from, "*",
        "manifest.installs_allowed_from");
 
     next();
   }
 }