Open Bug 1242968 Opened 9 years ago Updated 2 years ago

Tests in devtools/shared/acorn/test/unit/ and devtools/shared/pretty-fast/test/unit/ may fail with asynchronous termination

Categories

(DevTools :: General, defect, P3)

defect

Tracking

(firefox47 affected)

Tracking Status
firefox47 --- affected

People

(Reporter: Paolo, Unassigned)

References

Details

There is a listener that turns console messages into test failures in "head_acorn.js".

This doesn't generate any failure at present, but just because the listener doesn't have the time to catch the errors that occur in some tests. If we spin the event loop at the end of the test, this catches some more warnings, for example:


 0:00.41 LOG: Thread-3 ERROR head_acorn.js got console message: [JavaScript Warning: "SyntaxError: test for equality (==) mistyped as assignment (=)?" {file: "resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/acorn/acorn.js" line: 2329 column: 117 source: "his.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.b"}]

 0:00.41 LOG: Thread-3 ERROR head_acorn.js got console message: [JavaScript Warning: "ReferenceError: reference to undefined property Services.appinfo.name" {file: "resource://devtools/shared/Loader.jsm" line: 462}]

This is an issue for bug 989960 where we have to spin the event loop to wait for uncaught rejections. I'm going to filter out the JavaScript warnings in bug 989960 for the moment, to allow the infrastructure change to take effect.
The same for "head_pretty-fast.js".
Summary: Tests in devtools/shared/acorn/tests/unit/ may fail with asynchronous termination → Tests in devtools/shared/acorn/test/unit/ and devtools/shared/pretty-fast/test/unit/ may fail with asynchronous termination
Flags: needinfo?(nfitzgerald)
(In reply to :Paolo Amadini from comment #0)
>  0:00.41 LOG: Thread-3 ERROR head_acorn.js got console message: [JavaScript
> Warning: "SyntaxError: test for equality (==) mistyped as assignment (=)?"
> {file: "resource://gre/modules/commonjs/toolkit/loader.js ->
> resource://devtools/acorn/acorn.js" line: 2329 column: 117 source:
> "his.exprAllowed = false;else if (update = type.updateContext)
> update.call(this, prevType);else this.exprAllowed = type.b"}]
> 
>  0:00.41 LOG: Thread-3 ERROR head_acorn.js got console message: [JavaScript
> Warning: "ReferenceError: reference to undefined property
> Services.appinfo.name" {file: "resource://devtools/shared/Loader.jsm" line:
> 462}]

Both of these "errors" are actually style warnings, and acorn is third party code. Any way we can disable these style warnings for these subdirectories?
Flags: needinfo?(nfitzgerald)
Style warnings? Do you mean strict warnings?
Yes (although confusingly enough, unrelated to strict mode).
DevTools bug triage (filter on CLIMBING SHOES).
Priority: -- → P3
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.