Bug 561876: Some tests aren't clearing active installs leading to later tests failing. r=robstrong

This commit is contained in:
Dave Townsend 2010-04-29 13:11:28 -07:00
parent eb31efd5db
commit a4429433df
2 changed files with 9 additions and 1 deletions

View File

@ -45,6 +45,7 @@ function run_install_tests(callback) {
is(SUCCESS, expectedStatus, message);
run_next_install_test();
// Don't proceed with the install
install.cancel();
return false;
},

View File

@ -81,7 +81,11 @@ var Harness = {
win.close();
AddonManager.removeInstallListener(this);
finish();
AddonManager.getAllInstalls(function(installs) {
is(installs.length, 0, "Should be no active installs at the end of the test");
finish();
});
},
endTest: function() {
@ -169,6 +173,9 @@ var Harness = {
installInfo.install();
}
else {
installInfo.installs.forEach(function(install) {
install.cancel();
});
this.endTest();
}
},