ESLint xpcshell test environment should not use the browser environment
Categories
(Developer Infrastructure :: Lint and Formatting, task, P2)
Tracking
(firefox105 fixed)
| Tracking | Status | |
|---|---|---|
| firefox105 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
Details
Attachments
(9 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
ESlint's current set-up for xpcshell-tests has the browser environment enabled for that configuration.
This means that items like window, top, name are defined as available in xpcshell-tests, even though they aren't. This hides various bugs, e.g. bug 1784698 and bug 1784697.
As the browser environment is inherited from the main configuration, we need to explicitly turn it off for xpcshell-tests. We can use the priviledged environment for most of the globals that are available to xpcshell.
| Assignee | ||
Comment 1•3 years ago
|
||
| Assignee | ||
Comment 2•3 years ago
|
||
Depends on D154592
| Assignee | ||
Comment 3•3 years ago
|
||
Depends on D154599
| Assignee | ||
Comment 4•3 years ago
|
||
Depends on D154600
| Assignee | ||
Comment 5•3 years ago
|
||
Depends on D154601
| Assignee | ||
Comment 6•3 years ago
|
||
Depends on D154602
| Assignee | ||
Comment 7•3 years ago
|
||
Depends on D154603
| Assignee | ||
Comment 8•3 years ago
|
||
Depends on D154604
| Assignee | ||
Comment 9•3 years ago
|
||
Depends on D154605
Updated•3 years ago
|
Updated•3 years ago
|
Comment 10•3 years ago
|
||
Comment 11•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/9cb6ae0b0a6a
https://hg.mozilla.org/mozilla-central/rev/b93e9f9ddaf8
https://hg.mozilla.org/mozilla-central/rev/fc8e6a61aa51
https://hg.mozilla.org/mozilla-central/rev/afe3ecd91af3
https://hg.mozilla.org/mozilla-central/rev/5c0c85ccff5b
https://hg.mozilla.org/mozilla-central/rev/ec16c2001460
https://hg.mozilla.org/mozilla-central/rev/244de9031beb
https://hg.mozilla.org/mozilla-central/rev/fd501b7a23c3
Comment 12•3 years ago
|
||
Re-enables the browser environment in WebExtensions tests (as in the m-c patch) and in alertTestUtils.js lists alert, confirm, and prompt as globals because they're likely to be defined by the test.
Comment 13•3 years ago
|
||
Comment 14•3 years ago
|
||
A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)
Updated•3 years ago
|
Description
•