Open Bug 622390 Opened 9 years ago Updated 5 years ago

Let SimpleTest.js dump()s test results when run without TestRunner.js

Categories

(Testing :: Mochitest, defect, major)

defect
Not set
major

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: sgautherie, Assigned: sgautherie)

References

()

Details

Attachments

(1 file, 1 obsolete file)

This bug is +/- like bug 456876, but doesn't care about --log-file (or --console-level) support.

It's different than bug 508664 as I'll just keep the full standalone mode (which can be useful to develop/debug a test).
In other words, I'll submit a trivial fix for the current behavior, which could be revisited in that bug if need be.
Attachment #500645 - Flags: review? → review?(rcampbell)
Blocks: 508664
No longer blocks: 456876
Comment on attachment 500645 [details] [diff] [review]
(Av1) Add and use a fake SimpleTest._logger object, Move SimpleTest._logEnabled checks into SimpleTest._logResult()

from SimpleTest.js:

11  * NOTE: Pay attention to cross-browser compatibility in this file. For
12  * instance, do not use const or JS > 1.5 features which are not yet
13  * implemented everywhere.

dump() is not implemented in all browsers.

I'm not sure I understand why this bug is required. Please why you need to run this without the test runner.
Attachment #500645 - Flags: review?(rcampbell) → review-
Av1, with comment 2 suggestion(s).


(In reply to comment #2)

> dump() is not implemented in all browsers.

Well, it is already used in this file and in TestRunner+setup, so I'm just doing the same.

> I'm not sure I understand why this bug is required. Please why you need to run
> this without the test runner.

This is the current/usual way to run one test only, to develop/debug it...
Attachment #500645 - Attachment is obsolete: true
Attachment #501074 - Flags: review?(rcampbell)
Comment on attachment 501074 [details] [diff] [review]
(Av2) Use a console Logger (copied from setup.js), Move SimpleTest._logEnabled checks into SimpleTest._logResult()

usual for whom? I usually run:

TEST_PATH=path/to/my/test.js make mochitest-browser-chrome

or similar. I recommend others do the same.

As for inclusion of dump() elsewhere in the file, I guess I missed that. Should probably update the header comment to reflect that or change the dump to do the right thing on other browsers.

In any case, I don't see a lot of value in this patch. What we have now works well enough.
Attachment #501074 - Flags: review?(rcampbell) → review-
Note (to self): check current status, after bug 1014062 (for example).
You need to log in before you can comment on or make changes to this bug.