Commit Graph
60 Commits
Author SHA1 Message Date
Alexandra Borovova 574778d7e5 Bug 2005054 - [devtools] Extract "formatMessageParametersAndText" into a shared module to make it easier to reuse in WebDriver BiDi. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D289754
2026-03-31 09:40:31 +00:00
Alexandre Poirot 26260731f1 Bug 1953578 - [devtools] Migrate all usage of react CommonJS module to the ES Module version and remove the CommonJS version. r=devtools-reviewers,profiler-reviewers,nchevobbe,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D241593
2025-03-19 13:30:51 +00:00
Alexandre Poirot 35e7d6f96b Bug 1929387 - [devtools] Remove other node tests involving reps. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D230121
2025-03-05 17:05:57 +00:00
Nicolas Chevobbe 5b785e0419 Bug 1933905 - [devtools] Turn page-error.test.js into a mochitest. r=devtools-reviewers,ochameau.
We still need to keep the page error stubs because they're used in other tests,
but we remove all the ones that were solely used in pageError.js

Differential Revision: https://phabricator.services.mozilla.com/D230517
2024-11-29 08:07:30 +00:00
Alexandre Poirot df9fea0485 Bug 1901644 - [devtools] Uncapsulate CONSOLE_MESSAGE resource. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D213225
2024-06-18 18:33:18 +00:00
Nicolas Chevobbe e249389848 Bug 1844087 - [devtools] Make SearchBox input described by summary element. r=devtools-reviewers,accessibility-frontend-reviewers,ochameau,ayeddi.
This should allow the number of hidden messages to be notified to
screen reader users.
We update the Console FilterBar behavior to always show the "X hidden" message
when the input is focused, so screen reader can also pick up when no messages
are hidden.

Differential Revision: https://phabricator.services.mozilla.com/D213181
2024-06-17 06:31:26 +00:00
Nicolas Chevobbe 8a13e46e2e Bug 1901942 - [devtools] Remove unused FilterCheckbox component. r=devtools-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D213391
2024-06-12 11:54:38 +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
Alexandre Poirot 75fcbff4a7 Bug 1875045 - [devtools] Release Object actors by bulk. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
For now we were releasing object actors one by one.
This would force to send an individual RDP request for each of them.
The console often release all objects actors related to older console message
going over the maximum limit of displayed console messages (10k).
This can easily grow in a large number of actors to be released,
either if console message are receiving many arguments and/or
if many console are logged.

We have to have one request per target as the actors could only be reached
within same-thread actor.
In order to prepare for ObjectFront removal, introduce a target-scoped "Objects" actor
which is a singleton per Target. It will receive the new "release in bulk objects actors"
method. Later, it will start implementing all the existing methods of the Object Actor
in order to migrate away from having to instantiate one Object Front (notice the singular on "Object"),
per inspected JS Object.

On the fronted side a new Object Command is introduced in order to abstract away the RDP/Fronts work.

Differential Revision: https://phabricator.services.mozilla.com/D198784
2024-01-29 13:59:51 +00:00
Iulian Moraru f78b22948f Backed out 2 changesets (bug 1875045) for causing dt failures on browser_webconsole_console_logging_workers_api.js. CLOSED TREE
Backed out changeset 533ecc686bac (bug 1875045)
Backed out changeset f4ac089ead5a (bug 1875045)
2024-01-26 16:09:31 +02:00
Alexandre Poirot 3574d88b24 Bug 1875045 - [devtools] Release Object actors by bulk. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
For now we were releasing object actors one by one.
This would force to send an individual RDP request for each of them.
The console often release all objects actors related to older console message
going over the maximum limit of displayed console messages (10k).
This can easily grow in a large number of actors to be released,
either if console message are receiving many arguments and/or
if many console are logged.

We have to have one request per target as the actors could only be reached
within same-thread actor.
In order to prepare for ObjectFront removal, introduce a target-scoped "Objects" actor
which is a singleton per Target. It will receive the new "release in bulk objects actors"
method. Later, it will start implementing all the existing methods of the Object Actor
in order to migrate away from having to instantiate one Object Front (notice the singular on "Object"),
per inspected JS Object.

On the fronted side a new Object Command is introduced in order to abstract away the RDP/Fronts work.

Differential Revision: https://phabricator.services.mozilla.com/D198784
2024-01-26 10:41:43 +00:00
Nicolas Chevobbe 9a88c4becd Bug 1844091 - [devtools] Add proper labels to evaluation and evaluation result message icons. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D189332
2023-09-29 05:23:22 +00:00
Tooru Fujisawa 8c4bd5d59d Bug 1846913 - Part 1: Use 1-origin column number for compile errors, compile wanring, and error notes. r=iain,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185370
2023-08-11 08:11:48 +00:00
Mark Banner 91fde42f7b Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Nicolas Chevobbe 484e6f8a71 Bug 1777608 - [devtools] Change how we render cropped URLs in String rep. r=bomsy.
Instead of rendering the cropped URL, we split the URL in 3 parts, so the full
URL text will be in the DOM, but we visually hide the middle part and replace
it with an ellipsis.
This way copying the message will still put the full URL in the clipboard.
A test case is added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D165805
2023-02-13 16:01:21 +00:00
Nicolas Chevobbe 4cf60bdd90 Bug 1543012 - [devtools] Migrate console node test to jest. r=jdescottes.
This makes the console behave like the other React panels.
We can also get rid of the specific bits for mocha in devtools-node-test-runner.js

Differential Revision: https://phabricator.services.mozilla.com/D167233
2023-01-19 14:55:39 +00:00
Alexandre Poirot 465fac9684 Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/webconsole. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D158380
2022-09-30 15:17:40 +00:00
Nicolas Chevobbe 2d526bc067 Bug 1780418 - [devtools] Remove .only call in eager-ealuation.test.js. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D152280
2022-07-20 15:18:32 +00:00
Nicolas Chevobbe 1c33930d57 Bug 1780134 - [devtools] Guard EagerEvaluation rendering on undefined terminalEagerResult. r=jdescottes.
This was only _not_ rendering when `terminalEagerResult` was `null`, but with
Bug 1776376, we're getting `undefined` results in some case, which was crashing
the component.
While this should be fixed at an upper level, this patch makes the component a bit
more robust so we don't crash the whole console client.
A node test is added for basic rendering with various result values, and proper
mochitest will be added in follow-up patches in this queue.

Differential Revision: https://phabricator.services.mozilla.com/D152161
2022-07-19 12:28:38 +00:00
Hubert Boma Manilla bdf7d13e3a Bug 1775058 - [devtools] Add support for custom titles to MessageIcon r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D150474
2022-07-04 17:18:49 +00:00
Hubert Boma Manilla c81fa5cbf5 Bug 1764348 - Cleanup hidePersistLogsCheckbox and hideShowContentMessagesCheckbox property r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D145550
2022-06-06 13:56:05 +00:00
Iulian Moraru c9a321526f Backed out 4 changesets (bug 1764348, bug 1771277) for causing multiple dt failures. CLOSED TREE
Backed out changeset 21c03813c9d0 (bug 1771277)
Backed out changeset 0ee89f81d7da (bug 1764348)
Backed out changeset 47658c248d9e (bug 1764348)
Backed out changeset 712947c3a514 (bug 1764348)
2022-06-02 23:13:28 +03:00
Hubert Boma Manilla 3c574a5ef9 Bug 1764348 - Cleanup hidePersistLogsCheckbox and hideShowContentMessagesCheckbox property r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D145550
2022-06-02 14:35:24 +00:00
Doug Thayer 36900d2f1f Bug 1753177 - Use a virtualized list for webconsole output r=nchevobbe
This should be ready to review. However, I will include a big caveat that I
tried to do things the Reacty way, and it felt really awkward. Notably, I used
a React functional component, because they seem to be recommended as the
Right Way to do things, but because of all the state we need to keep track of,
as well as just the props that we don't want to lexically access because then
they can be stale, it felt really wrong. Guidance is welcome.

However, the core logic should be ready for review, so focus on that, and let
me know if I need to move anything around to make it more palatable.

Depends on D138030

Differential Revision: https://phabricator.services.mozilla.com/D138031
2022-04-11 02:50:46 +00:00
Nicolas Chevobbe 92409f469a Bug 1761510 - [devtools] Don't render indent element when it's not needed. r=bomsy.
We move the `data-indent` attribute to the message element so tests can still
query it.

Differential Revision: https://phabricator.services.mozilla.com/D142098
2022-03-31 06:55:10 +00:00
Nicolas Chevobbe a1e7221a2f Bug 1754697 - [devtools] Refactor webconsole state management of CSS Warnings matching elements. r=ochameau.
In order to store the matching elements of a CSS warnings, we were having a quite
generic `MESSAGE_UPDATE_PAYLOAD` action and `messagesPayloadById` property in the store.
This was used at some point to also store console.table data (which was retrieved
asynchronously), but is no longer true.
In this patch, we rename the action, property, selector, props and variable that
were using this to make it more specific to the CSS warning matching elements.

We also, directly pass message to messageGetMatchingElements as the component
calling the action already had access to it.

Tests that were using the action are updated so they're about CSS warnings (and
not console.table).

Differential Revision: https://phabricator.services.mozilla.com/D138412
2022-02-16 09:03:15 +00:00
Hubert Boma Manilla e88d32cd0a Bug 1733420 - [devtools] Migrate the remaining tests to http-first r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D133663
2021-12-16 10:03:03 +00:00
Julian Descottes 9fb3b7cde0 Bug 1733464 - [devtools] Fix webconsole stubs and node tests for https-first r=nchevobbe
It is slightly more complicated than expected because we have an issue capturing 404 from httpd.js in DevTools when using HTTPS (see Bug 1733420).

Therefore the stub for network events, which generates 404 requests, is not using https://example.com but http://mochi.test:8888

Differential Revision: https://phabricator.services.mozilla.com/D127161
2021-10-01 08:42:35 +00:00
Nicolas Chevobbe a5df07ef9b Bug 1719835 - [devtools] Fix beta simulation perma fail on browser_webconsole_stubs_page_error.js. r=bomsy.
The error message seems to be different in Nighly and Beta,
but I wasn't able to find any pref that is driving this.
Since the error message itself isn't super relevant, and given
that we're at the end of the cycle, this patch is only modifying
the expression so we get a different error.

Differential Revision: https://phabricator.services.mozilla.com/D119520
2021-07-09 15:13:07 +00:00
nchevobbe 822ed62dd4 Bug 1712284 - [devtools] Display Error cause in Error rep. r=bomsy
Depends on D119055

Differential Revision: https://phabricator.services.mozilla.com/D119056
2021-07-08 06:56:40 +00:00
Alexandre Poirot efff7d8f4e Bug 1702511 - [devtools] Avoid removing the navigation request on navigation in console batch registry. r=jdescottes,nchevobbe
Surprisingly, there is no issue with ResourceWatcher cache,
but only with the WebConsoleWrapper which gets its inner cache purged.

Differential Revision: https://phabricator.services.mozilla.com/D112232
2021-05-31 20:29:56 +00:00
rahulsawra 1297e45fa1 Bug 1695141 - Quote Symbol description when one is provided .r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D107222
2021-03-09 07:44:10 +00:00
Nicolas Chevobbe e7f6ce3c6f Bug 1607741 - [devtools] Remove webconsole cd command. r=ladybenko.
The command is removed and the test that were using it
are either removed or updated.

Differential Revision: https://phabricator.services.mozilla.com/D101928
2021-01-18 17:02:14 +00:00
Nicolas Chevobbe 41b44fe00c Bug 1439963 - [devtools] Handle evaluation result in a new task, after the evaluation is done. r=ochameau.
This way we ensure that any microtask created by the evaluated expression are
run, which can impact what we send to the client (e.g. `Promise.resolve().then(() => 246)`
will show a resolved promise instead of a pending one).
Some stubs and node tests are added to ensure this does fix the issue.

Differential Revision: https://phabricator.services.mozilla.com/D100979
2021-01-08 13:47:00 +00:00
Nicolas Chevobbe 1c9bbfa37a Bug 1672935 - [devtools] Remove l10N fixtures in webconsole mocha tests. r=ladybenko.
Now that the l10n module handles node environment, we no
longer need the existing fixtures for the mocha tests.
A couple tests needed to be updated to pass.

Depends on D94570

Differential Revision: https://phabricator.services.mozilla.com/D94571
2020-10-27 17:23:57 +00:00
Hubert Boma Manilla d28c850b7a Bug 1625909 - Use the ResourceWatcher API to fetch Network Events r=ochameau,Honza,nchevobbe
This patch migrates to using the Resource Watcher API to handle Network events, it adds a legacy listeners for the network events

Differential Revision: https://phabricator.services.mozilla.com/D71543
2020-07-13 13:33:09 +00:00
Mihai Alexandru Michis a651d0db05 Backed out changeset e95324121fde (bug 1625909) for causing multiple devtool failures. 2020-07-13 04:20:41 +03:00
Hubert Boma Manilla 85c8d3f713 Bug 1625909 - Use the ResourceWatcher API to fetch Network Events r=ochameau,Honza,nchevobbe
This patch migrates to using the Resource Watcher API to handle Network events, it adds a legacy listeners for the network events

Differential Revision: https://phabricator.services.mozilla.com/D71543
2020-07-12 20:38:06 +00:00
Nicolas Chevobbe 8ccdcbf7ef Bug 1641468 - Add platform message stub test. r=ochameau.
This patch adds a mochitest that will be responsible to
generate and update platform messages stubs, which is what
we already have for all the other type of resources we handle
in the console.
This means the mocha test asserting the rendering of platform
messages can use those stubs instead of hand-written stubs we
have at the moment.

This patch also adds a `getCurrentTestFilePath` function in shared-head.js,
which we then use in the different stub generators.
We also use CHROME_URL_ROOT to require the stub-generator-helpers file.

Differential Revision: https://phabricator.services.mozilla.com/D77216
2020-06-03 09:11:56 +00:00
Alexandre Poirot a99b8f113b Bug 1640641 - Add resourceType attribute to each resource and emit list of resources. r=nchevobbe,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D76672
2020-05-29 06:29:40 +00:00
Alexandre Poirot 05e432c765 Bug 1640641 - Instantiate only one ResourceWatcher in the console stubs test. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D75790
2020-05-29 06:29:38 +00:00
Csoregi Natalia 6f709604cb Backed out 2 changesets (bug 1640641) as per request. CLOSED TREE
Backed out changeset aca776a13154 (bug 1640641)
Backed out changeset 9f9e8395f631 (bug 1640641)
2020-05-28 17:12:36 +03:00
Alexandre Poirot e326e8dce9 Bug 1640641 - Instantiate only one ResourceWatcher in the console stubs test. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D75790
2020-05-28 08:37:14 +00:00
Nicolas Chevobbe 51d1e6457b Bug 1638533 - Add (in promise) suffix for uncaught rejected promise. r=davidwalsh.
Now that nsIScriptError have a `isPromiseRejection` flag, we can consume it
in the console to indicate to the user that we're dealing with a promise rejection.
The exception message is then: "Uncaught (in promise) XXX".
A few tests needed to be updated, and we take this as an opportunity to
ensure we have a stacktrace for uncaught promise rejection.

Differential Revision: https://phabricator.services.mozilla.com/D75780
2020-05-18 14:34:33 +00:00
Nicolas Chevobbe b05b13eec8 Bug 1631775 - Make the structure of cached messages the same as live ones. r=Honza.
There was no benefit of having cached messages being different from the "live" ones,
so in this patch we make the message packet consistent.
A few tests had to be modified, and we still handle old-style cached
messages for backward compatibility.

Differential Revision: https://phabricator.services.mozilla.com/D75089
2020-05-18 07:32:02 +00:00
Nicolas Chevobbe 4f0ce4c01f Bug 1595046 - Display thrown object as inspectable elements. r=Honza,perftest-reviewers,davehunt.
This patch use the new `exception` and `hasException` field from nsIScriptError
so we can render the actual object in the message error instead of a stringified
version.
Error object are still displayed using the `customFormat` prop, so we display
only the type + message + stacktrace (but we'll have a way to inspect them
in the sidebar soon).
Existing tests were updated to fix failures, and some tests/test cases were
added to make sure we cover all the different kind of errors we can display
in the console.

Differential Revision: https://phabricator.services.mozilla.com/D71288
2020-05-11 10:38:57 +00:00
Dorel Luca 17df76c90c Backed out changeset d7df79387af7 (bug 1595046) for Talos tests failures in webconsole/complicated.js. CLOSED TREE 2020-05-09 20:08:21 +03:00
Nicolas Chevobbe 32d5aa589e Bug 1595046 - Display thrown object as inspectable elements. r=Honza.
This patch use the new `exception` and `hasException` field from nsIScriptError
so we can render the actual object in the message error instead of a stringified
version.
Error object are still displayed using the `customFormat` prop, so we display
only the type + message + stacktrace (but we'll have a way to inspect them
in the sidebar soon).
Existing tests were updated to fix failures, and some tests/test cases were
added to make sure we cover all the different kind of errors we can display
in the console.

Differential Revision: https://phabricator.services.mozilla.com/D71288
2020-05-09 11:18:20 +00:00
Nicolas Chevobbe 44db6f3e71 Bug 1626286 - Fix order of cached messages in the reducer. r=jlast.
Differential Revision: https://phabricator.services.mozilla.com/D69967
2020-04-08 17:36:21 +00:00
Nicolas Chevobbe 4c94c7dc60 Bug 1626286 - Assign the same timestamp to all WebConsole stubs. r=Honza.
Since we're going to re-order the packets in the webconsole messages
reducer based on the messages timestamps, the node tests are going
to fail, as stubs timeStamps are generated and we don't have much
control on them.
Assigning the same timestamp means we'll defer to order based on the
message id, which should follow the order of insertion. The only exception
is network messages, where the id needs to be the actor, which is a string.
For the tests that are using network messages and assert some order, we
simply reassign the timestamps so we can guarantee the order.

Differential Revision: https://phabricator.services.mozilla.com/D69966
2020-04-08 13:50:23 +00:00