Bug 947565 - Remove custom timeout in packaged apps tests. r=fabrice
authorMarco Castelluccio <mar.castelluccio@studenti.unina.it>
Tue, 29 Apr 2014 04:02:00 -0400
changeset 181097 a26c468310d527eea90e1b6fd9dfb973bead62a3
parent 181096 c0c933d36ddd7960d79b09d32526b2f1fc5c0085
child 181098 8b6c2a901df64db1cbdc22eb9d43fe637178f26b
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersfabrice
bugs947565
milestone32.0a1
Bug 947565 - Remove custom timeout in packaged apps tests. r=fabrice
dom/apps/tests/test_packaged_app_common.js
--- a/dom/apps/tests/test_packaged_app_common.js
+++ b/dom/apps/tests/test_packaged_app_common.js
@@ -7,55 +7,39 @@ var PackagedTestHelper = (function Packa
 
   var steps;
   var index = -1;
   var gSJSPath = "tests/dom/apps/tests/file_packaged_app.sjs";
   var gSJS = "http://test/" + gSJSPath;
   var gAppName = "appname";
   var gApp = null;
   var gInstallOrigin = "http://mochi.test:8888";
-  var timeoutID;
-
-  function timeoutError() {
-    ok(false, "Timeout! Probably waiting on a app installation event");
-    info("Finishing this test suite!");
-    finish();
-  }
 
   function debug(aMsg) {
     //dump("== PackageTestHelper debug == " + aMsg + "\n");
   }
 
   function next() {
-    if (timeoutID) {
-      clearTimeout(timeoutID);
-    }
     index += 1;
     if (index >= steps.length) {
       ok(false, "Shouldn't get here!");
       return;
     }
     try {
-      // There's nothing here that should take more than 30 seconds, even on
-      // heavy loads. So there's no need to stop further tests for five minutes.
-      timeoutID = setTimeout(timeoutError, 30000);
       steps[index]();
     } catch(ex) {
       ok(false, "Caught exception", ex);
     }
   }
 
   function start() {
     next();
   }
 
   function finish() {
-    if (timeoutID) {
-      clearTimeout(timeoutID);
-    }
     SpecialPowers.removePermission("webapps-manage", document);
     SpecialPowers.removePermission("browser", document);
     SimpleTest.finish();
   }
 
   function mozAppsError() {
     ok(false, "mozApps error: " + this.error.name);
     finish();