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)

defect

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.
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.
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
I just ran the context-menu tests and nothing like that was logged, and neither test-context-menu or context-menu contain console.log
Flags: needinfo?(poirot.alex)
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
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)
(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.
(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: nobody → evold
OS: Mac OS X → All
Hardware: x86 → All
Attachment #8373030 - Flags: review?(zer0) → review+
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
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.

Attachment

General

Created:
Updated:
Size: