Bug 661813 - Fix intermittent failure in browser_webconsole_bug_595934_message_categories.js. r=mihai

This commit is contained in:
Justin Dolske 2012-08-15 18:04:52 -07:00
parent 6af996efab
commit d5bdb2437c

View File

@ -116,16 +116,16 @@ let TestObserver = {
return;
}
is(aSubject.category, TESTS[pos].category,
"test #" + pos + ": error category '" + TESTS[pos].category + "'");
var expectedCategory = TESTS[pos].category;
if (aSubject.category == TESTS[pos].category) {
info("test #" + pos + " console observer got " + aSubject.category + ", is expecting " + expectedCategory);
if (aSubject.category == expectedCategory) {
foundCategory = true;
}
else {
ok(false, aSubject.sourceName + ':' + aSubject.lineNumber + '; ' +
info("unexpected message was: " + aSubject.sourceName + ':' + aSubject.lineNumber + '; ' +
aSubject.errorMessage);
testEnded = true;
}
}
};