Closed
Bug 853092
Opened 12 years ago
Closed 11 years ago
During `cfx test`, the output is polluted by several "info: add-on sdk:" messages in page-mod
Categories
(Add-on SDK Graveyard :: General, defect, P2)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: zer0, Assigned: evold)
References
Details
Attachments
(1 file)
When `cfx test` is executed, we got in the middle of the execution some output messages:
info: addon-sdk: Open iframe in hidden window
info: addon-sdk: Open toplevel window
info: addon-sdk: Open iframe in browser window
info: addon-sdk: Open iframes in a tab
They seems a result of a `console.log`, that should never be called during unit test, unless the console is properly mocked.
These messages should be removed if they're left over, or the console should be properly mocked, if they're intended to be there.
Reporter | ||
Comment 1•12 years ago
|
||
We also have:
info: addon-sdk: executing: text
info: addon-sdk: executing: html
info: addon-sdk: executing: image
info: addon-sdk: executing: web
info: addon-sdk: executing: click
info: addon-sdk: executing: mouseover
info: addon-sdk: executing: mouseout
info: addon-sdk: executing: click
info: addon-sdk: executing: mouseover
info: addon-sdk: executing: mouseout
info: addon-sdk: executing: content
info: addon-sdk: executing: content
info: addon-sdk: executing: text
info: addon-sdk: executing: fallback
info: addon-sdk: executing: tooltip
info: addon-sdk: executing: allow
info: addon-sdk: executing: allow
info: addon-sdk: executing: allow
info: addon-sdk: executing: first
info: addon-sdk: executing: second
info: addon-sdk: executing: first
that I believe comes from context-menu.
Reporter | ||
Updated•12 years ago
|
Summary: During `cfx test`, the output is polluted by several "info: add-on sdk: Open" messages → During `cfx test`, the output is polluted by several "info: add-on sdk:" messages
Comment 2•12 years ago
|
||
I just ran the context-menu tests and nothing like that was logged, and neither test-context-menu or context-menu contain console.log
Reporter | ||
Comment 3•12 years ago
|
||
Okay, it seems that they comes respectively from:
https://github.com/mozilla/addon-sdk/blob/master/test/test-page-mod.js#L545
https://github.com/mozilla/addon-sdk/blob/master/test/test-page-mod.js#L567
https://github.com/mozilla/addon-sdk/blob/master/test/test-page-mod.js#L577
https://github.com/mozilla/addon-sdk/blob/master/test/test-page-mod.js#L593
and:
https://github.com/mozilla/addon-sdk/blob/master/test/test-widget.js#L161
Priority: -- → P2
Assignee | ||
Updated•12 years ago
|
Flags: needinfo?(poirot.alex)
Assignee | ||
Updated•12 years ago
|
Summary: During `cfx test`, the output is polluted by several "info: add-on sdk:" messages → During `cfx test`, the output is polluted by several "info: add-on sdk:" messages in page-mod
Comment 5•11 years ago
|
||
Actually, these messages are helpfull when you work on these tests,
that's because some of our test are huge and are executed in only one exported test function, that's particularely true for widget. So we have many distinct tests being done in one test export. So without this console.info, we do not know which one we are currently executing.
In verbose mode, for widget, you would have "executing test-widget:testConstructor" executing a lot of tests that would not print any "starting xxx test" message.
I think that's a regression, I remember explicitely changing console.log to console.info because of this. We should be able to call a console method that prints in verbose and not in non-verbose.
Flags: needinfo?(poirot.alex)
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Alexandre Poirot (:ochameau) from comment #5)
> Actually, these messages are helpfull when you work on these tests,
> that's because some of our test are huge and are executed in only one
> exported test function, that's particularely true for widget. So we have
> many distinct tests being done in one test export. So without this
> console.info, we do not know which one we are currently executing.
> In verbose mode, for widget, you would have "executing
> test-widget:testConstructor" executing a lot of tests that would not print
> any "starting xxx test" message.
>
> I think that's a regression, I remember explicitely changing console.log to
> console.info because of this. We should be able to call a console method
> that prints in verbose and not in non-verbose.
Ok I think we should use `assert.pass` instead because `console.log` prints regardless of the `-v` flag.
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to Erik Vold [:erikvold] [:ztatic] from comment #6)
> (In reply to Alexandre Poirot (:ochameau) from comment #5)
> > I think that's a regression, I remember explicitely changing console.log to
> > console.info because of this. We should be able to call a console method
> > that prints in verbose and not in non-verbose.
>
> Ok I think we should use `assert.pass` instead because `console.log` prints
> regardless of the `-v` flag.
Oops missed that last bit of your message Alex :/
What Alex said! +1
Assignee | ||
Updated•11 years ago
|
Blocks: sdk/page-mod
Assignee | ||
Comment 8•11 years ago
|
||
Attachment #8373030 -
Flags: review?(zer0)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → evold
Assignee | ||
Updated•11 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Reporter | ||
Updated•11 years ago
|
Attachment #8373030 -
Flags: review?(zer0) → review+
Comment 9•11 years ago
|
||
Commits pushed to master at https://github.com/mozilla/addon-sdk
https://github.com/mozilla/addon-sdk/commit/61bd2e32dca4164d9837c38c579118005a141bc2
Bug 853092 - During `cfx test`, the output is polluted by several "info: add-on sdk:" messages in page-mod
https://github.com/mozilla/addon-sdk/commit/5ede77e52eaf8b05f83f5b090f0c31ba59204365
Merge pull request #1394 from erikvold/853092
Bug 853092 - During `cfx test`, the output is polluted by several "info: add-on sdk:" messages in page-mod r=@ZER0
Assignee | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•