Backed out changeset f6f28be8d8f2 (bug 1315781) for XPCShell test timed out

This commit is contained in:
Iris Hsiao
2016-11-10 14:53:46 +08:00
parent c880990930
commit d24e67dbe4
76 changed files with 1133 additions and 1134 deletions

View File

@@ -62,7 +62,7 @@ function makeLock(kind) {
let name = "test-xpcom-Barrier-" + ++makeLock.counter;
let barrier = asyncShutdownService.makeBarrier(name);
return {
addBlocker: function(blockerName, condition, state) {
addBlocker: function(name, condition, state) {
if (condition == null) {
// Slight trick as `null` or `undefined` cannot be used as keys
// for `xpcomMap`. Note that this has no incidence on the result
@@ -73,7 +73,7 @@ function makeLock(kind) {
let blocker = makeLock.xpcomMap.get(condition);
if (!blocker) {
blocker = {
name: blockerName,
name: name,
state: state,
blockShutdown: function(aBarrierClient) {
return Task.spawn(function*() {

View File

@@ -100,15 +100,15 @@ add_task(function* test_phase_removeBlocker() {
};
lock.addBlocker("Wait forever", blocker);
let do_remove_blocker = function(aLock, aBlocker, aShouldRemove) {
do_print("Attempting to remove blocker " + aBlocker + ", expecting result " + aShouldRemove);
let do_remove_blocker = function(lock, blocker, shouldRemove) {
do_print("Attempting to remove blocker " + blocker + ", expecting result " + shouldRemove);
if (kind == "xpcom-barrier") {
// The xpcom variant always returns `undefined`, so we can't
// check its result.
aLock.removeBlocker(aBlocker);
lock.removeBlocker(blocker);
return;
}
do_check_eq(aLock.removeBlocker(aBlocker), aShouldRemove);
do_check_eq(lock.removeBlocker(blocker), shouldRemove);
};
do_remove_blocker(lock, blocker, true);
do_remove_blocker(lock, blocker, false);