Closed
Bug 1298559
Opened 5 years ago
Closed 5 years ago
Enable eslint for browser/base/content/test
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 51
Tracking | Status | |
---|---|---|
firefox51 | --- | fixed |
People
(Reporter: jaws, Assigned: jaws)
Details
Attachments
(1 file)
I have a patch that fixes the eslint errors for /browser/base/content/test. Two of the files have to be ignored due to unresolved parser issues, browser/base/content/test/general/file_csp_block_all_mixedcontent.html browser/base/content/test/urlbar/file_blank_but_not_blank.html
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•5 years ago
|
||
This patch depends on the patches in bug 1218937.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b07487d0e4f3
Comment 6•5 years ago
|
||
mozreview-review |
Comment on attachment 8785499 [details] Bug 1298559 - Enable eslint for /browser/base/content/test/ https://reviewboard.mozilla.org/r/74676/#review73352 Thanks Jared!
Attachment #8785499 -
Flags: review?(MattN+bmo) → review+
Assignee | ||
Comment 7•5 years ago
|
||
Paolo, /browser/base/content/test/general/browser_sanitize-timespans.js fails with the change made here, specifically the following change:
> function downloadExists(list, path)
> {
>- return Task.spawn(function () {
>+ return Task.spawn(function* () {
> let listArray = yield list.getAll();
> throw new Task.Result(listArray.some(i => i.target.path == path));
> });
> }
Do you know why changing this function to a generator would cause this test to fail? I'm also a bit curious about why this is throwing the Task.Result.
Flags: needinfo?(paolo.mozmail)
Comment 8•5 years ago
|
||
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #7) > Do you know why changing this function to a generator would cause this test > to fail? I'm also a bit curious about why this is throwing the Task.Result. Yep, you just need to "return" instead of using "throw new Task.Result()". Non-star generators don't support returning a completion value using the "return" statement, that's why the trick of propagating a value through a special exception was created.
Flags: needinfo?(paolo.mozmail)
Comment 9•5 years ago
|
||
Ah, and you can convert to Task.async() while you're there. let downloadExists = Task.async(function* (list, path) { //... });
Comment 10•5 years ago
|
||
Pushed by jwein@mozilla.com: https://hg.mozilla.org/integration/fx-team/rev/fdf90317de68 Enable eslint for /browser/base/content/test/ r=mattn
Comment 11•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fdf90317de68
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
You need to log in
before you can comment on or make changes to this bug.
Description
•