Bug 1048098: remove redundant flushPermissions, flushPrefEnv from tearing down procedure. r=btian, r=echen

This commit is contained in:
Vicamo Yang 2014-08-05 16:19:06 +08:00
parent b511bfa20c
commit a5bcee91bf
5 changed files with 18 additions and 44 deletions

View File

@ -705,17 +705,13 @@ function getDefaultAdapter() {
}
/**
* Flush permission settings and call |finish()|.
* Wait for pending emulator transactions and call |finish()|.
*/
function cleanUp() {
waitFor(function() {
SpecialPowers.flushPermissions(function() {
// Use ok here so that we have at least one test run.
ok(true, "permissions flushed");
// Use ok here so that we have at least one test run.
ok(true, ":: CLEANING UP ::");
finish();
});
}, function() {
waitFor(finish, function() {
return pendingEmulatorCmdCount === 0;
});
}

View File

@ -626,17 +626,13 @@ function isUuidsEqual(aUuidArray1, aUuidArray2) {
}
/**
* Flush permission settings and call |finish()|.
* Wait for pending emulator transactions and call |finish()|.
*/
function cleanUp() {
waitFor(function() {
SpecialPowers.flushPermissions(function() {
// Use ok here so that we have at least one test run.
ok(true, "permissions flushed");
// Use ok here so that we have at least one test run.
ok(true, ":: CLEANING UP ::");
finish();
});
}, function() {
waitFor(finish, function() {
return pendingEmulatorCmdCount === 0;
});
}

View File

@ -317,17 +317,13 @@ function sendMultipleRawCbsToEmulatorAndWait(aPdus) {
}
/**
* Flush permission settings and call |finish()|.
* Wait for pending emulator transactions and call |finish()|.
*/
function cleanUp() {
waitFor(function() {
SpecialPowers.flushPermissions(function() {
// Use ok here so that we have at least one test run.
ok(true, "permissions flushed");
// Use ok here so that we have at least one test run.
ok(true, ":: CLEANING UP ::");
finish();
});
}, function() {
waitFor(finish, function() {
return pendingEmulatorCmdCount === 0;
});
}

View File

@ -1128,17 +1128,13 @@ function getNumOfRadioInterfaces() {
}
/**
* Flush permission settings and call |finish()|.
* Wait for pending emulator transactions and call |finish()|.
*/
function cleanUp() {
waitFor(function() {
SpecialPowers.flushPermissions(function() {
// Use ok here so that we have at least one test run.
ok(true, "permissions flushed");
// Use ok here so that we have at least one test run.
ok(true, ":: CLEANING UP ::");
finish();
});
}, function() {
waitFor(finish, function() {
return _pendingEmulatorCmdCount === 0 &&
_pendingEmulatorShellCmdCount === 0;
});

View File

@ -562,22 +562,12 @@ function compareSmsMessage(aFrom, aTo) {
}
/**
* Flush permission settings and call |finish()|.
* Wait for pending emulator transactions and call |finish()|.
*/
function cleanUp() {
ok(true, ":: CLEANING UP ::");
waitFor(function() {
SpecialPowers.flushPermissions(function() {
ok(true, "permissions flushed");
SpecialPowers.flushPrefEnv(function() {
ok(true, "preferences flushed");
finish();
})
});
}, function() {
waitFor(finish, function() {
return pendingEmulatorCmdCount === 0;
});
}