Commit Graph

25352 Commits

Author SHA1 Message Date
Mark Banner
1c23a90c8e Bug 1782008 - Remove now unnecessary ESLint test definitions from other .eslintrc.js files. r=mossop,media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D153216
2022-08-03 11:16:20 +00:00
Mark Banner
7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Mark Banner
4cb7265185 Bug 1782819 - Enable some ESLint rules for devtools to be consistent with the rest of mozilla-central. r=jdescottes
Depends on D153536

Differential Revision: https://phabricator.services.mozilla.com/D153537
2022-08-03 08:24:21 +00:00
Mark Banner
795c5f035b Bug 1782819 - Remove ESlint rules from devtools/.eslintrc.js where they are already turned off or obsolete. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D153536
2022-08-03 08:24:20 +00:00
Nicolas Chevobbe
f452753063 Bug 1782527 - [devtools] Change devtools.chrome-debug-mode default value to parent-process. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D153432
2022-08-03 05:41:08 +00:00
Nicolas Chevobbe
27cd48bb58 Bug 1778852 - [devtools] Don't watch console messages resources from worker when worker messages are cloned to main thread. r=jdescottes.
When opening the debugger, we do watch worker targets in case we need to honor
some breakpoints.
If you started the console at some point, this will start watching console messages
resources, within the worker thread.
The issue is that if the `dom.worker.console.dispatch_events_to_main_thread` has
its default value, the worker messages are cloned from the worker thread to the
main thread, so when we start the debugger, we get duplicated messages: the cloned
ones, and the ones directly from the worker.
To fix this, we forward the value of the pref to the worker target so we can
bail out when it tries to watch for console messages.

Differential Revision: https://phabricator.services.mozilla.com/D153471
2022-08-03 05:28:06 +00:00
Ryan VanderMeulen
e0fe0f67a9 Bug 1782859 - Update protobuf to version 21.4. r=markh
Differential Revision: https://phabricator.services.mozilla.com/D153547
2022-08-03 03:49:13 +00:00
Nicolas Chevobbe
ba30834aad Bug 1616273 - [devtools] Wait for webconsole reloaded event in _watchForPanelReload. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D63184
2022-08-02 10:06:56 +00:00
Raphael Ferrand
a289e424bb Bug 1579774 - New inactive CSS rule to show warning when width or height is used on ruby element. r=nchevobbe,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D151138
2022-08-02 07:22:18 +00:00
Nicolas Chevobbe
cc96b2b490 Bug 1782488 - [devtools] Clear console service cache in browser_console_modes.js for non-fission case. r=jdescottes.
In the test, when fission isn't supported, we use Cu.reportError within
a SpecialPowers task, which puts the message in the console service cache.
If the test runs multiple time, the next iteration will run the test
with Fission support, which will consume cached messages, making the reportError
message appears more than we want.
This isn't a problem we can face in normal usage as when Fission is not supported,
we don't retrieve cached messages.
In order to fix the test failure, we simply clear the console service cache from
the content process.

Depends on D153327

Differential Revision: https://phabricator.services.mozilla.com/D153353
2022-08-02 06:54:06 +00:00
Andreea Pavel
9f8aa302a5 Bug 1767705 - disable browser_dbg-breakpoints-popup.js on OSX10.15 r=intermittent-reviewers,MasterWayZ DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D152828
2022-08-01 22:16:23 +00:00
Julian Descottes
4e1c8d6774 Bug 1776250 - [devtools] Show a badge in the markupview when children are unavailable r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D150189
2022-08-01 16:52:55 +00:00
Julian Descottes
7ff87bde3f Bug 1782038 - [devtools] Wait for node picker to be restarted in browser_aboutdebugging_addons_popup_picker.js r=nchevobbe
Depends on D153325

Differential Revision: https://phabricator.services.mozilla.com/D153326
2022-08-01 09:46:51 +00:00
Julian Descottes
a27ff1bd68 Bug 1767695 - [devtools] Wait for storage table in browser_aboutdebugging_addons_debug_storage.js r=nchevobbe
This should fix the intermittents

> TEST-UNEXPECTED-FAIL | devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_addons_debug_storage.js | undefined assertion name - Got +0, expected 2

Note that there are other existing intermittents (timeouts mostly) which I have not investigated

Differential Revision: https://phabricator.services.mozilla.com/D153325
2022-08-01 09:46:50 +00:00
Nicolas Chevobbe
549de6337b Bug 1782460 - [devtools] Add a _destroyed flag to WebConsoleUI. r=jdescottes.
We use the flag in various methods where we need to bail in such case.

Depends on D152031

Differential Revision: https://phabricator.services.mozilla.com/D153327
2022-08-01 09:33:20 +00:00
Nicolas Chevobbe
caa3dd6326 Bug 1777253 - [devtools] Remove content messages from console when switching to parent process only mode. r=jdescottes.
We remove all messages from target destroy with `isModeSwitching`, as well as
prune unhandled resources in the WebconsoleWrapper queues.
Finally, we also cleanup the resource command pendingEvents so we don't receive
resources after the target was destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D152031
2022-08-01 09:33:19 +00:00
Nicolas Chevobbe
ee36d4491f Bug 1776853 - [devtools] Don't restore target configuration when it is destroyed because of switching mode. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D152887
2022-08-01 09:33:19 +00:00
Nicolas Chevobbe
27454e1bd3 Bug 1776853 - [devtools] Set Browser Console window title according to its current mode. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D152728
2022-08-01 09:33:18 +00:00
Nicolas Chevobbe
9324c7cc9a Bug 1776853 - [devtools] Show ChromeDebugToolbar in Browser Console. r=ochameau.
We need to load the toolbox.ftl bundle and wrap the WebConsole App in a LocalizationProvider
when we're in the Browser Console.

Differential Revision: https://phabricator.services.mozilla.com/D150576
2022-08-01 09:33:18 +00:00
Nicolas Chevobbe
6f8744625b Bug 1776853 - [devtools] Add BrowserToolbox-specific toolbar. r=ochameau,jdescottes,fluent-reviewers,flod.
This adds an additional toolbar in the Browser Toolbox which will contain specific
tools and options.
At the moment we only display a couple input button to be able to switch from
Parent process only to multiprocess mode.
We remove the similar UI in the iframe picker and adapt the existing test.

A trait is added to not show the toolbar when debugging server where we wouldn't
get the `isSwitchingMode` property in `onTargetDestroyed`, as this can cause
misbehavior in various tool when switching between different modes.

Differential Revision: https://phabricator.services.mozilla.com/D150575
2022-08-01 09:33:17 +00:00
Bogdan Szekely
f9a469e37c Backed out 5 changesets (bug 1777253, bug 1776853) for causing devtools failures on browser_console_modes.js CLOSED TREE
Backed out changeset dbd68a657d6f (bug 1777253)
Backed out changeset f401150fb142 (bug 1776853)
Backed out changeset 209aade12fc6 (bug 1776853)
Backed out changeset dc24308ff8ef (bug 1776853)
Backed out changeset ea98ed858bae (bug 1776853)
2022-08-01 10:43:40 +03:00
Julian Descottes
1bfa64ee56 Bug 1775149 - [devtools] Fix intermittent failure for browser_toolbox_options_frames_button.js r=nchevobbe
Fixes the failure locally, rendering the iframe button might not be synchronous with updating the pref

Differential Revision: https://phabricator.services.mozilla.com/D153323
2022-08-01 07:14:26 +00:00
Nicolas Chevobbe
68cffb97a0 Bug 1777253 - [devtools] Remove content messages from console when switching to parent process only mode. r=jdescottes.
We remove all messages from target destroy with `isModeSwitching`, as well as
prune unhandled resources in the WebconsoleWrapper queues.
Finally, we also cleanup the resource command pendingEvents so we don't receive
resources after the target was destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D152031
2022-08-01 06:55:56 +00:00
Nicolas Chevobbe
ae822aadc6 Bug 1776853 - [devtools] Don't restore target configuration when it is destroyed because of switching mode. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D152887
2022-08-01 06:55:55 +00:00
Nicolas Chevobbe
8a932c2af2 Bug 1776853 - [devtools] Set Browser Console window title according to its current mode. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D152728
2022-08-01 06:55:55 +00:00
Nicolas Chevobbe
c13021361c Bug 1776853 - [devtools] Show ChromeDebugToolbar in Browser Console. r=ochameau.
We need to load the toolbox.ftl bundle and wrap the WebConsole App in a LocalizationProvider
when we're in the Browser Console.

Differential Revision: https://phabricator.services.mozilla.com/D150576
2022-08-01 06:55:55 +00:00
Nicolas Chevobbe
9d9761ff10 Bug 1776853 - [devtools] Add BrowserToolbox-specific toolbar. r=ochameau,jdescottes,fluent-reviewers,flod.
This adds an additional toolbar in the Browser Toolbox which will contain specific
tools and options.
At the moment we only display a couple input button to be able to switch from
Parent process only to multiprocess mode.
We remove the similar UI in the iframe picker and adapt the existing test.

A trait is added to not show the toolbar when debugging server where we wouldn't
get the `isSwitchingMode` property in `onTargetDestroyed`, as this can cause
misbehavior in various tool when switching between different modes.

Differential Revision: https://phabricator.services.mozilla.com/D150575
2022-08-01 06:55:54 +00:00
Luke Swiderski
af5850efb7 Bug 1696157 - Fix unexpected opening of breakpoints panel r=jdescottes
Previously when closing the breakpoints panel in secondary panes,
if an unselected call stack frame was selected, the breakpoints
panel would unexpectedly open.  This patch makes sure it remains
closed when a user has closed it and then clicks other elements
in the secondary panes.  The same issue was happening when
clicking the event listener breakpoint log checkbox, and or step
in, step out, and step over.  This patch should also fix
Bug 1755337.

Add mochitest.
Fix mochitest issues and move isFrameSelected to shared-head.js
Fix linting issues.
Merge new mochitests into browser_dbg-state-based-panels.js
Add condition to SecondaryPanes/index.js
Add PropTypes to index.js
Add logic to reducers/pause.js
Add selector to selectors/pause.js
Add breakpointsPane action to pause/actions
Update mochitests to test for edge case
Remove dbg_browser-breakpoints-secondary-pane.js
Fix linting
Make changes suggest by reviewer
Add additional mochitest for event breakoints log
Remove unnecessary parameters from action
Fix mozbuild order
Remove previewPausedLocation.js from mozbuild to fix conflict

Differential Revision: https://phabricator.services.mozilla.com/D149994
2022-07-29 19:00:06 +00:00
Nicolas Chevobbe
9a96297e35 Bug 1781726 - [devtools] Pass an isModeSwitching property to onTargetDestroyed callback param when switching modes. r=jdescottes,devtools-backward-compat-reviewers.
We pass `isModeSwitching` to `unwatchTargets` from the target command when the
pref is changed.
On the server, we then pass it to the various places which might call `notifyTargetDestroyed`,
so we can pass the flag in the `target-destroyed-form` event, which we can then
pass to TargetCommand#onDestroyed callbacks.`

Differential Revision: https://phabricator.services.mozilla.com/D152758
2022-07-29 14:30:07 +00:00
Nicolas Chevobbe
dd4613555c Bug 1779173 - [devtools] Fix call to isMinified in Debugger to prevent performance issue when opening big single-line file. r=jdescottes.
Changes in Bug 1754407 caused a performance regression as it now triggered
syntax highlighting of big files, which we avoided before.
This is because we don't call `isMinified` with the expected type of data, causing
the file to not be seen as minified, and thus highlighting it.

Differential Revision: https://phabricator.services.mozilla.com/D153140
2022-07-29 13:52:50 +00:00
Nicolas Chevobbe
14ad2fbb20 Bug 1781269 - [devtools] Don't try to unwatch resource in stopWatchingNetworkResources when Console is closing. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D152889
2022-07-29 07:13:39 +00:00
Julian Descottes
df78346aa4 Bug 1782077 - [devtools] Restore CSS specificity for Edit And Resend headers r=nchevobbe
The flex-wrap rule no longer had higher specificity than
    .network-monitor .tabpanel-summary-container {
        flex-wrap: wrap;
        padding-inline-start: 4px;
        margin-bottom: 5px;
    }

Which broke the layout.
https://searchfox.org/mozilla-central/rev/2bbb0c0a90df20702df8c8011a8996536a83cb75/devtools/client/netmonitor/src/assets/styles/HeadersPanel.css#166

I am adding a ".network-monitor" to selectors for which I started using a class instead of an ID.

Differential Revision: https://phabricator.services.mozilla.com/D153097
2022-07-29 05:36:22 +00:00
Julian Descottes
17d27fac52 Bug 1732123 - [devtools] Restart the nodepicker on webextension target navigation r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D126881
2022-07-26 15:05:13 +00:00
Julian Descottes
1322be9285 Bug 1767792 - [devtools] Ignore errors in Firefox data provider if clear was called mid-flight r=nchevobbe
depends on D152726

https://searchfox.org/mozilla-central/rev/d5edb4a4538657b7d691a41c00e6796a19ade6e7/devtools/client/netmonitor/src/har/test/browser_net_har_copy_all_as_har.js#79-104.

This method will perform 2 reloads immediately. This means that one of the requests will immediately cleared by the next navigation and if there was a pending call to FirefoxDataProvider.requestData, it will throw because the actor was already destroyed on the server.

Differential Revision: https://phabricator.services.mozilla.com/D152727
2022-07-26 15:03:02 +00:00
Julian Descottes
6173cfaf92 Bug 1777457 - [devtools] Update netmonitor test helpers when resources are cleared r=nchevobbe
There are potentially several sources for the recent netmonitor intermittent failures.
One of them is that we have several helpers to "wait" for requests, and they have a logic so that when they spot a request, they will wait for the request to be
completed.
However if a navigation occurs in the middle, the corresponding resource will be cleared and the updates will not be processed.
So here we emit a test-only event when the netmonitor attempts to clear resources, so that test helpers can update accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D152726
2022-07-26 15:03:02 +00:00
Bogdan Szekely
55d622a34d Backed out changeset ffb9fa8567c4 (bug 1732123) for causing mochitest failures on browser_inspector_highlighter-07.js CLOSED TREE 2022-07-26 17:02:54 +03:00
Julian Descottes
de0cbb7a9f Bug 1732123 - [devtools] Restart the nodepicker on webextension target navigation r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D126881
2022-07-26 12:58:14 +00:00
Nicolas Chevobbe
d3d164c46d Bug 1780502 - [devtools] Unmount webconsole React node on destroy. r=ochameau,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D152357
2022-07-26 08:55:02 +00:00
Alexandre Poirot
546c9e48cd Bug 1777203 - [devtools] Migrate SourceTree to be based on source actors. r=bomsy
This doesn't change anything. It actually complexify things a bit.
But this will be an helpful change we can do right away in order to help
create a unique Source object per URL (instead of per URL and target).

Differential Revision: https://phabricator.services.mozilla.com/D151553
2022-07-26 08:53:07 +00:00
Alexandre Poirot
a7a60ed74b Bug 1777203 - [devtools] Generate SourceTree data directly from the selectors. r=bomsy
This introduces a new reducer in order to maintain a Source Tree data structure.

A Source Tree is composed of:

* Thread Items
  To designate targets/threads. These are the roots of the Tree if no project directory is selected.

* Group Items
  To designates the different domains used in the website.
  These are direct children of threads and may contain directory or source items.

* Directory Items
  To designate all the folders. Note that each every folder has an items.
  The Source Tree React component is doing the magic to coallesce folders made
  of only one sub folder.

* Source Items
  To designate sources. They are the leaves of the Tree.
  (we should not have empty directories.)

See the creation methods in the reducer to see the various attributes available on each Item type.

Project root implementation has been simplified, but there is still subtantial complexity around it.
Also, there is a behavior change. Now the project root is thread specific,
whereas before it could be per domain/URL across threads.
The complexity of it is around preserving the `uniquePath` across reloads.
Because uniquePath starts with the thread actor ID, it can't be preserved across reload.
Instead, we replace the thread actor ID with "top-level" string.
This means that project root isn't preserved across reload for non-top-level targets.

About `uniquePath` attribute available on all items,
this will be the Path in ManagedTree and Key in Tree components.
i.e. a unique identifier for any item in the Tree.

The isWebExtension check is simplified to fetch it from the thread object,
instead of having to involve the "CONNECT" action.

Depends on D151467

Differential Revision: https://phabricator.services.mozilla.com/D150548
2022-07-26 08:53:07 +00:00
Tooru Fujisawa
4e35a2bf9c Bug 1780543 - Part 3: Add mozilla/process-script environment as alias to frame-script. r=Standard8,perftest-reviewers,webcompat-reviewers,necko-reviewers,twisniewski,sparky,dragana
Differential Revision: https://phabricator.services.mozilla.com/D152428
2022-07-26 02:46:29 +00:00
Tooru Fujisawa
a6aabba5a4 Bug 1780543 - Part 1: Use eslint-env mozilla/frame-script consistently in frame script. r=Standard8,webdriver-reviewers,geckoview-reviewers,jdescottes,calu
Differential Revision: https://phabricator.services.mozilla.com/D152426
2022-07-26 02:46:28 +00:00
Tooru Fujisawa
60be63b763 Bug 1732543 - Part 2: Add eager evaluation testcase. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D152350
2022-07-26 02:37:51 +00:00
Tooru Fujisawa
b3c8ed8937 Bug 1609432 - Part 6: Add eager evaluation testcase. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D152348
2022-07-26 02:37:51 +00:00
Tooru Fujisawa
734c6f314c Bug 1609432 - Part 1: Add more functions to eager evaluation allowlist. r=nchevobbe
RegExp.prototype methods called inside String.prototype.{match,search,replace}
should be allowed.

Differential Revision: https://phabricator.services.mozilla.com/D152343
2022-07-26 02:37:49 +00:00
Nicolas Chevobbe
336c62a210 Bug 1780931 - [devtools] Set color-mix pref in browser_outputparser.js. r=jdescottes.
The test is permafailing on beta because it was missing
the color-mix pref, which is only enabled on Nightly.

Differential Revision: https://phabricator.services.mozilla.com/D152614
2022-07-25 07:48:17 +00:00
Daniel Q
88ea7b032f Bug 1590653 - Fixed/improved alignment of "Learn more about performance" button with cache headers r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D150919
2022-07-25 07:07:12 +00:00
Hubert Boma Manilla
b0fbdf3eab Bug 1767792 - [devtools] Wait for network event updates to complete r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D152514
2022-07-23 19:00:00 +00:00
Julian Descottes
e7a6ff9a51 Bug 1778985 - [devtools] Add wait option to getRuleViewProperty r=Honza,nchevobbe
Update the test helper getRuleViewProperty to support an async version via a `wait` option.
When passed, the helper will keep polling until there is a valid ruleviewproperty which matches the arguments.
This can avoid race issues when the API is used too early.

In this changeset we also start using this API in all tests which either:
- used to manually poll getRuleViewProperty
- were disabled on linux for getRuleViewProperty issues
- are currently intermittent because of getRuleViewProperty

Differential Revision: https://phabricator.services.mozilla.com/D152286
2022-07-22 20:15:52 +00:00
Nicolas Chevobbe
5b191d6645 Bug 1777787 - [devtools] Display non-printable chars in CodeMirror. r=jdescottes.
This adds some character (e.g. right-to-left override) to CodeMirror default list of
special characters (see https://codemirror.net/5/doc/manual.html#option_specialChar).
We also take this opportunity to show the unicode value for those, instead of the
default red dot CodeMirror provides.

Differential Revision: https://phabricator.services.mozilla.com/D152421
2022-07-22 16:25:00 +00:00