Closed
Bug 701632
Opened 13 years ago
Closed 13 years ago
browser-test.js sometimes calls dump without a newline on the end
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla11
People
(Reporter: heycam, Assigned: heycam)
Details
Attachments
(1 file)
1.89 KB,
patch
|
jmaher
:
review+
|
Details | Diff | Splinter Review |
This can mess up log messages sometimes.
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #573756 -
Flags: review?(jmaher)
Comment 2•13 years ago
|
||
Comment on attachment 573756 [details] [diff] [review] Add some newlines to dump() calls in browser-test.js. Review of attachment 573756 [details] [diff] [review]: ----------------------------------------------------------------- r=me with this one issue addressed. ::: testing/mochitest/browser-test.js @@ +187,5 @@ > var msg = "Console message: " + aConsoleMessage.message; > if (this.currentTest) > this.currentTest.addResult(new testMessage(msg)); > else > + this.dumper.dump("TEST-INFO | (browser-test.js) | " + msg + "\n"); would we be adding an extra \n in some cases. I would think something similar to: this.dumper.dump("TEST-INFO | (browser-test.js) | " + msg.strip('\n') + "\n");
Attachment #573756 -
Flags: review?(jmaher) → review+
Comment 3•13 years ago
|
||
aConsoleMessage.message doesn't normally include a trailing newline, AFAIK. Even if it does, an occasional extra newline seems better than stripping _all_ newlines from the message.
Assignee | ||
Comment 4•13 years ago
|
||
I think Gavin is probably right regarding console messages not typically including newlines, but I guess it can't hurt to do `msg.replace(/\n+$/, "") + "\n"` there.
Assignee | ||
Comment 5•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/80154fc0c582
Assignee | ||
Comment 6•13 years ago
|
||
Followup, since I forgot to refresh my patch before applying/committing: https://hg.mozilla.org/integration/mozilla-inbound/rev/e5c077ef3d19
Comment 7•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/80154fc0c582 https://hg.mozilla.org/mozilla-central/rev/e5c077ef3d19
Assignee: nobody → cam
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Updated•6 years ago
|
Component: BrowserTest → Mochitest
You need to log in
before you can comment on or make changes to this bug.
Description
•