Skip to content

Commit

Permalink
RP Observer: ignore jquery log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
myrdd committed Mar 19, 2015
1 parent 86b9703 commit 7085cf4
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests/mozmill/extension/content/console-observer.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,17 @@ Cu.import("resource://gre/modules/Services.jsm");
var regEx = /(Error|Warning|Exception)/i;

function isRPException(aMessage) {
return aMessage.indexOf("chrome://requestpolicy") !== -1 &&
regEx.test(aMessage);
if (aMessage.indexOf("chrome://requestpolicy") === -1 ||
regEx.test(aMessage) === false) {
return false;
}

if (aMessage.indexOf("jquery.min.js") !== -1) {
// ignore logs caused by jQuery
return false;
}

return true;
}

/**
Expand Down

0 comments on commit 7085cf4

Please sign in to comment.