Browser chrome UI test output is broken

RESOLVED FIXED in mozilla35

Status

defect
RESOLVED FIXED
5 years ago
Last year

People

(Reporter: mossop, Assigned: mossop)

Tracking

unspecified
mozilla35
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Here is the output displayed in the UI when running browser_fail.js:

Running chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js...
undefined | chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js | 
undefined | chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js | 
Stack trace:
chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js:test:2
chrome://mochikit/content/browser-test.js:Tester_execTest:659
chrome://mochikit/content/browser-test.js:Tester.prototype.nextTest</<:556
null:null:0 NEXT ERROR
undefined | chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js | Got true, expected false
Stack trace:
chrome://mochikit/content/browser-test.js:test_is:793
chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js:test:3
chrome://mochikit/content/browser-test.js:Tester_execTest:659
chrome://mochikit/content/browser-test.js:Tester.prototype.nextTest</<:556
null:null:0 NEXT ERROR
undefined | chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js | Didn't expect true, but got it
Stack trace:
chrome://mochikit/content/browser-test.js:test_isnot:797
chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js:test:4
chrome://mochikit/content/browser-test.js:Tester_execTest:659
chrome://mochikit/content/browser-test.js:Tester.prototype.nextTest</<:556
null:null:0 NEXT ERROR
undefined | chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js | 
Stack trace:
chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js:test:5
chrome://mochikit/content/browser-test.js:Tester_execTest:659
chrome://mochikit/content/browser-test.js:Tester.prototype.nextTest</<:556
null:null:0 NEXT ERROR
undefined | chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js | Got true, expected true
Stack trace:
chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js:test:6
chrome://mochikit/content/browser-test.js:Tester_execTest:659
chrome://mochikit/content/browser-test.js:Tester.prototype.nextTest</<:556
null:null:0 NEXT ERROR
undefined | chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js | Didn't expect true, but got it
Stack trace:
chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js:test:7
chrome://mochikit/content/browser-test.js:Tester_execTest:659
chrome://mochikit/content/browser-test.js:Tester.prototype.nextTest</<:556
null:null:0 NEXT ERROR
undefined | chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js | 
undefined | chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js | TEST-END | chrome://mochitests/content/browser/testing/mochitest/tests/browser/browser_fail.js | finished in 10 ms

Lots of undefineds and blank messages
This was broken by bug 886570
Assignee: nobody → dtownsend+bugmail
Blocks: 886570
Posted patch patchSplinter Review
Also bug 1050251
Blocks: 1050251
Comment on attachment 8495413 [details] [diff] [review]
patch

Bug 886570 removed the result property from the testResult object. Bug 1073074 split the msg property into name and msg. This patch rebuilds those for display in the UI.
Attachment #8495413 - Flags: review?(ahalberstadt)
Comment on attachment 8495413 [details] [diff] [review]
patch

Review of attachment 8495413 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for digging into this! I'd give this an r+, but the fact that you are manually building log strings makes me think Chris should take a look. Though if it's for display purposes only, I think it should be fine.
Attachment #8495413 - Flags: review?(ahalberstadt) → review?(cmanchester)
Maybe we can use the "StructuredFormatter" present in TestRunner.js?
(In reply to Ahmed Kachkach [:akachkach] from comment #6)
> Maybe we can use the "StructuredFormatter" present in TestRunner.js?

By all means file another bug to do that, for now though I'd like to just get this regression fixed.
Comment on attachment 8495413 [details] [diff] [review]
patch

Review of attachment 8495413 [details] [diff] [review]:
-----------------------------------------------------------------

Right. The formatter in TestRunner would be the answer to this, but isn't applicable without more refactoring.

::: testing/mochitest/browser-harness.xul
@@ +176,5 @@
> +          }
> +          else if (t.pass) {
> +            classname += "passed";
> +            if (t.todo)
> +              result += "KNOWN_FAIL";

Might be "KNOWN-FAIL"
Attachment #8495413 - Flags: review?(cmanchester) → review+
See Also: → 1073552
(In reply to Chris Manchester [:chmanchester] from comment #8)
> Comment on attachment 8495413 [details] [diff] [review]
> patch
> 
> Review of attachment 8495413 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Right. The formatter in TestRunner would be the answer to this, but isn't
> applicable without more refactoring.
> 
> ::: testing/mochitest/browser-harness.xul
> @@ +176,5 @@
> > +          }
> > +          else if (t.pass) {
> > +            classname += "passed";
> > +            if (t.todo)
> > +              result += "KNOWN_FAIL";
> 
> Might be "KNOWN-FAIL"

Good catch, fixed.

https://hg.mozilla.org/integration/fx-team/rev/df3fe2e4bf8f
https://hg.mozilla.org/mozilla-central/rev/df3fe2e4bf8f
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Component: BrowserTest → Mochitest
You need to log in before you can comment on or make changes to this bug.