mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-12 06:52:25 +00:00
Bug 947565 - Remove custom timeout in packaged apps tests. r=fabrice
This commit is contained in:
parent
e33b098e7b
commit
e497bc64af
@ -12,31 +12,18 @@ var PackagedTestHelper = (function PackagedTestHelper() {
|
||||
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);
|
||||
@ -48,9 +35,6 @@ var PackagedTestHelper = (function PackagedTestHelper() {
|
||||
}
|
||||
|
||||
function finish() {
|
||||
if (timeoutID) {
|
||||
clearTimeout(timeoutID);
|
||||
}
|
||||
SpecialPowers.removePermission("webapps-manage", document);
|
||||
SpecialPowers.removePermission("browser", document);
|
||||
SimpleTest.finish();
|
||||
|
Loading…
x
Reference in New Issue
Block a user