Backed out changeset 9281f9896ce0 (bug 1048098) for webapi test failures

This commit is contained in:
Ed Morley 2014-08-05 12:22:00 +01:00
parent d1de49f4a2
commit 4f96f64e62
5 changed files with 44 additions and 18 deletions

View File

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

View File

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

View File

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

View File

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

View File

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