Commit graph

363 commits

Author SHA1 Message Date
Alexandre Poirot
58aaf052d7 Bug 1789256 - [devtools] Fix displaying sources when reloading a web extension. r=bomsy
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
2022-09-12 11:44:46 +00:00
Noemi Erli
539bbccc5d Backed out 2 changesets (bug 1780912) for causing failures in browser_aboutdebugging_addons_debug_console.js CLOSED TREE
Backed out changeset d2360a2a3d70 (bug 1780912)
Backed out changeset 21f1e9031be0 (bug 1780912)
2022-09-08 01:59:18 +03:00
Alexandre Poirot
80c9c861dd Bug 1780912 - [devtools] Make the local web extension toolbox be always on top. r=nchevobbe,eemeli
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
2022-09-07 21:00:17 +00:00
Alexandre Poirot
8792e1fba5 Bug 1780912 - [devtools] Open toolboxes for local WebExtension in dedicated window. r=jdescottes
This should hopefully help debug addons displaying panels/popups.

Differential Revision: https://phabricator.services.mozilla.com/D155393
2022-09-07 21:00:17 +00:00
Alexandre Poirot
91bbed2ced Bug 1787999 - [devtools] Show pseudo locale settings only in the browser toolbox. r=nchevobbe
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
2022-09-01 08:41:51 +00:00
Alexandre Poirot
6402fc721c Bug 1693686 - [devtools] Display the navigation buttons in WebExtension toolboxes. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D155563
2022-08-29 08:54:00 +00:00
Mark Banner
c83937cb5a Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for devtools. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D155167
2022-08-26 13:39:34 +00:00
Mark Banner
a6855db57e Bug 1330099 - Enable object-shorthand eslint rule. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D153567
2022-08-03 14:57:05 +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
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
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
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
Julian Descottes
3186fa06b1 Bug 1778951 - [devtools] Update webextension target actor browsingcontext group id after addon reload r=rpl,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D151728
2022-07-19 16:42:03 +00:00
Julian Descottes
c322679a51 Bug 1753048 - [devtools] Include the fallback window to the docShells array for webextension targets r=ochameau
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
2022-06-14 06:52:49 +00:00
Julian Descottes
7dfa0bab07 Bug 1753048 - [devtools] Append the addonId to the DevTools fallback window URL r=ochameau
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
2022-06-14 06:52:49 +00:00
Michael Ratcliffe
3133e874e5 Bug 1771608 - Eliminate mozilla/reject-osfile eslint warning in devTools code r=devtools-reviewers,perftest-reviewers,jdescottes,sparky
## Removed Some Osfile.jsm and ChromeUtils Dependencies

```diff
-  const { OS } = require("resource://gre/modules/osfile.jsm");

And / Or

-  const ChromeUtils = require("ChromeUtils");
```

- devtools/client/memory/actions/io.js
- devtools/client/memory/utils.js
- devtools/client/netmonitor/src/har/har-menu-utils.js
- devtools/client/responsive/test/browser/browser_screenshot_button.js
- devtools/client/shared/remote-debugging/adb/adb-binary.js
- devtools/client/shared/screenshot.js
- devtools/client/styleeditor/StyleEditorUI.jsm
- devtools/client/styleeditor/StyleSheetEditor.jsm
- devtools/client/webconsole/components/Input/JSTerm.js
- devtools/client/webconsole/test/browser/stub-generator-helpers.js
- devtools/server/actors/heap-snapshot-file.js
- devtools/server/actors/storage.js
- devtools/server/tests/xpcshell/test_MemoryActor_saveHeapSnapshot_01.js
- devtools/server/tests/xpcshell/test_MemoryActor_saveHeapSnapshot_02.js
- devtools/server/tests/xpcshell/test_MemoryActor_saveHeapSnapshot_03.js
- devtools/shared/DevToolsUtils.js
- devtools/shared/heapsnapshot/HeapSnapshotFileUtils.js
- devtools/shared/tests/xpcshell/test_fetch-file.js
- testing/talos/talos/tests/devtools/addon/content/tests/toolbox/screenshot.js

## IOUtils.read()

```diff
-  OS.File.read(path);
+  IOUtils.read(path);
```

- devtools/client/aboutdebugging/test/browser/helper-real-usb.js
- devtools/client/netmonitor/src/har/har-menu-utils.js
- devtools/client/shared/remote-debugging/adb/adb-binary.js
- devtools/client/styleeditor/StyleSheetEditor.jsm
- devtools/client/webconsole/components/Input/JSTerm.js
- devtools/client/webconsole/test/browser/browser_jsterm_file_load_save_keyboard_shortcut.js
- devtools/client/webconsole/test/browser/browser_webconsole_context_menu_export_console_output.js
- devtools/shared/DevToolsUtils.js

## IOUtils.write()

```diff
-  OS.File.writeAtomic(filePath, fileContent);
+  IOUtils.write(filePath, fileContent);
```

- devtools/client/webconsole/test/browser/stub-generator-helpers.js
- devtools/shared/DevToolsUtils.js
- devtools/shared/tests/xpcshell/test_fetch-file.js

## PathUtils.split()

```diff
-  OS.Path.split(path);
+  PathUtils.split(path);
```

- devtools/client/styleeditor/StyleSheetEditor.jsm

## PathUtils.join()

```diff
-  OS.Path.join(path, filename);
+  PathUtils.join(path, filename);
```

NOTE: If `filename` is an absolute path then `OS.Path` will ignore `path` and use `filename` but `PathUtils` will try to concatenate both paths. If filename can be an absolute path we need to use `PathUtils.isAbsolute()` and `PathUtils.joinRelative()` to make our desired behaviour explicit.

- devtools/client/debugger/test/mochitest/browser_dbg-chrome-create.js
- devtools/client/shared/remote-debugging/adb/adb-binary.js
- devtools/client/styleeditor/StyleSheetEditor.jsm
- devtools/shared/heapsnapshot/HeapSnapshotFileUtils.js

## PathUtils.isAbsolute() and PathUtils.joinRelative()

```diff
-  filename = OS.Path.join(path, filename);
+  filename = PathUtils.isAbsolute(filename)
+    ? filename
+    : PathUtils.joinRelative(path, filename);
```

- devtools/client/shared/screenshot.js

## IOUtils.remove()

```diff
-  OS.File.remove(filePath);
+  IOUtils.remove(filePath);
```

- devtools/client/framework/test/browser_toolbox_screenshot_tool.js
- devtools/client/responsive/test/browser/browser_screenshot_button.js
- devtools/client/responsive/test/browser/browser_screenshot_button_warning.js
- devtools/client/shared/test/shared-head.js
- devtools/client/webconsole/test/browser/browser_console_screenshot.js
- devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_file.js
- devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_fixed_header.js
- devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_selector.js
- testing/talos/talos/tests/devtools/addon/content/tests/toolbox/screenshot.js

## PathUtils.toFileURI()

```diff
-  OS.Path.toFileURI(filePath);
+  PathUtils.toFileURI(filePath);
```

- devtools/client/framework/test/browser_toolbox_screenshot_tool.js
- devtools/client/responsive/test/browser/browser_screenshot_button.js
- devtools/client/shared/test/shared-head.js
- devtools/client/webconsole/test/browser/browser_console_screenshot.js
- devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_file.js
- devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_fixed_header.js
- devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_selector.js

## PathUtils.filename()

```diff
-  OS.Path.basename(path),
+  PathUtils.filename(path),
```

- devtools/client/memory/actions/io.js
- devtools/client/memory/utils.js
- devtools/client/styleeditor/StyleEditorUI.jsm
- devtools/client/styleeditor/StyleSheetEditor.jsm

## IOUtils.copy()

```diff
-  OS.File.copy(path, dest);
+  IOUtils.copy(path, dest);
```

- devtools/client/memory/actions/io.js

## IOUtils.stat()

```diff
-  OS.File.stat(filePath);
+  IOUtils.stat(filePath);
```

The objects that these `stat()` versions return differ from one another. This hasn't made much difference to the codebase but our changed usage is included here for completeness:

```diff
-      this._fileModDate = info.lastModificationDate.getTime();
+      this._fileModDate = info.lastModified;
```

- devtools/client/memory/test/browser/browser_memory_transferHeapSnapshot_e10s_01.js
- devtools/client/memory/test/xpcshell/head.js
- devtools/client/memory/test/xpcshell/test_action-export-snapshot.js
- devtools/client/styleeditor/StyleSheetEditor.jsm
- devtools/server/actors/heap-snapshot-file.js
- devtools/server/tests/xpcshell/test_MemoryActor_saveHeapSnapshot_01.js
- devtools/server/tests/xpcshell/test_MemoryActor_saveHeapSnapshot_02.js
- devtools/server/tests/xpcshell/test_MemoryActor_saveHeapSnapshot_03.js
- devtools/shared/heapsnapshot/HeapSnapshotFileUtils.js

## IOUtils.setPermissions

```diff
-  OS.File.setPermissions(filePath, { unixMode: 0o744 });
+  IOUtils.setPermissions(filePath, 0o744);
```

- devtools/client/shared/remote-debugging/adb/adb-binary.js

## IOUtils.makeDirectory

```diff
-  OS.File.makeDir(path);
+  IOUtils.makeDirectory(path);
```

- devtools/client/shared/remote-debugging/adb/adb-binary.js

## IOUtils.exists

```diff
-  OS.File.exists(path);
+  IOUtils.exists(path);
```

- devtools/client/shared/remote-debugging/adb/adb-binary.js
- devtools/client/shared/screenshot.js
- devtools/client/webconsole/test/browser/browser_jsterm_file_load_save_keyboard_shortcut.js
- devtools/client/webconsole/test/browser/browser_webconsole_context_menu_export_console_output.js

## PathUtils.profileDir, PathUtils.localProfileDir and PathUtils.tempDir

```diff
-    const profileDir = OS.Constants.Path.profileDir;
+    const profileDir = PathUtils.profileDir;
```

We can reduce reliance on `Osfile.jsm` in another bug bug this is a small step in that direction.

- devtools/client/shared/remote-debugging/adb/adb-binary.js
- devtools/server/actors/storage.js
- devtools/shared/heapsnapshot/HeapSnapshotFileUtils.js

## IOUtils.getChildren(storagePath)

`IOUtils` does not have a direct equivalent of `OS.File.DirectoryIterator()` so we need to iterate more explicitely using `IOUtils.getChildren()`.

```diff
- async findStorageTypePaths(storagePath) {
-   const iterator = new OS.File.DirectoryIterator(storagePath);
-   const typePaths = [];
-
-   await iterator.forEach(entry => {
-     if (entry.isDir) {
-       typePaths.push(entry.path);
-     }
-   });
-
-   iterator.close();
-   return typePaths;
- }

+ async findStorageTypePaths(storagePath) {
+   const children = await IOUtils.getChildren(storagePath);
+   const typePaths = [];
+
+   for (const path of children) {
+     const exists = await IOUtils.exists(path);
+     if (!exists) {
+       continue;
+     }
+
+     const stats = await IOUtils.stat(path);
+     if (stats.type === "directory") {
+       typePaths.push(path);
+     }
+   }
+
+   return typePaths;
+ }

```

- devtools/server/actors/storage.js

## Misc

Made `IOUtils` and `PathUtils` available to DevTools modules.

```diff
   HeapSnapshot,
+  IOUtils,
   L10nRegistry,
   Localization,
   NamedNodeMap,
   NodeFilter,
+  PathUtils,
   StructuredCloneHolder,
   TelemetryStopwatch,
```

- devtools/shared/loader/builtin-modules.js

Differential Revision: https://phabricator.services.mozilla.com/D147589
2022-06-02 21:13:56 +00:00
Tooru Fujisawa
f4e0a88160 Bug 1764717 - Part 19: Use findMessageByType and findMessagesByType tests in other directories. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147039
2022-05-24 10:06:05 +00:00
Nicolas Chevobbe
faee16015f Bug 1668219 - [devtools] Remove devtools.performance.new-panel-enabled preference. r=julienw.
Remove occurences of the pref (except in devtools/client/performance, which
will be removed further in the stack).

Differential Revision: https://phabricator.services.mozilla.com/D145459
2022-05-06 17:16:26 +00:00
Luca Greco
000f909691 Bug 1748530 - Log a warning in the event page DevTools console panel when terminate on idle is ignored. r=mixedpuppy,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D143520
2022-04-14 19:54:32 +00:00
Luca Greco
e4af85d2ad Bug 1748530 - Prevent event page from being terminated on idle while a devtools toolbox is attached to the extension. r=mixedpuppy,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D142991
2022-04-14 19:54:32 +00:00
Alexandre Poirot
0df77da252 Bug 1759987 - [devtools] Drop assertPausedLocation in favor of assertPausedAtSourceAndLine. r=bomsy
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
2022-03-23 18:17:50 +00:00
Alexandre Poirot
a226f04b9d Bug 1759741 - [devtools] Remove shared-redux-head being redundant with shared-head.js r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D141139
2022-03-16 19:11:57 +00:00
Luca Greco
6c2b9571fb Bug 1748529 - Show extensions non-persistent background script status changes in about:debugging. r=jdescottes,mixedpuppy,fluent-reviewers,devtools-backward-compat-reviewers,flod,ochameau
Depends on D140379

Differential Revision: https://phabricator.services.mozilla.com/D139701
2022-03-16 15:17:42 +00:00
Luca Greco
60977ffe23 Bug 1748529 - Allow developer to forcefully terminate non-persistent background script from about:debugging. r=jdescottes,mixedpuppy,fluent-reviewers,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D140379
2022-03-16 15:17:42 +00:00
Mark Banner
8824cac727 Bug 1758106 - Stop using ChromeUtils.import(..., null) for importing modules in devtools/. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D140320
2022-03-08 16:59:18 +00:00
Alexandre Poirot
98d9426cf5 Bug 1755951 - [devtools] Prepare for the enabling of eslint on debugger tests. r=nchevobbe
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
2022-02-22 11:55:43 +00:00
Julian Descottes
fa92589bc2 Bug 1752770 - [devtools] Do not return full displaySpec as the hostname for webextension storage resources r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D139048
2022-02-18 15:06:57 +00:00
Julian Descottes
34ef2c6677 Bug 1752843 - [devtools] Wait for toolbox panels reload and properly close tabs r=Honza
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
2022-02-10 09:12:46 +00:00
Julian Descottes
6cd5358827 Bug 1752546 - [devtools] Update about:debugging tab list when a page navigates in the connected runtime r=bomsy
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
2022-01-31 12:58:25 +00:00
Andreea Pavel
80dc3acfcc Bug 1744778 - format indentation in disabling condition DONTBUILD 2022-01-30 15:10:39 +02:00
Norisz Fay
c1beee2e91 Bug 1744778 - disable browser_aboutdebugging_addons_debug_popup.js on Win10_2004 64 bits for frequent failures. r=intermittent-reviewers,MasterWayZ DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D137037
2022-01-27 13:40:52 +00:00
Alexandre Poirot
9650c11691 Bug 1729674 - [devtools] Re-enable browser_aboutdebugging_devtoolstoolbox_navigate_back_forward.js for BFCache. r=nchevobbe
This has been made possible thanks to bug 1675456.

Differential Revision: https://phabricator.services.mozilla.com/D133874
2021-12-15 13:30:57 +00:00
Alexandre Poirot
0f16876834 Bug 1729675 - [devtools] Re-enable browser_aboutdebugging_devtoolstoolbox_navigate_to_url for BFCache. r=nchevobbe
This has been made possible thanks to bug 1675456.

Differential Revision: https://phabricator.services.mozilla.com/D133873
2021-12-15 13:30:56 +00:00
Nicolas Chevobbe
ab7531ceed Bug 1531311 - [devtools] Add more visibility for node picker when debugging remote pages. r=jdescottes,devtools-backward-compat-reviewers.
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
2021-12-11 10:58:35 +00:00
Alexandre Poirot
388c98ecac Bug 1741708 - [devtools] Also fix CSS error message filtering. r=jdescottes
See previous changeset.

Differential Revision: https://phabricator.services.mozilla.com/D132340
2021-12-07 14:00:04 +00:00
Alexandre Poirot
b87af75014 Bug 1741708 - [devtools] Fix exception message filtering for Web extension debugging. r=jdescottes
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
2021-12-07 14:00:04 +00:00
Alexandre Poirot
e3f02185b6 Bug 1709267 - [devtools] Add support for target switching in about:debugging. r=jdescottes
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
2021-11-26 16:36:33 +00:00
Sandor Molnar
e524498137 Backed out 2 changesets (bug 1709267) for causing dt failures in browser_about-devtools-toolbox_reload. CLOSED TREE
Backed out changeset da9d3297348d (bug 1709267)
Backed out changeset ec5eb72262cc (bug 1709267)
2021-11-22 22:17:35 +02:00
Alexandre Poirot
8f7f5f4ad4 Bug 1709267 - [devtools] Add support for target switching in about:debugging. r=jdescottes
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
2021-11-22 18:57:32 +00:00
Florian Quèze
bc5e79f3ae Bug 1741235 - Merge the 'Firefox Front-End' and 'Firefox Platform' profiler presets, r=julienw,fluent-reviewers,nbaumgardner,kpatenio.
Differential Revision: https://phabricator.services.mozilla.com/D131158
2021-11-17 18:37:43 +00:00
Csoregi Natalia
63c1f53d14 Backed out 2 changesets (bug 1709267) for causing devtools failures. CLOSED TREE
Backed out changeset e4dc58404c6c (bug 1709267)
Backed out changeset 88f46043876e (bug 1709267)
2021-11-17 17:50:00 +02:00
Alexandre Poirot
aff1b7a2ce Bug 1709267 - [devtools] Add support for target switching in about:debugging. r=jdescottes
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
2021-11-17 14:05:15 +00:00
Julian Descottes
212faeb0c3 Bug 1741369 - [devtools] Update paths to loader files in devtools/ r=ochameau
Depends on D131216

Differential Revision: https://phabricator.services.mozilla.com/D131217
2021-11-17 12:43:26 +00:00
Nicolas Chevobbe
062332598e Bug 1730148 - [devtools] Add a onSelect argument to targetCommand.watchTargets . r=ochameau.
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
2021-11-10 14:51:04 +00:00
Cristian Tuns
e72368c08e Backed out 5 changesets (bug 1738915, bug 1739061, bug 1730148) for causing mochitest failures on browser_resources_document_events.js CLOSED TREE DONTBUILD
Backed out changeset 24c1a120bb77 (bug 1739061)
Backed out changeset eb9953fd3252 (bug 1738915)
Backed out changeset 9bd72db885eb (bug 1730148)
Backed out changeset 819078e24fa6 (bug 1730148)
Backed out changeset a0e706688adc (bug 1730148)
2021-11-10 07:07:57 -05:00
Nicolas Chevobbe
4ea74879bb Bug 1730148 - [devtools] Add a onSelect argument to targetCommand.watchTargets . r=ochameau.
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
2021-11-10 10:44:51 +00:00
Julian Descottes
2078bf262e Bug 1731323 - [devtools] Use a shared test helper to wait for all loaded panels in browser_aboutdebugging_addons_debug_reload.js r=Honza
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
2021-11-08 16:24:05 +00:00
Julian Descottes
d78bdfe181 Bug 1731323 - [devtools] Wait for panel reload in browser_aboutdebugging_addons_debug_reload.js r=Honza
Reuse helper from shared-head.js to wait for the currently selected panel to be reloaded in the intermittent test.

Differential Revision: https://phabricator.services.mozilla.com/D130154
2021-11-05 10:20:09 +00:00