mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 947565 - Remove custom timeout in packaged apps tests. r=fabrice
This commit is contained in:
parent
3c3293eb9b
commit
b04f0c5276
@ -12,31 +12,18 @@ var PackagedTestHelper = (function PackagedTestHelper() {
|
|||||||
var gAppName = "appname";
|
var gAppName = "appname";
|
||||||
var gApp = null;
|
var gApp = null;
|
||||||
var gInstallOrigin = "http://mochi.test:8888";
|
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) {
|
function debug(aMsg) {
|
||||||
//dump("== PackageTestHelper debug == " + aMsg + "\n");
|
//dump("== PackageTestHelper debug == " + aMsg + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
function next() {
|
function next() {
|
||||||
if (timeoutID) {
|
|
||||||
clearTimeout(timeoutID);
|
|
||||||
}
|
|
||||||
index += 1;
|
index += 1;
|
||||||
if (index >= steps.length) {
|
if (index >= steps.length) {
|
||||||
ok(false, "Shouldn't get here!");
|
ok(false, "Shouldn't get here!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
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]();
|
steps[index]();
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
ok(false, "Caught exception", ex);
|
ok(false, "Caught exception", ex);
|
||||||
@ -48,9 +35,6 @@ var PackagedTestHelper = (function PackagedTestHelper() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function finish() {
|
function finish() {
|
||||||
if (timeoutID) {
|
|
||||||
clearTimeout(timeoutID);
|
|
||||||
}
|
|
||||||
SpecialPowers.removePermission("webapps-manage", document);
|
SpecialPowers.removePermission("webapps-manage", document);
|
||||||
SpecialPowers.removePermission("browser", document);
|
SpecialPowers.removePermission("browser", document);
|
||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
||||||
|
Loading…
Reference in New Issue
Block a user