I think we have a special edge case here, where we do have a navigation,
but no new top level target is notified.
In regular devtools/webpages, we should have a new top level target notified to the debugger.
Differential Revision: https://phabricator.services.mozilla.com/D156467
This allows to keep the DevTools visible while interacting with the Firefox
window where the extension is running.
This behavior is enabled by default, but can be disable on-demand via a button
in the top toolbar.
Note that it requires to close and reopen the window/toolbox as platform APIs
disallow changing this behavior "live" on a given window.
Differential Revision: https://phabricator.services.mozilla.com/D155843
Note that it will also stop showing locale and popup settings for remote browser toolboxes.
Toolbox.isBrowserToolbox being false for this usecase.
Differential Revision: https://phabricator.services.mozilla.com/D155956
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
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
Depends on D148489
This allows to properly set the cssErrorReportingEnabled flag on its docShell.
While we are not interested in css errors for this fallback window, the windowglobal target actor
will automatically set the flag on new root browsing contexts only if the previous one had the flag
set. This way when we switch to a valid webextension document (eg a popup), the flag will be set
and CSS errors will be reported.
Differential Revision: https://phabricator.services.mozilla.com/D148836
This window does not share the regular extension principal so we cannot fetch
the addonId from the principal in the same way as we do for other documents.
Instead we append the addonId to the URL and provide a new helper in browser-context-helpers
to extract the addonId from a browsingContext.
This helper should work transparently from the parent process and the content process, and
should support browsing context for regular extension documents as well as browsing contexts
for fallback windows.
Differential Revision: https://phabricator.services.mozilla.com/D148489
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
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
After fixing the initial failing test by both waiting for DevTools reload propertly and closing all debug tabs, the following test started failing.
Waiting for DevTools to properly update in this test seems to fix the intermittent(s?).
Differential Revision: https://phabricator.services.mozilla.com/D138010
About:debugging seems to be the only consumer of the tabListChanged event at this point.
One of the internal events used by about:debugging was not properly handled. Added a minor fix to change that and added a new mochitest for about:debugging.
Differential Revision: https://phabricator.services.mozilla.com/D137293
This patch does a couple things to tell users they can use the node picker when
debugging a remote page:
- changes the node picker button icon (arrow -> hand) when connected to an android phone,
as well as its tooltip
- adds a notice in the content page (i.e. on the phone) when the picker starts
Differential Revision: https://phabricator.services.mozilla.com/D132705
The original report isn't against Nightly and so is before bug 1675456 landed.
It means that on current release, we are still going throught the WebConsole actor
and use ConsoleServiceListener, which isn't filtering anything:
this.window is null because targetActor.isRootActor=true:
https://searchfox.org/mozilla-central/rev/65d4d3399afa79c8de5a0cc11752d2ba7c31edc1/devtools/server/actors/webconsole/listeners/console-service.js#72-102)
=> on release we log all exception, like the MBT.
Whereas on Nightly, bug 1675456 kicks in and we are going using ErrorMessageWatcher.
This time, this class filter out message and only include the one related to the target's current top window.
So it is slightly better, but we may miss messages of other documents of the add-on.
For example, if a popup window is opened after having opened the DevTools.
This patch addresses the watcher class codepath. Only tests should be using the console actor and ConsoleServiceListener.
We may later drop this code once we start spawning one target for each individual document
used by an add-on. For now, the WebExtensionTargetActor is a unique target that debugs all extension's documents.
Differential Revision: https://phabricator.services.mozilla.com/D132230
The challenges here are:
* xpcshell tests still don't support the watcher actor and server side targets. So we have to ensure still using client side target fetched via Descriptor.getTarget RDP request. (We still also need that for WebExtension)
* some tests weren't spawning the TargetCommand while querying TabDescriptor.getTarget. I tuned them to call TargetCommand.startListening so that we start instantiating server side targets, including the top level one retrieved via TabDescriptor.getTarget.
Otherwise, thanks to this patch a few check can now be moved from `if (isLocalTab)` to `if (isTabDescriptor)`.
Differential Revision: https://phabricator.services.mozilla.com/D130761
The challenges here are:
* xpcshell tests still don't support the watcher actor and server side targets. So we have to ensure still using client side target fetched via Descriptor.getTarget RDP request. (We still also need that for WebExtension)
* some tests weren't spawning the TargetCommand while querying TabDescriptor.getTarget. I tuned them to call TargetCommand.startListening so that we start instantiating server side targets, including the top level one retrieved via TabDescriptor.getTarget.
Otherwise, thanks to this patch a few check can now be moved from `if (isLocalTab)` to `if (isTabDescriptor)`.
Differential Revision: https://phabricator.services.mozilla.com/D130761
The challenges here are:
* xpcshell tests still don't support the watcher actor and server side targets. So we have to ensure still using client side target fetched via Descriptor.getTarget RDP request. (We still also need that for WebExtension)
* some tests weren't spawning the TargetCommand while querying TabDescriptor.getTarget. I tuned them to call TargetCommand.startListening so that we start instantiating server side targets, including the top level one retrieved via TabDescriptor.getTarget.
Otherwise, thanks to this patch a few check can now be moved from `if (isLocalTab)` to `if (isTabDescriptor)`.
Differential Revision: https://phabricator.services.mozilla.com/D130761
This will allow panels to react to a given target being selected in the iframe picker
when EFT is enabled.
We add support for onTargetSelected in the inspector and add a few test cases
for it (checking that highlighters are hidden when selecting a frame, checking
that selecting an iframe and then removing it does update the markup view).
Differential Revision: https://phabricator.services.mozilla.com/D130177
This will allow panels to react to a given target being selected in the iframe picker
when EFT is enabled.
We add support for onTargetSelected in the inspector and add a few test cases
for it (checking that highlighters are hidden when selecting a frame, checking
that selecting an iframe and then removing it does update the markup view).
Differential Revision: https://phabricator.services.mozilla.com/D130177
This changeset adds a new shared helper which allows to wait for all the loaded panels of a toolbox.
We might use this by default in our navigation helper, but that should be done in a follow up.
Differential Revision: https://phabricator.services.mozilla.com/D130616