Граф коммитов

328 Коммитов

Автор SHA1 Сообщение Дата
Mark Banner 4fcd8b1d2b Bug 1812977 - Remove now unnecessary import-globals-from statements in devtools. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D168071
2023-01-30 19:33:38 +00:00
Alexandre Poirot 1e099ff9c8 Bug 1807898 - [devtools] Remove all callsites passing a now-useless telemetry sessionId. r=devtools-reviewers,nchevobbe
Note that there is still one leftover usage of sessionId related to performance markers,
which isn't related to telemetry... but a way to distinguish toolbox instances.

Differential Revision: https://phabricator.services.mozilla.com/D165936
2023-01-04 18:28:33 +00:00
Alexandre Poirot d9265023c4 Bug 1807898 - [devtools] Reuse toolbox's Telemetry instance from all panels. r=devtools-reviewers,nchevobbe
This was slightly more tricky in the debugger as the toolbox's telemetry should be provided to the telemetry module.

Differential Revision: https://phabricator.services.mozilla.com/D165934
2023-01-04 18:28:33 +00:00
Ryan VanderMeulen 5bdcb81ec5 Bug 1807238 - Enable TSAN mochitest-devtools by default. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D165462
2022-12-23 22:20:27 +00:00
Mark Banner 9189ff3f6f Bug 1798018 - Convert consumers of toolkit/modules/tests to import ES modules direct. r=Gijs,webdriver-reviewers,extension-reviewers,settings-reviewers,credential-management-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D160664
2022-11-01 13:26:38 +00:00
Alexandre Poirot a6539ba47e Bug 1793604 - [devtools] Convert Loader.jsm to ESM. r=perftest-reviewers,geckoview-reviewers,preferences-reviewers,owlish,kshampur,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D158582
2022-10-14 12:19:42 +00:00
Alexandre Poirot 3b29f7936d Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/application. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D158371
2022-09-30 15:17:35 +00:00
Alexandre Poirot 8c0ef6b298 Bug 1789980 - [devtools] Migrate all callsites using require("chrome") to use Components.* global symbols. r=jdescottes,perftest-reviewers,AlexandruIonescu
This will help transition to ES Modules as we won't be able to expose a magic "chrome" ESM.
Also, most of these symbols are exposed as global already.
All but:
* `components` which is `Components`,
* `CC` which is `Components.Constructor`,
* `Cm` which is `Components.manager`.

$ sed -ie "/require(.chrome.)/d" $(git grep -l 'require("chrome")' devtools/)
+ manual edits for all three exceptions

Differential Revision: https://phabricator.services.mozilla.com/D156936
2022-09-20 12:52:27 +00:00
Alexandre Poirot 7f9229d43d Bug 1789201 - [devtools] Expose Services as a global to all DevTools modules. r=perftest-reviewers,nchevobbe,julienw,AlexandruIonescu
This will help transition to ES Modules as this symbol is exposed to them.

$ sed -ie "/require(.Services.)/d" $(git grep -l 'require("Services")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .Services./d" $(git grep -l 'loader.lazyRequireGetter(this, "Services"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js
+ manual eslint fixes
+ removal of devtools-services in the debugger, except for jest tests

Differential Revision: https://phabricator.services.mozilla.com/D156401
2022-09-09 07:22:51 +00:00
justchen1369 4743055749 Bug 1789765 - Fix broken links to 'Fluent for Firefox Developers' page. r=firefox-source-docs-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D156761
2022-09-08 19:03:25 +00:00
Mark Banner c83937cb5a Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for devtools. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D155167
2022-08-26 13:39:34 +00:00
Mark Banner a6855db57e Bug 1330099 - Enable object-shorthand eslint rule. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D153567
2022-08-03 14:57:05 +00:00
Alexandre Poirot 0df77da252 Bug 1759987 - [devtools] Drop assertPausedLocation in favor of assertPausedAtSourceAndLine. r=bomsy
The previous method wasn't really asserting the paused location.
In only ensured that reducer state was matching CodeMirror state.

Differential Revision: https://phabricator.services.mozilla.com/D141355
2022-03-23 18:17:50 +00:00
Alexandre Poirot 98d9426cf5 Bug 1755951 - [devtools] Prepare for the enabling of eslint on debugger tests. r=nchevobbe
After this patch, we only need to remove the ignore from /.eslintignore.

My goal originaly was to simply add `import-globals-from` comments in helpers.js
But because of cross dependencies between head.js and helpers.js, it wasn't so trivial.
I first tried to merge them into a unique head.js, but the EXAMPLE_URL symbol
should not be imported by tests external to the debugger.
So I aligned debugger to the common practice of naming the shared head file... shared-head.js!
Like the inspector is doing.
I also merged helpers/context.js into shared-head.js to simplify things a bit.

Because of that I had to tweak many tests outside of the debugger.

Differential Revision: https://phabricator.services.mozilla.com/D139099
2022-02-22 11:55:43 +00:00
Julian Descottes 212faeb0c3 Bug 1741369 - [devtools] Update paths to loader files in devtools/ r=ochameau
Depends on D131216

Differential Revision: https://phabricator.services.mozilla.com/D131217
2021-11-17 12:43:26 +00:00
Geoff Lankow 58b170669d Bug 1698112 - Stop referencing browser files from toolkit, and prevent it happening again with a test. r=preferences-reviewers,mossop
Differential Revision: https://phabricator.services.mozilla.com/D128974
2021-10-21 21:54:52 +00:00
Joel Maher fed2831742 Bug 1727943 - turn on mochitest* tests that were skipped on win10-ccov and now pass. r=MasterWayZ
Differential Revision: https://phabricator.services.mozilla.com/D128817
2021-10-19 20:01:29 +00:00
Michelle Goossens c159e29e05 Bug 1727943 - Part 2: Migrate mochitest, reftest and crashtest Windows 10 ccov suites from AWS to Azure r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D125350
2021-09-28 15:27:39 +00:00
Alexandre Poirot 3b693fede5 Bug 1727323 - [devtools] Enable bfcache in parent in tests that have been fixed thanks to server targets. r=bomsy
All these tests most likely have been fixed with the enabling of server targets.
Because bfcache in parent was introducing more cross process navigations,
being initiated from the server, having the support of server targets was uterly
important to support bfcacheInParent.

Differential Revision: https://phabricator.services.mozilla.com/D123448
2021-08-25 17:16:27 +00:00
Nicolas Chevobbe f9424a6c1e Bug 1725362 - [devtools] Fix browser_application_panel_manifest-reload intermittent. r=ladybenko.
The test was waiting for a loading message, and then a failed loading message.
It looks like if the loading fails quickly enough, the UI won't show the loading message.
It makes sense to only check the final state (i.e. failed loading), so we can remove
the check on the loading part.

Differential Revision: https://phabricator.services.mozilla.com/D122447
2021-08-12 14:57:03 +00:00
Christoph Kerschbaumer 4a6250387f Bug 1719272: Annotate failing browser/ tests to potentially enable https-first mode in Nightly r=webcompat-reviewers,denschub,webdriver-reviewers,preferences-reviewers,Gijs,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D119177
2021-07-28 19:16:16 +00:00
Sandor Molnar 68cdec0548 Backed out changeset 7eb8945dd8e3 (bug 1719272) for causing bustages in gecko decision task. CLOSED TREE 2021-07-28 19:47:06 +03:00
Christoph Kerschbaumer bb716f0701 Bug 1719272: Annotate failing browser/ tests to potentially enable https-first mode in Nightly r=webcompat-reviewers,denschub,webdriver-reviewers,preferences-reviewers,Gijs,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D119177
2021-07-28 16:08:07 +00:00
Alexandre Poirot 55c97cfe2d Bug 1715910 - [devtools] Use DOCUMENT_EVENT's dom-complete event in the application panel. r=ladybenko
With this change, we no longer need to track targets.

Differential Revision: https://phabricator.services.mozilla.com/D117514
2021-06-17 15:35:43 +00:00
Olli Pettay 25600c7409 Bug 1715877 - Disable bfcache-in-parent when running devtools/client/application/test/browser/browser_application_panel_list-domain-workers.js, r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D117460
2021-06-10 22:18:07 +00:00
Olli Pettay 4faa8c8e72 Bug 1715880 - Disable bfcache-in-parent when running devtools/client/application/test/browser/browser_application_panel_list-several-workers.js, r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D117461
2021-06-10 22:17:40 +00:00
Alexandre Poirot 2466a0adea Bug 1712686 - [devtools] Pull DevToolsClient from commands object instead of target fronts. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D115862
2021-05-26 08:23:34 +00:00
Julian Descottes 4f9e9360fc Bug 1702061 - [devtools] Remove isPanelReady flag and devtools-panel-ready from DevTools panel instances r=nchevobbe
Depends on D110368
Both the flag and the event are not used.
The only thing which matters from the framework perspective is to wait for panel.open to resolve.

Differential Revision: https://phabricator.services.mozilla.com/D110369
2021-03-31 12:41:44 +00:00
Julian Descottes 7a570555f5 Bug 1702061 - [devtools] Rename panel ready event to devtools-panel-ready r=nchevobbe
Depends on D110367

Initial cleanup before removal.

Differential Revision: https://phabricator.services.mozilla.com/D110368
2021-03-31 12:41:43 +00:00
Julian Descottes 116dd052e8 Bug 1702061 - [devtools] rename panel isReady to isPanelReady r=nchevobbe
Initial cleanup to make the future removal easier to review

Differential Revision: https://phabricator.services.mozilla.com/D110367
2021-03-31 12:41:43 +00:00
Alexandre Poirot ed6eb0f3ae Bug 1696372 - [devtools] Migrate application panel from toolbox.targetList to commands.TargetCommand. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D110206
2021-03-30 21:29:37 +00:00
Alexandre Poirot ded026f627 Bug 1700106 - [devtools] Remove now-useless eslint files related to mochitests. r=jdescottes,Standard8
I kept a few having some overrides. But they may be irrelevant.
And I kept some eslint files for all folder that aren't matching the pattern matching "**/test*/**/browser*/".
Ideally we would rename these folder to match.

Last but not least, I identified one case where we were using mochitest file for xpcshell tests!

Differential Revision: https://phabricator.services.mozilla.com/D109481
2021-03-23 15:51:18 +00:00
Butkovits Atila d2cf27fdd3 Bug 1654354 - disable browser_application_panel_telemetry-debug-worker.js for frequent failures. r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D107376
2021-03-13 22:37:56 +00:00
Alexandre Poirot ac04c532a5 Bug 1691681 - [devtools] Introduce "commands" in order to ease calling global commands throught the Watcher. r=nchevobbe,bomsy,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D97575
2021-03-03 17:02:42 +00:00
Julian Descottes d9b1d58f33 Bug 1694140 - [devtools] Stop using TargetFactory forTab in devtools browser mochitests r=nchevobbe
Depends on D105999

This patch is mostly a mechanical rewrite of:
```lang=javascript
const target = await TargetFactory.forTab(tab);
const toolbox = await gDevTools.showToolbox(target, "inspector");
```
to
```lang=javascript
const toolbox = await gDevTools.showToolboxForTab(tab, { toolId: "inspector" });
```

The main changes are:
- if the target was actually used in the test, it is now retrieved from toolbox.target
- the arguments for showToolboxForTab are using an option argument, to avoid the occasional showToolbox("inspector", null, null, null, startTime, null, reason);

I suspect that any signature rewrite mistake would have been caught on try.
There a few less mechanical changes:
- devtools/client/framework/test/browser_toolbox_screenshot_tool.js the toolId "console" was omitted because this id doesn't match any tool (author probably meant "webconsole")
- a few tests were: 1/ first creating a target, 2/ looping on tool definitions to get supported tools 3/ opening the toolbox with each supported tool. To support this I extracted a helper called `getSupportedToolIds` which opens a temporary toolbox to list all supported tool ids
- all the tests under storage/ use a single helper to start the test, which can open toolboxes for both tab targets and other targets. This made it more complicated to refactor. We could also drop this part and just refactor each test when we actually modify forTab/showToolbox to only work with descriptors

All in all the goal of this stack is to pave the way to stop handling targets when using forTab/showToolbox, and behind the scenes stop replying on targets to cache open toolboxes. We don't aim to kill all the call sites, just get them to a smaller number so that the next refactors will be easier.

Differential Revision: https://phabricator.services.mozilla.com/D106000
2021-02-25 18:02:52 +00:00
Brindusan Cristian 39abcde940 Backed out 10 changesets (bug 1694140, bug 1694886, bug 1688688) for devtools failures on browser_CORS-console-warnings.js. CLOSED TREE
Backed out changeset 1b7367a27d9a (bug 1694886)
Backed out changeset d5a70a3143ad (bug 1694140)
Backed out changeset 74adaced5c0a (bug 1694140)
Backed out changeset 0b8f857e3f90 (bug 1694140)
Backed out changeset 45a8dc952aba (bug 1694140)
Backed out changeset 299f17e9cb6f (bug 1694140)
Backed out changeset 6beb9dd48ef3 (bug 1694140)
Backed out changeset 5f6688e8fe4c (bug 1694140)
Backed out changeset ae1fa0484c91 (bug 1688688)
Backed out changeset 8a0f5c24ed9a (bug 1688688)
2021-02-25 16:07:39 +02:00
Julian Descottes 982c525960 Bug 1694140 - [devtools] Stop using TargetFactory forTab in devtools browser mochitests r=nchevobbe
Depends on D105999

This patch is mostly a mechanical rewrite of:
```lang=javascript
const target = await TargetFactory.forTab(tab);
const toolbox = await gDevTools.showToolbox(target, "inspector");
```
to
```lang=javascript
const toolbox = await gDevTools.showToolboxForTab(tab, { toolId: "inspector" });
```

The main changes are:
- if the target was actually used in the test, it is now retrieved from toolbox.target
- the arguments for showToolboxForTab are using an option argument, to avoid the occasional showToolbox("inspector", null, null, null, startTime, null, reason);

I suspect that any signature rewrite mistake would have been caught on try.
There a few less mechanical changes:
- devtools/client/framework/test/browser_toolbox_screenshot_tool.js the toolId "console" was omitted because this id doesn't match any tool (author probably meant "webconsole")
- a few tests were: 1/ first creating a target, 2/ looping on tool definitions to get supported tools 3/ opening the toolbox with each supported tool. To support this I extracted a helper called `getSupportedToolIds` which opens a temporary toolbox to list all supported tool ids
- all the tests under storage/ use a single helper to start the test, which can open toolboxes for both tab targets and other targets. This made it more complicated to refactor. We could also drop this part and just refactor each test when we actually modify forTab/showToolbox to only work with descriptors

All in all the goal of this stack is to pave the way to stop handling targets when using forTab/showToolbox, and behind the scenes stop replying on targets to cache open toolboxes. We don't aim to kill all the call sites, just get them to a smaller number so that the next refactors will be easier.

Differential Revision: https://phabricator.services.mozilla.com/D106000
2021-02-25 12:58:14 +00:00
Abhishek Sharma 2086f68cb0 Bug 1685638 - Change :not(:disabled) to :enabled in CSS files. r=ntim
Differential Revision: https://phabricator.services.mozilla.com/D101130
2021-01-19 14:02:38 +00:00
Nicolas Chevobbe 6bdda30b67 Bug 1557247 - [devtools] Share node global shims and mocks across panels. r=bomsy.
This patch adds a shared-node-helper function that, for now,
exposes a single setMocksInGlobal function. This function
adds node global missing apis (e.g. requestAnimationFrame, indexedDB, ...),
and is called from the different node setup files, than can then be cleaned up.
For some reason, a debugger test had to be updated to pass.

Differential Revision: https://phabricator.services.mozilla.com/D99471
2021-01-12 07:08:21 +00:00
Nicolas Chevobbe ec7fee5e53 Bug 1557247 - [devtools] Share jest config and fixtures across panels. r=ladybenko.
This creates a new devtools/client/shared/test-helpers folder in which we add
a share jest config, which define a `moduleNameMapper` option with all the
different fixtures that were used in the codebase.

The fixtures were moved from different panels to a jest-fixtures folder and
the one that were left unused are removed.
Some fixtures file needed to be modified to satisfy eslint rules.

Differential Revision: https://phabricator.services.mozilla.com/D99470
2021-01-12 12:32:12 +00:00
Neil Deakin 42167e0a0f Bug 1672390, remove message manager and frame scripts from devtools/client/performance, r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94388
2020-10-27 00:26:14 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Ben Delevingne 3dfaad2d7f Bug 1582699 - [devtools] Consolidate thunk middlewares. r=nchevobbe
Merge `thunk-with-options` behavior directly into `thunk`, update `thunk` and `thunk-with-options` callsites and finally remove now unused `thunk-with-options` (as well as netmonitor's own `thunk`)

Depends on D92888

Differential Revision: https://phabricator.services.mozilla.com/D93195
2020-10-13 07:45:52 +00:00
Ben Delevingne 14aa4fcf8e Bug 1582699 - [devtools] Update thunk actions to take an object as an argument. r=nchevobbe
In short, thunk actions are changing from a signature with 2 parameters (dispatch and getState): `(dispatch, getState)`, to an object that contains those properties: `({ dispatch, getState })`.
This is done so we can merge thunk and thunk-with-options

Differential Revision: https://phabricator.services.mozilla.com/D92888
2020-10-13 07:48:12 +00:00
Nicolas Chevobbe f315ff58cd Bug 1573779 - [devtools] Rename WorkerTarget to WorkerDescriptor. r=ochameau,jdescottes,devtools-backward-compat-reviewers.
This renames the current WorkerTargetActor which is actually a descriptor.
We also rename the existing `workerTargetFront` occurences to `workerDescriptorFront`
to avoid confusion when we do introduce the real worker fronts and actors.

Differential Revision: https://phabricator.services.mozilla.com/D91100
2020-09-29 14:30:24 +00:00
Dorel Luca f826d52619 Backed out 3 changesets (bug 1573779, bug 1662734) for Geckoview failures. CLOSED TREE
Backed out changeset 0adff4f08b28 (bug 1662734)
Backed out changeset c6bb84f2a032 (bug 1573779)
Backed out changeset 0c605800aa6b (bug 1573779)
2020-09-29 12:59:39 +03:00