Commit Graph

2199 Commits

Author SHA1 Message Date
Nicolas Chevobbe
b4de2bd22f Bug 1579422 - Disconnect FilterBar resize observer when observed node is disconnected. r=jdescottes.
Since we don't properly unmount the Console React app,
FilterBar's componentWillUnmount is never called.
This was where we planned to disconnect the resize observer,
but it was in fact never called.
So what we do in this patch instead is in the resize observer
callback, check if the observed node is connected, and if
it's not, we disconnect the resize observer.

This prevent the console from dispatching an action, that
may slow down closing the console.

Differential Revision: https://phabricator.services.mozilla.com/D45006

--HG--
extra : moz-landing-system : lando
2019-09-09 09:05:08 +00:00
Nicolas Chevobbe
f4e52015fa Bug 1577781 - Add a Browser Console test to expand a longstring coming from content process. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D44980

--HG--
rename : devtools/client/webconsole/test/browser/browser_webconsole_longstring.js => devtools/client/webconsole/test/browser/browser_console_content_longstring.js
extra : moz-landing-system : lando
2019-09-06 14:44:54 +00:00
Noemi Erli
d988a687b9 Backed out 9 changesets (bug 1578623) for causing Windows build bustages CLOSED TREE
Backed out changeset 52a86c60c866 (bug 1578623)
Backed out changeset e4fddd3d24b4 (bug 1578623)
Backed out changeset 65a7c4daec27 (bug 1578623)
Backed out changeset 3badf9215788 (bug 1578623)
Backed out changeset 71e58ee8f684 (bug 1578623)
Backed out changeset 0128e12a910f (bug 1578623)
Backed out changeset 8242877392bd (bug 1578623)
Backed out changeset 6d7be8a22f8b (bug 1578623)
Backed out changeset 3be609a9be36 (bug 1578623)

--HG--
extra : amend_source : b76d374926d247982773b58d12cb26e33d9972e8
2019-09-09 03:37:09 +03:00
Karl Tomlinson
8b101b80b5 Bug 1578623 add test for syntax errors and uncaught exceptions in worklet scripts r=bhackett
Depends on D44611

Differential Revision: https://phabricator.services.mozilla.com/D44612

--HG--
rename : devtools/client/webconsole/test/browser/browser_webconsole_worker_error.js => devtools/client/webconsole/test/browser/browser_webconsole_worklet_error.js
extra : moz-landing-system : lando
2019-09-08 23:44:05 +00:00
Nicolas Chevobbe
fe325dcf21 Bug 1578675 - Make the Browser Toolbox console UI similar to Browser Console's one. r=Honza.
We are now showing the "Show content messages" checkbox, as well
as removing the "Persist logs" one.

Differential Revision: https://phabricator.services.mozilla.com/D44637

--HG--
extra : moz-landing-system : lando
2019-09-06 13:38:37 +00:00
Nicolas Chevobbe
3020c6904b Bug 1579366 - Update completion text when autocomplete is disabled and popup isn't opened. r=Honza.
If the user triggered a force autocomplete (with Ctrl + Space)
that would result in having only the completion text, writing another
letter wouldn't update the completion text, that could then lead
into having an erroneous expression in the input.
This patch fixes this issue and add a test case to make sure we
don't regress this.

Differential Revision: https://phabricator.services.mozilla.com/D44976

--HG--
extra : moz-landing-system : lando
2019-09-06 13:35:55 +00:00
Karl Tomlinson
5f12a1a635 Bug 1578623 ignore self-hosted frames when testing console message stack line numbers r=bhackett
Line numbers in self-hosted frames are not controlled by the test.

Depends on D44610

Differential Revision: https://phabricator.services.mozilla.com/D44611

--HG--
extra : moz-landing-system : lando
2019-09-04 16:36:38 +00:00
Nicolas Chevobbe
4bf8a96317 Bug 1578676 - Add missing separator left to the show content messages checkbox. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D44636

--HG--
extra : moz-landing-system : lando
2019-09-05 09:24:25 +00:00
Nicolas Chevobbe
49076a161e Bug 1578665 - Create a dedicated pref for Browser Console editor state. r=Honza.
We want the Browser Console and WebConsole to have
distinct preferences, so you might have one in
editor mode, and the other one in inline mode if
you want.
This is as simple as adding the preference, and
stripping the devtools.webconsole. prefix in
the constant we use for retrieving the preference
value.

Differential Revision: https://phabricator.services.mozilla.com/D44631

--HG--
extra : moz-landing-system : lando
2019-09-05 09:23:47 +00:00
Nicolas Chevobbe
d0413845a9 Bug 1577780 - Add test for invoking getter in content object from Browser Console. r=Honza.
We're re-using the test we already have for invoking getters
in the webconsole as it is checking a lot of different cases.

Differential Revision: https://phabricator.services.mozilla.com/D44628

--HG--
rename : devtools/client/webconsole/test/browser/browser_webconsole_object_inspector_getters.js => devtools/client/webconsole/test/browser/browser_console_content_getters.js
extra : moz-landing-system : lando
2019-09-04 09:03:44 +00:00
Nicolas Chevobbe
01653665f2 Bug 1578660 - Add missing key on EditorToolbar in App.js .r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D44630

--HG--
extra : moz-landing-system : lando
2019-09-04 09:09:24 +00:00
Nicolas Chevobbe
010f6b2666 Bug 1578283 - Don't scroll jsterm viewport when inserting a tab character. r=Honza.
When we wanted to insert a string in the webconsole input,
we were setting the input value, and setting the cursor
manually. But since the editor setCursor function is calling
alignLine, there could be cases where the editor scroll position
would jump, feeling awkward for the user.
It turns out we can simplify this code a lot since codeMirror
provides a replaceRange function, which is a perfect replacement
for what we were using, without having to manage the cursor position.

The only downside to that is that inserting characters this
way *does* fire a `changes` event, that we are listening to
in the JsTerm to request autocompletion (which we don't need
as we only insert characters when accepting a completion or
adding a tab).
To mitigate that, we pass a specific jsterm origin string to
replaceRange, which let's us discriminate in the changes event
listener if those changes originate from jsterm only actions.

A test is added to ensure this works as expected (the test was
failing without the fix).

Differential Revision: https://phabricator.services.mozilla.com/D44466

--HG--
extra : moz-landing-system : lando
2019-09-04 09:02:09 +00:00
Jason Laster
9d0541854d Bug 1575240 - inspect(x) should show x in the appropriate panel. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D42747

--HG--
extra : moz-landing-system : lando
2019-09-03 20:57:40 +00:00
Nicolas Chevobbe
37211d770b Bug 1578389 - Fix propTypes error in console. r=Honza.
Fix 2 proptype errors: one in App.js, and the
other one in the renderStacktrace function,
that is called by Error rep.

Differential Revision: https://phabricator.services.mozilla.com/D44467

--HG--
extra : moz-landing-system : lando
2019-09-03 13:55:45 +00:00
Nicolas Chevobbe
7663347ad2 Bug 1578326 - Make history navigation icons same color as other icons in webconsole. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D44428

--HG--
extra : moz-landing-system : lando
2019-09-03 07:43:35 +00:00
Nicolas Chevobbe
9f40693a13 Bug 1577795 - Fix browser_webconsole_reverse_search_initial_value.js intermittent. r=Honza.
The failures were about pending requests to highlighters,
because we were logging node elements. Since we don't
really need to do that, we simply change the command
to not lod elements.

Differential Revision: https://phabricator.services.mozilla.com/D44367

--HG--
extra : moz-landing-system : lando
2019-09-03 07:43:33 +00:00
Cosmin Sabou
fb4596cde5 Bug 1535451 - Skip browser_webconsole_trackingprotection_errors.js on fission. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D44094

--HG--
extra : moz-landing-system : lando
2019-09-02 12:03:10 +00:00
Nicolas Chevobbe
aa1e1dbea8 Bug 1577756 - Run browser_console_webconsole_console_api_calls.js can run with both Fission enabled and disabled. r=Honza.
We also add a few console API calls, as well as pass a second
object parameter for the methods that support it, so we can
check that the content object are well displayed in the
Browser Console.
As we add a new check for console.table, I realized that
hiding and showing a consoleTable component would trigger a
new request to the server, even if we already have the table
data at hand.
I fixed this by only trying to get data from the server if
we don't have them already.

Differential Revision: https://phabricator.services.mozilla.com/D44159

--HG--
extra : moz-landing-system : lando
2019-09-02 12:29:47 +00:00
Nicolas Chevobbe
c93c7ac5af Bug 1577074 - Instrument scripts executed from editor mode. r=rcaliman.
We add an extra "input" property that is filled with
either "inline" or "multiline" depending if the expression
was evaluated in regular webconsole layout or in editor mode.

The test that was checking the execute_js telemetry event is
modify to only check what it was created for (hitting enter
on incomplete expression adds new line), and a new test is
added to specifically check that the execute_js telemetry event
is recorded as we expect.

Differential Revision: https://phabricator.services.mozilla.com/D43738

--HG--
rename : devtools/client/webconsole/test/browser/browser_jsterm_multiline.js => devtools/client/webconsole/test/browser/browser_webconsole_telemetry_execute_js.js
extra : moz-landing-system : lando
2019-09-02 06:22:32 +00:00
Brian Hackett
f8e6ccaf6b Bug 1576318 Part 3 - Avoid rerendering messages when the paused execution point has not changed, r=loganfsmyth,nchevobbe.
Depends on D43319

Differential Revision: https://phabricator.services.mozilla.com/D43320

--HG--
extra : moz-landing-system : lando
2019-08-30 17:07:07 +00:00
Nicolas Chevobbe
434d13bdd7 Bug 1574791 - Don't emit a warning message when enabling CSS warnings. r=Honza.
There was a warning message displayed to indicate that
the stylesheets where parsed again for checking errors,
and that in order to see errors for CSS modified in
Javascript, the tab should be reloaded.
The jargon used there was confusing, and also this was
more a notice than an actual warning message.
In order to remove confusion, we don't emit this message
anymore, but add a title to the CSS filter button when
it's disabled. The sentence is reworded to be simpler
to understand.

Differential Revision: https://phabricator.services.mozilla.com/D44118

--HG--
extra : moz-landing-system : lando
2019-08-30 08:57:50 +00:00
Nicolas Chevobbe
abba330463 Bug 1576949 - Clicking the Editor Run button when input has text selection only evaluate selected text. r=Honza.
This is done by modifying the evaluateExpression action,
where we retrieve the selection of the full input.

Differential Revision: https://phabricator.services.mozilla.com/D43750

--HG--
extra : moz-landing-system : lando
2019-08-30 08:55:09 +00:00
Nicolas Chevobbe
233a01c078 Bug 1535451 - Fix browser_webconsole_trackingprotection_errors.js intermittent. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D44112

--HG--
extra : moz-landing-system : lando
2019-08-30 08:39:26 +00:00
Noemi Erli
257da8f0d3 Backed out 2 changesets (bug 1575240) for failures in browser_inspector_menu-06-other.js CLOSED TREE
Backed out changeset 0667a378d933 (bug 1575240)
Backed out changeset 74fce607d8a7 (bug 1575240)
2019-08-30 00:35:13 +03:00
Cosmin Sabou
23311695cd Bug 1575240 - inspect(x) should show x in the appropriate panel (fix lint). r=jlast 2019-08-29 23:57:37 +03:00
Jason Laster
d056cd3a51 Bug 1575240 - inspect(x) should show x in the appropriate panel. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D42747

--HG--
extra : moz-landing-system : lando
2019-08-29 20:40:14 +00:00
Nicolas Chevobbe
2f132ce44f Bug 1572484 - Add a mochitest for expanding content-originated logged object in browser console. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D43266

--HG--
extra : moz-landing-system : lando
2019-08-29 15:33:31 +00:00
Nicolas Chevobbe
56033d41ed Bug 1577431 - Cleanup Browser Console when closing its window. r=ochameau.
We  store the created DebuggerClient when opening the Browser Console
so we can close it when closing the Browser Console window.
The Browser Console window `unload` event listener is moved out of
the BrowserConsole class to the BrowserConsoleManager, so we can close
the DebuggerClient when the window is closed (plus it makes more sense
to have it here since that's where we create the window).

Finally, functions that were inlined in toggleBrowserConsole are moved
as method of the BrowserConsoleManager for clarity.

Differential Revision: https://phabricator.services.mozilla.com/D43930

--HG--
extra : moz-landing-system : lando
2019-08-29 15:31:12 +00:00
Florens Verschelde
ac9c3d58a3 Bug 1575786 - Use unprefixed user-select property in devtools CSS; r=ladybenko,jlast
Differential Revision: https://phabricator.services.mozilla.com/D43217

--HG--
extra : moz-landing-system : lando
2019-08-29 10:12:25 +00:00
Dorel Luca
29a8e7b827 Backed out changeset d870fdbf200f (bug 1575240) for Devtools failures on devtools/client/webconsole/test/browser/browser_jsterm_inspect.js. CLOSED TREE
--HG--
extra : amend_source : bcbaf5bd6fa8882de2b7e6a9b616d694c9d23f9b
2019-08-29 05:55:23 +03:00
Jason Laster
09a2bac412 Bug 1575240 - inspect(x) should show x in the appropriate panel. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D42747

--HG--
extra : moz-landing-system : lando
2019-08-29 00:31:46 +00:00
Dorel Luca
06a2578d2d Backed out changeset 3853d8979a55 (bug 1575240) for Devtools on devtools/client/webconsole/test/browser/browser_jsterm_inspect.js
--HG--
extra : rebase_source : a9ffc17ade0874f515e44152d78af257c10df334
2019-08-28 22:08:26 +03:00
Gabriel Luong
8a3245ac6c Bug 1568157 - Part 4: Replace toolbox.walker with the contextual WalkerFront. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D40317

--HG--
extra : moz-landing-system : lando
2019-08-28 11:54:42 +00:00
Jason Laster
b553db9b43 Bug 1575240 - inspect(x) should show x in the appropriate panel. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D42747

--HG--
extra : moz-landing-system : lando
2019-08-28 12:04:49 +00:00
Nicolas Chevobbe
04f5f42266 Bug 1558417 - Add onboarding UI for Editor. r=Honza.
The onboarding UI is displayed on top of the Editor.
A dismiss button hides it forever (this is handled via
a pref that is set to false when clicking the button).

We take this as an opportunity to polish the Editor UI/wording
a bit.

Differential Revision: https://phabricator.services.mozilla.com/D43621

--HG--
rename : devtools/client/debugger/images/resume.svg => devtools/client/themes/images/webconsole/run.svg
extra : moz-landing-system : lando
2019-08-28 15:42:36 +00:00
Gurzau Raul
ad32ef1d9a Backed out changeset 9aa911cc3fcf (bug 1558417) for failing at browser_jsterm_editor_toolbar.js on a CLOSED TREE. 2019-08-28 17:12:00 +03:00
Nicolas Chevobbe
db62899801 Bug 1558417 - Add onboarding UI for Editor. r=Honza.
The onboarding UI is displayed on top of the Editor.
A dismiss button hides it forever (this is handled via
a pref that is set to false when clicking the button).

We take this as an opportunity to polish the Editor UI/wording
a bit.

Differential Revision: https://phabricator.services.mozilla.com/D43621

--HG--
rename : devtools/client/debugger/images/resume.svg => devtools/client/themes/images/webconsole/run.svg
extra : moz-landing-system : lando
2019-08-28 11:47:49 +00:00
Nicolas Chevobbe
74b4cd5282 Bug 1576841 - Enable multi-proxy WebConsole in Browser Toolbox when fission pref is true. r=ochameau.
We remove the multiple this.fissionSupport properties to only check
the permission in the couple place we need it.

Differential Revision: https://phabricator.services.mozilla.com/D43585

--HG--
extra : moz-landing-system : lando
2019-08-27 17:41:29 +00:00
David Walsh
2bbe6fef7a Bug 1576679 - Turn on inline preview by default r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D43490

--HG--
extra : moz-landing-system : lando
2019-08-27 21:48:49 +00:00
Ehsan Akhgari
4ba1487439 Bug 1540117 - Part 5: Fix browser_webconsole_warning_group_content_blocking.js too by ensuring that the test image does set a cookie. r=fix CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com//D43671

--HG--
extra : histedit_source : c0cb5631e5195fe73d19dc36813efc3bf6284f25
2019-08-27 23:39:59 +03:00
Gabriel Luong
006d44d6b7 Bug 1568157 - Part 3: Replace toolbox.highlighter with the contextual HighlighterFront. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D40316

--HG--
extra : moz-landing-system : lando
2019-08-27 19:13:45 +00:00
Ehsan Akhgari
73345dc559 Bug 1540117 - Part 4: Fix browser_webconsole_trackingprotection_errors.js by ensuring that the test page does set a cookie. r=fix CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com//D43652

--HG--
extra : histedit_source : 296fb0ecbd7b1540bba93ea1d8490629a04fa91a
2019-08-27 21:27:50 +03:00
Nicolas Chevobbe
d678a3d0da Bug 1576563 - Evaluate selected text if a selection exists in console input. r=Honza.
This is something Scratchpad allowed and that people
told me they were relying on. With Scratchpad being
deprecated, it makes sense to implement it in the
WebConsole as it's quite easy to do so.
A test is added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D43394

--HG--
extra : moz-landing-system : lando
2019-08-26 14:28:38 +00:00
Nicolas Chevobbe
7f5a19c884 Bug 1576085 - Don't allow evaluation results to be repeated. r=Honza.
With top-level await, we can now have multiple
evaluation results next to each others. Which
means that if they had the same repeatId, we
would only print the first result.
We fix that by not allowing evaluation results to
be repeated.
A mochitest is added to ensure the patch properly
fixes the issue.

Differential Revision: https://phabricator.services.mozilla.com/D43253

--HG--
extra : moz-landing-system : lando
2019-08-26 11:18:50 +00:00
Alexandre Poirot
8d89763d57 Bug 1570242 - Rename target to currentTarget in WebConsole codebase. r=nchevobbe,yulia
Do that to better highlight that the target can change over time.

Differential Revision: https://phabricator.services.mozilla.com/D41798

--HG--
extra : moz-landing-system : lando
2019-08-22 08:10:13 +00:00
Alexandre Poirot
c9a6855440 Bug 1570242 - Fetch toolbox from WebConsole class rather than gDevTools. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D41797

--HG--
extra : moz-landing-system : lando
2019-08-22 08:10:06 +00:00
Alexandre Poirot
2525776585 Bug 1570242 - Fetch target from toolbox instead of memoizing it on console classes. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D40017

--HG--
extra : moz-landing-system : lando
2019-08-22 08:09:59 +00:00
Dorel Luca
4a1c5b0a2a Backed out 3 changesets (bug 1570242) for devtools failure in /webconsole/test/node/components/webconsole-wrapper.test.js. CLOSED TREE
Backed out changeset 854e62f7f1ae (bug 1570242)
Backed out changeset 304366165980 (bug 1570242)
Backed out changeset a213b28dd40f (bug 1570242)
2019-08-21 13:13:15 +03:00
Alexandre Poirot
763683b0a2 Bug 1570242 - Rename target to currentTarget in WebConsole codebase. r=nchevobbe,yulia
Do that to better highlight that the target can change over time.

Differential Revision: https://phabricator.services.mozilla.com/D41798

--HG--
extra : moz-landing-system : lando
2019-08-21 09:47:53 +00:00
Alexandre Poirot
77ad7c4faa Bug 1570242 - Fetch toolbox from WebConsole class rather than gDevTools. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D41797

--HG--
extra : moz-landing-system : lando
2019-08-21 09:47:51 +00:00