301 Commits

Author SHA1 Message Date
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
Nicolas Chevobbe
4914f8c614 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-28 12:27:22 +00:00
Alexandre Poirot
fad9e1690b Bug 1663649 - [devtools] Enable target switching by default. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D91020
2020-09-23 17:50:20 +00:00
Belén Albeza
b6de344d69 Bug 1653998 - View source of worker from the Application panel r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D86039
2020-08-07 12:47:34 +00:00
Nicolas Chevobbe
09e0660397 Bug 1657386 - Use helpers from shared-head to unregister all workers in application panel tests. r=ladybenko.
Differential Revision: https://phabricator.services.mozilla.com/D86024
2020-08-06 14:09:20 +00:00
Belén Albeza
7a05ad3411 Bug 1637538 - Change debug button in the Application panel for a link as per latest UX mockups r=jdescottes,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D85605
2020-08-04 18:36:38 +00:00
Julian Descottes
3af62a1e27 Bug 1472821 - Support array of String for lazyRequireGetter r=nchevobbe,rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D85268
2020-08-03 05:43:59 +00:00
Belén Albeza
b9a48dd19e Bug 1654468 - Disable browser_application_panel_telemetry-start-worker.js on ccov builds r=jdescottes
Temporary fix (disable the test in ccov). Try push at https://treeherder.mozilla.org/#/jobs?repo=try&revision=74aaa873fc61490cbb4699a03b74ca2ce9b29bb8 (still running)

Differential Revision: https://phabricator.services.mozilla.com/D84956
2020-07-27 09:57:06 +00:00
Belén Albeza
0d00aa1f55 Bug 1639605 - Part 2: Add a new ManifestUrlItem component to show manifest URLs correctly in RTL mode r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D84724
2020-07-24 13:25:44 +00:00
Belén Albeza
1fb9f63524 Bug 1639605 - Part 1: Fix display of colors in RTL mode in the Manifest page r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D84723
2020-07-24 13:17:04 +00:00
Belén Albeza
9008f5738e Bug 1652828 - Fix intermittent failure in app panel telemetry tests r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D84324
2020-07-21 10:01:47 +00:00
Belén Albeza
2a6df4a165 Bug 1652828 - Skip browser_application_panel_telemetry-workers.js test in ccov platform r=jdescottes
I'm unsure why this is permafailing in ccov. I'm trying with longer timeouts, but in the meantime maybe it's best to disable the test and keep this bug open while we find what's the root cause. (Try push here https://treeherder.mozilla.org/#/jobs?repo=try&revision=be4007c9a758b76a0c4346a1931c1c61af7cb418 )

Differential Revision: https://phabricator.services.mozilla.com/D83969
2020-07-20 12:23:54 +00:00
Belén Albeza
b6ccf2b611 Bug 1651630 - Part 2: Hide the debug button instead of disabling it r=jdescottes,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D83484
2020-07-16 13:41:24 +00:00
Belén Albeza
295e3aec7c Bug 1651630 - Part 1: Allow start button to work regardless of debugger pref r=jdescottes,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D83482
2020-07-16 13:13:40 +00:00
Narcis Beleuzu
9a1f31493d Backed out changeset aa5b7db30aed (bug 1652828) as req by aa5b7db30aed. DONTBUILD CLOSED TREE 2020-07-20 13:54:46 +03:00
Belén Albeza
636e221168 Bug 1652828 - Remove telemetry test from ccov platform r=jdescottes
I'm unsure why this is permafailing in ccov. I'm trying with longer timeouts, but in the meantime maybe it's best to disable the test and keep this bug open while we find what's the root cause. (Try push here https://treeherder.mozilla.org/#/jobs?repo=try&revision=be4007c9a758b76a0c4346a1931c1c61af7cb418 )

Differential Revision: https://phabricator.services.mozilla.com/D83969
2020-07-17 15:59:43 +00:00
Cameron McCormack
dd61f595eb Bug 1620467 - Part 4: Change internal uses of -moz-appearance to appearance and -moz-default-appearance. r=emilio,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,ntim,agi,miketaylr
Uses of `-moz-appearance: none` are changed to `appearance: none`.

Uses of other values that are simply reverting the appearance back to
its default are changed to `appearance: auto`.

Uses of values in UA sheets that are defining the inherent appearance of
widgets are changed to:

  appearance: auto;
  -moz-default-appearance: <value>;

since those values are either no longer supported on (-moz-)appearance,
or are still supported but only in some limited form.

There are some uses of `-moz-appearance: textfield` on <input
type=number> elements that are renamed to `appearance: textfield`.

Differential Revision: https://phabricator.services.mozilla.com/D83430
2020-07-16 22:04:14 +00:00
Christoph Kerschbaumer
3d7ee5e969 Bug 1652997: Package all devtools css files and load them using the internal chrome: protocol. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D83656
2020-07-15 16:02:28 +00:00
Belén Albeza
ee49d74c3b Bug 1643253 - Part 2: Add telemetry mochitests r=jdescottes,Honza
Differential Revision: https://phabricator.services.mozilla.com/D82047
2020-07-14 07:22:48 +00:00
Belén Albeza
45746dd16b Bug 1643253 - Part 1: Add telemetry middleware to record application panel events r=jdescottes,janerik
Differential Revision: https://phabricator.services.mozilla.com/D82044
2020-07-13 14:58:29 +00:00
Belén Albeza
9eebfc0610 Bug 1635402 - UX polish: empty pages r=jdescottes,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D81362
2020-07-13 15:36:35 +00:00
Julian Descottes
84f6f1cbe2 Bug 1619221 - Stop updating the application panel when multi-e10s changes r=ladybenko
Depends on D81342

See previous revision, same logic applies to the application panel.

Differential Revision: https://phabricator.services.mozilla.com/D81343
2020-07-07 15:19:02 +00:00
Sebastian Hengst
7847e18297 Backed out 3 changesets (bug 1145314) on request from ckerschb for regressions (e.g. bug 1650951)
Backed out changeset 664cc562ddf3 (bug 1145314)
Backed out changeset 9640a9d093c7 (bug 1145314)
Backed out changeset 5492ac0e42f7 (bug 1145314)
2020-07-07 09:32:27 +02:00
Tiger Oakes
601089853c Bug 1605688 - Strip alpha when opaque, r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D82266
2020-07-06 16:34:54 +00:00
Julian Descottes
3e1e4c22b6 Bug 1650155 - Rename PromiseTestUtils.whitelistRejectionsGlobally to allowMatchingRejectionsGlobally r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D82059
2020-07-03 17:01:29 +00:00
Julian Descottes
54f3b99b28 Bug 1645563 - Wrap application panel updateWorkers method in safeAsyncMethod r=ladybenko
Depends on D81677

We recently introduced a modification to updateWorkers in order to swallow errors after destroy.
Since I am suggesting to add a helper to take care of a similar issue in Toolbox::highlight I think we could also apply it here.

Differential Revision: https://phabricator.services.mozilla.com/D81679
2020-07-02 16:15:03 +00:00
Christoph Kerschbaumer
5c8e547bd8 Bug 1145314: Package all devtools css files and load them using the internal chrome: protocol. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D78896
2020-07-03 08:12:22 +00:00
Narcis Beleuzu
9d8472510e Backed out 2 changesets (bug 1145314) for mochitest failures on test_bug995943.xhtml . CLOSED TREE
Backed out changeset 0500cb344e6f (bug 1145314)
Backed out changeset f524ffe669ca (bug 1145314)
2020-07-02 20:50:46 +03:00