Closed
Bug 956385
Opened 11 years ago
Closed 11 years ago
SimpleTest.monitorConsole counts non-matching messages towards the total
Categories
(Testing :: Mochitest, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla29
People
(Reporter: bholley, Assigned: bholley)
References
Details
Attachments
(1 file)
(deleted),
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
SimpleTest.monitorConsole is a nice mechanism that allows consumers to check for an expected series of console messages. It optionally allows consumers to force a test failure of a console message is received, but this is understandably not the default, since it increases the chance of breakage when unrelated console warning are added (i.e. for deprecated web features).
In the default case, unexpected console messages are just ignored (that is to say: failures of the regexp do not cause the test to fail). However, they _still_ increment the counter of expected messages, which is totally wrong. In the current world, a test which does not get the message it expects, but gets a totally unrelated message (say, a syntax error), will pass, when it should definitely fail.
I have a patch for this. Pushing to try momentarily.
Comment 2•11 years ago
|
||
Drew did a rewrite of this in bug 898593. We discussed it a little bit there, but we probably just missed this corner case. Thanks for filing the bug (and hacking on it).
Blocks: 898593
Assignee | ||
Comment 3•11 years ago
|
||
This looks green. Flagging ted for review.
Attachment #8355674 -
Flags: review?(ted)
Updated•11 years ago
|
Attachment #8355674 -
Flags: review?(ted) → review+
Comment 4•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in
before you can comment on or make changes to this bug.
Description
•