Commit Graph
118 Commits
Author SHA1 Message Date
Julian Descottes 02c359a70d Bug 2028930 - [devtools] Avoid toolbox crashes due to missing localization file r=nchevobbe,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D293945
2026-04-16 12:00:23 +00:00
Leo McArdle 82767b002b Bug 2013940 - [devtools] fix floating point errors in font inspector rounding r=devtools-reviewers,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D281816
2026-03-24 15:25:56 +00:00
Rob Wu fdf289b012 Bug 2017996 - Fix crash in test_require.js r=devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D284129
2026-02-20 00:07:13 +00:00
Tom Marble 5ce09d7446 Bug 1995583 - test manifest cleanup for idiomatic usage r=jmaher,necko-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,sessionstore-reviewers,tabbrowser-reviewers,translations-reviewers,omc-reviewers,browser-installer-reviewers,twisniewski,masayuki,dom-core,smaug,nalexander,emcminn,sthompson,alwu,ai-ondevice-reviewers,valentin
For TOML manifests:

1. Change processor -> arch
2. Use arch instead of bits bits == '64' =>
   aarch64 (default on mac 15.30) or x86_64 bits == '32' => x86
3. Replace android_version with corresponding os_version
4. Remove conditions with linux os_version=="18.04"
   (unless they contain verify or verify-standalone)
5. Remove conditions with mac os_version=='11.20',
   (unless they contain verify or verify-standalone)
6. Remove conditions with win os_version=='11.2009' or win11_2009,
   (unless they contain verify or verify-standalone)
7. Linux conditions should have os_version, arch and display
   (simple "os == 'linux'" will get expanded to these two)
   "os == 'linux' && os_version == '22.04' && arch == 'x86_64' && display == 'wayland'"
   "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11'"
8. Mac conditions should have os_version and arch
   (simple "os == 'mac'" will get expanded to these three)
   "os == 'mac' && os_version == '10.15' && arch == 'x86_64'",
   "os == 'mac' && os_version == '14.70' && arch == 'x86_64'",
   "os == 'mac' && os_version == '15.30' && arch == 'aarch64'",
9. Replace apple_catalina with
   os == 'mac' && os_version == '10.15' && arch == 'x86_64'
10. Replace apple_silicon with
   os == 'mac' && os_version = '15.30' && arch == 'aarch64'
11. Replace win10_2009 with
   os == 'win' && os_version = '10.2009' && arch == 'x86_64'
12. Replace "!debug" with three conditions "asan", "opt", or "tsan"
13. Replace literal boolean comparison with variables
    (e.g. "debug == false" => "!debug)

Resolves 2000285

Signed-off-by: Tom Marble <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D272815
2025-11-22 00:30:39 +00:00
Mark Banner b38cd3110b Bug 1999554 - Automatically fix ESLint rule jsdoc/check-types for devtools/. r=devtools-reviewers,devtools-backward-compat-reviewers,profiler-reviewers,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D272173
2025-11-21 16:16:08 +00:00
Julian Descottes fecb7d40d1 Bug 1997708 - [devtools] Fix PluralForm with legacy gecko locale ja-JP-mac r=nchevobbe,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D271253
2025-11-04 17:39:29 +00:00
Eemeli Aro 49a892dd01 Bug 1760013 - Inline plural rule selection into devtools/shared/plural-form.js. r=devtools-reviewers,nchevobbe
The messages depending on this should really be migrated to a better format, but this change at least reduces the burden on translators a little bit.

Differential Revision: https://phabricator.services.mozilla.com/D267415
2025-10-30 11:10:24 +00:00
Tom Marble f5df00d78c Bug 1991964 - Remove android_version from test manifests r=jmaher,necko-reviewers,media-playback-reviewers,devtools-reviewers,permissions-reviewers,dom-worker-reviewers,asuth,jesup,nchevobbe,alwu
Now includes both code changes and manifest changes.
See also Bug 1991960

Signed-off-by: Tom Marble <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D267466
2025-10-08 02:11:45 +00:00
Nicolas Chevobbe ecacb2f9a5 Bug 1599082 - [devtools] Remove static EventEmitter methods. r=devtools-reviewers,jdescottes.
Let's always use instance methods instead so we're consistent in the whole codebase.
We only keep the EventEmitter.decorate that is used significantly in DevTools
to handle old-syle function + prototype "classes".

We might also save a few cycles by avoid wrapping the static methods that was
done from the inheritence based ones.
Remove the test that was asserting the static methods.

Differential Revision: https://phabricator.services.mozilla.com/D267590
2025-10-07 05:37:56 +00:00
Nicolas Chevobbe abc121c612 Bug 1992060 - [devtools] Remove EventEmitter listener as object. r=devtools-reviewers,ochameau.
This wasn't used anywhere except in the test checking the feature.

Differential Revision: https://phabricator.services.mozilla.com/D267168
2025-10-02 16:16:35 +00:00
Joel Maher b0a2bcee11 Bug 1976582 - Carry over android emulator annotations from api 24 to api 34. r=aryx,necko-reviewers,devtools-reviewers,nchevobbe,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D256730
2025-07-11 19:02:18 +00:00
iulian moraru ddc73f5922 Revert "Bug 1976582 - Carry over android emulator annotations from api 24 to api 34. r=aryx,necko-reviewers,devtools-reviewers,nchevobbe,kershaw" for causing reftest failures on color_quads.html.
This reverts commit e59ec21b7b.
2025-07-11 14:15:07 +00:00
Joel Maher e59ec21b7b Bug 1976582 - Carry over android emulator annotations from api 24 to api 34. r=aryx,necko-reviewers,devtools-reviewers,nchevobbe,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D256730
2025-07-11 12:43:35 +00:00
Gijs Kruitbosch 9c5be039df Bug 1971751 - update tests that misuse Assert.ok after no-comparison-or-assignment-inside-ok update, r=frontend-codestyle-reviewers,webdriver-reviewers,extension-reviewers,settings-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,search-reviewers,devtools-reviewers,sync-reviewers,cookie-reviewers,sessionstore-reviewers,tabbrowser-reviewers,places-reviewers,profiler-reviewers,omc-reviewers,migration-reviewers,home-newtab-reviewers,webcompat-reviewers,urlbar-reviewers,permissions-reviewers,firefox-ai-ml-reviewers,profiles-reviewers,robwu,julienw,bytesized,sthompson,valentin,jhirsch,markh,twisniewski,Standard8,dimi,nbarrett,mconley,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D253662
2025-06-26 10:33:09 +00:00
agoloman fd1e9e499d Revert "Bug 1971751 - update no-comparison-or-assignment-inside-ok to also cover Assert.ok, r=frontend-codestyle-reviewers,Standard8" for causing lint failures @test_maybeCapExpiry.js.
This reverts commit 2744165954.

Revert "Bug 1971751 - update tests that misuse Assert.ok after no-comparison-or-assignment-inside-ok update, r=frontend-codestyle-reviewers,webdriver-reviewers,extension-reviewers,settings-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,search-reviewers,devtools-reviewers,sync-reviewers,cookie-reviewers,sessionstore-reviewers,tabbrowser-reviewers,places-reviewers,profiler-reviewers,omc-reviewers,migration-reviewers,home-newtab-reviewers,webcompat-reviewers,urlbar-reviewers,permissions-reviewers,firefox-ai-ml-reviewers,profiles-reviewers,robwu,julienw,bytesized,sthompson,valentin,jhirsch,markh,twisniewski,Standard8,dimi,nbarrett,mconley,timhuang"

This reverts commit ba7298d756.

Revert "Bug 1971751 - manual test updates where linter autofix creates issues, r=frontend-codestyle-reviewers,Standard8"

This reverts commit e12e0d3181.
2025-06-26 01:11:00 +00:00
Gijs Kruitbosch ba7298d756 Bug 1971751 - update tests that misuse Assert.ok after no-comparison-or-assignment-inside-ok update, r=frontend-codestyle-reviewers,webdriver-reviewers,extension-reviewers,settings-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,search-reviewers,devtools-reviewers,sync-reviewers,cookie-reviewers,sessionstore-reviewers,tabbrowser-reviewers,places-reviewers,profiler-reviewers,omc-reviewers,migration-reviewers,home-newtab-reviewers,webcompat-reviewers,urlbar-reviewers,permissions-reviewers,firefox-ai-ml-reviewers,profiles-reviewers,robwu,julienw,bytesized,sthompson,valentin,jhirsch,markh,twisniewski,Standard8,dimi,nbarrett,mconley,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D253662
2025-06-26 00:07:43 +00:00
Alexandre Poirot 95222ec51e Bug 1970328 - [devtools] Remove DevToolsLoader's invisibleToDebugger flag. r=devtools-reviewers,jdescottes
This flag was only used by the allocation tracker test and we can now rely on the
DevTools global spawn by mozJSModuleLoader.

Differential Revision: https://phabricator.services.mozilla.com/D253049
2025-06-11 16:01:34 +00:00
Mark Banner 3cc3379c8f Bug 1881701 - Change the devtools configurations to work with the ESLint flat configuration.r=devtools-reviewers,profiler-reviewers,julienw,nchevobbe
This consolidates the jest environment definition, and the xpcshell globals into the devtools/.eslintrc.mjs file, for easier configurations.
It also changes the restart of the configurations to work with flat config.

Differential Revision: https://phabricator.services.mozilla.com/D249948
2025-05-24 17:10:59 +00:00
Mark Banner d7c7c5369b Bug 1881701 - Rename many ESLint files to use .mjs. r=frontend-codestyle-reviewers,perftest-reviewers,Gijs,sparky,webcompat-reviewers,twisniewski
This is separate to help preserve history of the files.

Differential Revision: https://phabricator.services.mozilla.com/D249945
2025-05-24 17:10:51 +00:00
Joel Maher ce1cae83af Bug 1959269 - clean and standardize devtools/**/xpcshell.toml. r=aryx,devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D244831
2025-04-15 14:47:07 +00:00
Nicolas Chevobbe 65d0aa02d0 Bug 1904752 - [devtools] Fix handling of single-char quote in InspectorCSSParserWrapper#performEOFFixup. r=devtools-reviewers,jdescottes.
When tracking tokens, we weren't handling the case of unterminated,
single-char quote.
Test cases are added to cover the fix.

Differential Revision: https://phabricator.services.mozilla.com/D214917
2024-06-26 17:30:37 +00:00
Alexandre Poirot eeadbc4866 Bug 1651518 - [devtools] Ensure spawning DistinctSystemPrincipalLoader.sys.mjs only once. r=devtools-reviewers,nchevobbe
This is important to spawn this ESM only once between regular and browser toolbox,
and especially between various callsites used by the browser toolbox.
Otherwise we may start loading modules in two distinct system loaders
and may have inconsistancies when using `instanceof`.

Differential Revision: https://phabricator.services.mozilla.com/D207432
2024-05-27 09:53:54 +00:00
Cristian Tuns d0272b92b7 Backed out 8 changesets (bug 1651518, bug 1883847) dt failures in nsTArray.h. CLOSED TREE
Backed out changeset 481558275c1d (bug 1651518)
Backed out changeset 5337435e8bca (bug 1651518)
Backed out changeset 8fe0c1a4da7f (bug 1651518)
Backed out changeset 840a0d9db260 (bug 1651518)
Backed out changeset eaab9de5819d (bug 1651518)
Backed out changeset cf71de92d782 (bug 1651518)
Backed out changeset d778691464db (bug 1651518)
Backed out changeset af28e5f719e8 (bug 1883847)
2024-05-22 09:02:19 -04:00
Alexandre Poirot 34e5032104 Bug 1651518 - [devtools] Ensure spawning DistinctSystemPrincipalLoader.sys.mjs only once. r=devtools-reviewers,nchevobbe
This is important to spawn this ESM only once between regular and browser toolbox,
and especially between various callsites used by the browser toolbox.
Otherwise we may start loading modules in two distinct system loaders
and may have inconsistancies when using `instanceof`.

Differential Revision: https://phabricator.services.mozilla.com/D207432
2024-05-22 11:50:44 +00:00
Cristina Horotan ca70119cfa Backed out 8 changesets (bug 1651518, bug 1883847) for causing damp failures at toolbox/browser-toolbox.js CLOSED TREE
Backed out changeset 4ec70db12f48 (bug 1651518)
Backed out changeset b2b138889ad6 (bug 1651518)
Backed out changeset efda5c09b0ea (bug 1651518)
Backed out changeset b0de4113f8fb (bug 1651518)
Backed out changeset 03cf235d2a80 (bug 1651518)
Backed out changeset 58e71c27f1fd (bug 1651518)
Backed out changeset f7fb390c3965 (bug 1651518)
Backed out changeset b8a2473c47c0 (bug 1883847)
2024-05-22 04:00:53 +03:00
Alexandre Poirot 3d2406db93 Bug 1651518 - [devtools] Ensure spawning DistinctSystemPrincipalLoader.sys.mjs only once. r=devtools-reviewers,nchevobbe
This is important to spawn this ESM only once between regular and browser toolbox,
and especially between various callsites used by the browser toolbox.
Otherwise we may start loading modules in two distinct system loaders
and may have inconsistancies when using `instanceof`.

Differential Revision: https://phabricator.services.mozilla.com/D207432
2024-05-21 14:09:33 +00:00
Nicolas Chevobbe 8384623980 Bug 1892901 - [devtools] Remove performEOFFixup preserveBackslash parameter. r=devtools-reviewers,bomsy.
The parameter was always passed with true,
except in a unit test.

Differential Revision: https://phabricator.services.mozilla.com/D208320
2024-04-30 05:12:54 +00:00
Nicolas Chevobbe 5532aef13b Bug 1892895 - [devtools] Remove JS CSS Lexer. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D208318
2024-04-26 09:18:12 +00:00
Nicolas Chevobbe 0abfb7c1f9 Bug 1889363 - [devtools] Implement performEOFFixup for InspectorCSSParser. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D206748
2024-04-23 08:43:03 +00:00
Nicolas Chevobbe 46f2af8bba Bug 1887638 - [devtools] Expose CSS token value in InspectorCSSToken. r=emilio.
In some cases, it can be more useful to only get the token value than the whole
token text (e.g. for 'Function`, where the value is the function name, while
the text includes the opening parenthesis)
Refactor `test_lexer` to better test the tokens we get, including their value property.

Differential Revision: https://phabricator.services.mozilla.com/D207400
2024-04-15 17:14:43 +00:00
Nicolas Chevobbe 8609258f9f Bug 1887638 - [devtools] Add InspectorCSSParser. r=emilio,devtools-reviewers,frontend-codestyle-reviewers,bomsy.
This new InspectorCSSParser makes use of the cssparser crate so DevTools end
up using the same code as the CSS engine.
At the moment, we can't get the token start and end offsets, so we create
a JS wrapper class to compute them in JS. This might be removed if we get
a way to retrieve utf16 position from the cssparser.
The existing lexer xpcshell test is modified so it can run against both js-based
and rust-based lexers.

Differential Revision: https://phabricator.services.mozilla.com/D202909
2024-04-15 17:14:42 +00:00
Dave Townsend 2af4d349f3 Bug 1864896: Autofix unused function arguments (devtools). r=profiler-reviewers,devtools-reviewers,nchevobbe,julienw
Differential Revision: https://phabricator.services.mozilla.com/D202959
2024-03-05 14:21:15 +00:00
Tooru Fujisawa 0791e8d3c4 Bug 1875639 - Part 1: Use global option instead of loadInDevToolsLoader option. r=ochameau,devtools-reviewers
global option supercedes loadInDevToolsLoader, with omitting the
implicit contextual loader behavior.
In order to make the API less error-prone, use global option, with requireing
global option in DevTools global, to choose from shared global or explicit
contextual loader.

Differential Revision: https://phabricator.services.mozilla.com/D199466
2024-02-20 04:49:57 +00:00
Tooru Fujisawa 27fcce53e4 Bug 1836480 - Part 3: Rewrite consumers of XPIProvider.jsm, XPIDatabase.jsm, and XPIInstall.jsm. r=robwu,application-update-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D199793
2024-01-31 20:07:28 +00:00
Gijs Kruitbosch 3288f177a4 Bug 1780071 - autofix devtools/ violations of no-comparison-or-assignment-inside-ok r=profiler-reviewers,devtools-reviewers,julienw,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D198975
2024-01-26 13:12:07 +00:00
Nicolas Chevobbe 2711398289 Bug 1864842 - [devtools] Remove devtools/shared/defer.js . r=devtools-reviewers,ochameau.
This can now be replaced with native Promise.withResolvers,
so we can remove our custom implementation module.

Differential Revision: https://phabricator.services.mozilla.com/D198033
2024-01-10 06:30:28 +00:00
Mark Banner a7b0c4e22e Bug 1872673 - Remove 'console' export from Console.sys.mjs, use alternative logging where required. r=mossop,devtools-reviewers,nchevobbe
Depends on D197502

Differential Revision: https://phabricator.services.mozilla.com/D197503
2024-01-02 17:38:55 +00:00
Jonathan Watt 61ff6ba12e Bug 1866011 p2. Rename nsIDocShell.contentViewer. r=emilio,credential-management-reviewers,devtools-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D194370
2023-11-24 09:10:52 +00:00
Jonathan Watt 839fe1be5d Bug 1865995 p6. Rename createAboutBlankContentViewer to match nsIDocumentViewer's new name. r=emilio,webdriver-reviewers,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D194340
2023-11-23 21:35:21 +00:00
Joel Maher cac31d18e3 Bug 1859873 - batch 13 xpcshell.ini -> .toml. r=aryx,devtools-reviewers,profiler-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D194161
2023-11-21 12:32:50 +00:00
Vinny Diehl e4c35302d5 Bug 1617562 - Allow unknown words at beginning of Date string r=arai,devtools-reviewers,ochameau
They are also allowed after the month name, e.g. "Sep foo 26 1995".

These "unknown words" are supposed to be day of week, or abbreviations
of them, but they can be anything really.

We need to run telemetry before dropping explicit support for day of
week in later parts of the date string.

Differential Revision: https://phabricator.services.mozilla.com/D192560
2023-11-08 02:14:07 +00:00
Natalia Csoregi 097a124484 Backed out changeset 2516d38fcdfa (bug 1617562) for causing leaks on jsdate.cpp. CLOSED TREE 2023-11-07 09:12:23 +02:00
Vinny Diehl 84868e6065 Bug 1617562 - Allow unknown words at beginning of Date string r=arai,devtools-reviewers,ochameau
They are also allowed after the month name, e.g. "Sep foo 26 1995".

These "unknown words" are supposed to be day of week, or abbreviations
of them, but they can be anything really.

We need to run telemetry before dropping explicit support for day of
week in later parts of the date string.

Differential Revision: https://phabricator.services.mozilla.com/D192560
2023-11-07 04:37:03 +00:00
Vinny Diehl b9efeb19ea Bug 449921 - Loosen requirements for characters directly following numbers r=arai,devtools-reviewers,nchevobbe
This patch newly allows cases such as MonDDYYYY and Mon.DD.YYYY.
In adding tests for this patch, I noticed that the tests for parsing
periods were broken and could not fail the way that they were written,
so I fixed them.

This patch also fixes a couple of other standing bugs...

fixes Bug 485639 - for cases like "Aug 15 2015 10:00am"
fixes Bug 1760290 - for YYYY.MM.DD

Differential Revision: https://phabricator.services.mozilla.com/D186054
2023-09-27 09:52:46 +00:00
Alexandre Poirot 27f68e6323 Bug 1320607 - [devtools] Remove the generated CSS Properties database. r=devtools-reviewers,nchevobbe
This wasn't really used anymore.
We are fetching the database from the server runtime in order to support
remote debugging correctly, where frontend CSS may be different from debuggee CSS.

Differential Revision: https://phabricator.services.mozilla.com/D187492
2023-09-07 20:59:34 +00:00
Butkovits Atila 76e7dfa668 Backed out changeset fb19de542f01 (bug 1320607) for causing python failures complaining about test_devtools_database_parsing . CLOSED TREE 2023-09-07 18:58:05 +03:00
Alexandre Poirot 7198ba3de1 Bug 1320607 - [devtools] Remove the generated CSS Properties database. r=devtools-reviewers,nchevobbe
This wasn't really used anymore.
We are fetching the database from the server runtime in order to support
remote debugging correctly, where frontend CSS may be different from debuggee CSS.

Differential Revision: https://phabricator.services.mozilla.com/D187492
2023-09-07 13:08:37 +00:00
Alexandre Poirot 017f627911 Bug 1847753 - [devtools] Stop storing pseudo elements in properties-db. r=devtools-reviewers,nchevobbe
This appears to be unused and only page-actor is reading the list of all pseudo elements
by querying InspectorUtils directly.

Differential Revision: https://phabricator.services.mozilla.com/D185664
2023-08-09 13:30:40 +00:00
Mark Banner 544ecba3af Bug 1837176 - Convert imports of httpd.js to consume the ES module directly. r=necko-reviewers,webcompat-reviewers,extension-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,cookie-reviewers,twisniewski,robwu,issammani,bytesized,pbz,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181159
2023-07-12 13:38:34 +00:00
Nicolas Chevobbe 7eb79052d8 Bug 1838857 - [devtools] Use devtools.editor.tabsize value for space indentation in prettifyCSS. r=devtools-reviewers,ochameau.
We used to only indent with one space when `devtools.editor.expandtab` was true.
Unit test is updated to make sure we do use the pref value now.

Differential Revision: https://phabricator.services.mozilla.com/D181225
2023-06-20 07:42:20 +00:00