Bug 889911 - Fix tests that unconditionally throw for things reported to the console. r=mrbkap

When we start sending everything reported to the JSErrorReporter to the console,
these tests end up getting confused by warnings.
This commit is contained in:
Bobby Holley 2013-07-16 20:38:44 -07:00
parent 8676271e71
commit b0aff6e915
2 changed files with 8 additions and 2 deletions

View File

@ -63,7 +63,10 @@ AsyncRunner.prototype = {
},
observe: function AR_consoleServiceListener(msg) {
if (msg instanceof Ci.nsIScriptError)
if (msg instanceof Ci.nsIScriptError &&
!(msg.flags & Ci.nsIScriptError.warningFlag))
{
this._callbacks.consoleError(msg);
}
},
};

View File

@ -151,8 +151,11 @@ AsyncRunner.prototype = {
},
observe: function observe(msg) {
if (msg instanceof Ci.nsIScriptError)
if (msg instanceof Ci.nsIScriptError &&
!(msg.flags & Ci.nsIScriptError.warningFlag))
{
this._callbacks.consoleError(msg);
}
},
};