Граф коммитов

113 Коммитов

Автор SHA1 Сообщение Дата
nchevobbe edbf81e7ac Bug 1712284 - [devtools] Include cause property in Error preview grip. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D119055
2021-07-08 06:56:39 +00:00
Julian Descottes d0004a2390 Bug 1718279 - [devtools] Rename Descriptor::reloadBrowsingContext to reloadDescriptor r=ochameau,devtools-backward-compat-reviewers
Depends on D118851

The initial name no longer represents accurately what happens for webextension descriptors

Differential Revision: https://phabricator.services.mozilla.com/D118852
2021-07-06 07:02:31 +00:00
Nicolas Chevobbe 6716c11bc6 Bug 1719160 - [devtools] Fix checkValue commands test helper. r=jdescottes.
We weren't checking properly undefined value, which was hiding issues in
some tests.
The helpers are fixed and a few test modified to make them pass.

Differential Revision: https://phabricator.services.mozilla.com/D119096
2021-07-06 05:03:47 +00:00
Alexandre Poirot c85efd5294 Bug 1718192 - [devtools] Fix various edgecase when doing BFCache navigation. r=nchevobbe
* avoid unwatching DOCUMENT_EVENT in case of target-switching
* ensure emitting DevToolsFrameChild:destroy for all currently registered target actors
  (didDestroy was clearing the list of actors used by _getTargetActorForWatcherActorID)
* do not try to stop and restart server side watchers in case of bfcache navigation

Differential Revision: https://phabricator.services.mozilla.com/D118795
2021-07-05 21:47:20 +00:00
Alexandre Poirot 2a4083e6b7 Bug 1718192 - [devtools] Implements ProcessDescriptor.isParentProcessDescriptor. r=nchevobbe
This is a shortcut to avoid having to do `descriptorFront.isProcessDescriptor && descriptorFront.isParent`.

Differential Revision: https://phabricator.services.mozilla.com/D118794
2021-07-05 21:47:20 +00:00
Alexandre Poirot ba0a1d1468 Bug 1718192 - [devtools] All server side targets follow the WindowGlobal lifecycle. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D118504
2021-07-05 21:47:20 +00:00
Alexandre Poirot b54048e6c1 Bug 1718192 - [devtools] Cover target destruction events when doing bfcache navigations. r=nchevobbe
The test was already passing.

Differential Revision: https://phabricator.services.mozilla.com/D118503
2021-07-05 21:47:19 +00:00
Alexandre Poirot cfa09c60a4 Bug 1718192 - [devtools] Fix bfcache TargetCommand test against bfcache navigations. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D118502
2021-07-05 21:47:19 +00:00
Julian Descottes c07fae4f8a Bug 1718236 - [devtools] Move BrowsingContextTargetActor reload to descriptor actors r=ochameau,nchevobbe,devtools-backward-compat-reviewers
Depends on D118471

Differential Revision: https://phabricator.services.mozilla.com/D118473
2021-06-25 11:15:00 +00:00
Julian Descottes fc7629cc33 Bug 1717979 - [devtools] watch/unwatch APIs should throw when provided with invalid types r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D118674
2021-06-25 10:54:39 +00:00
Alexandru Michis 7d586d088a Backed out changeset 24558d007063 (bug 1715908) for causing dt failures in browser_target_list_service_workers_navigation.js
CLOSED TREE
2021-06-25 14:25:43 +03:00
Nicolas Chevobbe 21c0f19800 Bug 1715908 - [devtools] Replace usage of navigate with DOCUMENT_EVENT dom-loading resource in service worker legacy listener. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D118670
2021-06-25 07:46:31 +00:00
Alexandre Poirot b0f6ee610d Bug 1714395 - [devtools] Use descriptor front or toolbox to know if we are in a BrowserToolbox r=nchevobbe
That, instead of using the current top level target, which may change, be null, ...

Differential Revision: https://phabricator.services.mozilla.com/D118549
2021-06-24 11:57:58 +00:00
Nicolas Chevobbe b3c27c1417 Bug 1715905 - [devtools] Replace usage of targetFront#navigate with DOCUMENT_EVENT dom-complete resource in tests. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D118570
2021-06-23 15:33:55 +00:00
Julian Descottes 379e5f5e6d Bug 1717633 - [devtools] Cleanup javascriptEnabled usage in devtools r=nchevobbe
Changes:
- added backward compatibility comments
- introduced a real browsing context target actor trait
- rename applyJavascript... method to forwardJavascript... as it better matches the role of the method

Try at https://treeherder.mozilla.org/#/jobs?repo=try&revision=f9d3a064108baed08f3491ea35509e42b8a98243
Locally tested against FF90 (dev edition)

Differential Revision: https://phabricator.services.mozilla.com/D118487
2021-06-23 12:10:39 +00:00
Alexandre Poirot 134b842c2e Bug 1715904 - [devtools] Move waitForNextResource from test helper to ResourceCommand. r=nchevobbe
This can actually be helpful also in production.
See netmonitor's connector and TargetCommand.reload.

Differential Revision: https://phabricator.services.mozilla.com/D118154
2021-06-21 13:35:45 +00:00
Nicolas Chevobbe 60944db71f Bug 1716703 - [devtools] Rename TestActor to HighlighterTestActor. r=jdescottes.
Renaming the actor makes it more explicit that it should
only be used for highlighter-related assertions.
We take this opportunity to rename all the 'testActor' instances
in tests to 'highlighterTestFront' which better represents
what the object is.
While doing this work, I was able to cleanup a few function definition
where the testActor parameter wasn't needed.

Differential Revision: https://phabricator.services.mozilla.com/D117978
2021-06-17 10:03:03 +00:00
Nicolas Chevobbe 7f748ac663 Bug 1714974 - [devtools] Fix BrowserToolbox console going blank when worker target is destroyed. r=ochameau.
Calls to targetFront.isTopLevel can happen after a given target is destroyed, and
in such case `getTrait` was throwing as the `client` property of the target is nullified.
To fix this, we're directly checking if the targetForm has a `isTopLevelTarget`,
and if not, we default to the property we set in `setTargetType`.

Another issue was caused by the `_url` property, used in the `url` getter,
being nullified when in TargetMixin#destroy, which was making the WorkerDescriptor#name
to throw.
We now check that the url isn't null before trying to use it.

Differential Revision: https://phabricator.services.mozilla.com/D117011
2021-06-16 15:20:56 +00:00
Nicolas Chevobbe a2652bf4e9 Bug 1716284 - [devtools] Add a reflow resource. r=ochameau.
This is meant to replace usage of the ReflowActor.

Differential Revision: https://phabricator.services.mozilla.com/D117899
2021-06-16 11:43:19 +00:00
Marian-Vasile Laza ff74a95352 Backed out 2 changesets (bug 1707884, bug 1716284) for causing xpshell failures on test_layout-reflows-observer.js
CLOSED TREE

Backed out changeset 58c3344a4f19 (bug 1707884)
Backed out changeset 22adda3b4bb1 (bug 1716284)
2021-06-16 11:59:28 +03:00
Nicolas Chevobbe 2274e5447b Bug 1716284 - [devtools] Add a reflow resource. r=ochameau.
This is meant to replace usage of the ReflowActor.

Differential Revision: https://phabricator.services.mozilla.com/D117899
2021-06-16 07:52:31 +00:00
Alexandre Poirot 9724cf200e Bug 1707878 - [devtools] Allow chrome/parent process documents loaded in tabs. r=jdescottes,nchevobbe
This ends up being more for the cleanup than anything really mandatory here.

Differential Revision: https://phabricator.services.mozilla.com/D113510
2021-06-15 15:37:11 +00:00
Alexandre Poirot 3c13c7d68a Bug 1707878 - [devtools] Test TargetCommand with a parent process pages. r=jdescottes,nchevobbe
Surprisingly, previous changeset fix this. Following changeset is rather there for cleanups.
The fact that we instantiate a first JSWindowActor pair from frame-helper seems to do the trick.
The new code in frame-helper no longer conditionaly create the target for the top BC.

I also silent an exception happening in this test without fission.

Differential Revision: https://phabricator.services.mozilla.com/D117472
2021-06-15 15:37:10 +00:00
Alexandre Poirot 6b4249246f Bug 1707878 - [devtools] Ensure emitting top level target first when we start watching for targets. r=jdescottes,nchevobbe
This only failed with devtools.target-switching.server.enabled=true as we emit top level target
from the Watcher only when this is enabled.

This is covered by browser_target_list_frames.js asserting a precise order in targets.
This test was failing with the pref set to true and should now pass in all 4 configurations.
(fission on/off + server target on/off)

Also try to destroy the top level target last, after all the remote iframes ones, but I'm not sure it is as important.

Note that we were trying to add the top level BC multiple times between code in utils.js vs worker-helper and frame-helper:getWatchingBrowsingContexts.

Differential Revision: https://phabricator.services.mozilla.com/D117471
2021-06-15 15:37:10 +00:00
Kris Maglione ae436f55ec Bug 1646560: Part 2 - Move allowJavascript and friends from DocShell to BrowsingContext and WindowContext. r=jdescottes,nika,geckoview-reviewers,devtools-backward-compat-reviewers,agi
This is slightly complicated by the fact that the editor code wants to be able
to set this from the content process, so we really need separate
BrowsingContext and WindowContext flags, the latter of which can be set by the
owning process.

Differential Revision: https://phabricator.services.mozilla.com/D114899
2021-06-15 04:40:11 +00:00
Hubert Boma Manilla 9e0da20ee6 Bug 1707555 - [devtools] Use thread configuration actor for all thread options r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D116340
2021-06-14 12:27:42 +00:00
Peter Van der Beken ec0f0e687e Bug 1715662 - Disable BFCache in parent in devtools/shared/commands/target-configuration/tests/browser_target_configuration_command_color_scheme.js. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D117392
2021-06-10 09:48:21 +00:00
Belén Albeza df2ff6decf Bug 1710077 - Part 1: Support target switching for cookies / indexedDB r=jdescottes,ochameau
This adds support for server target-switching for parent process storage resources (cookies and indexedDB at the moment)

Differential Revision: https://phabricator.services.mozilla.com/D114600
2021-06-09 15:34:01 +00:00
Alexandre Poirot cf6ec020f1 Bug 1691611 - [devtools] Ignore will-navigate events for remote iframe targets. r=jdescottes
While we don't emit DOCUMENT_EVENT's for in-process iframes, each new target
will generate DOCUMENT_EVENT for the target's top level document.
So that the frontend do receive DOCUMENT_EVENT's for the remote iframes, in addition to the top level target document.

In most cases, we listen to will-navigate only to watch the top most top level document
and only this one, so we should only consider the top level target's DOCUMENT_EVENT.

As a side effect, we can re-enable browser_inspector_fission_frame_navigation.js which was failing because of this.

Differential Revision: https://phabricator.services.mozilla.com/D117184
2021-06-09 08:11:07 +00:00
Alexandre Poirot 9c61bd73ee Bug 1713643 - [devtools] Use DOCUMENT_EVENT will-navigate in ResourceCommand to prune its cache. r=nchevobbe,jdescottes,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D116345
2021-06-08 08:56:24 +00:00
Alexandre Poirot 028ab4fbc0 Bug 1713643 - [devtools] Expose areExistingResources argument via onResourceAvailable callbacks. r=jdescottes
Doing this helps knowing if some resources are coming from ResourceCommand cache,
or if they are live resources coming from the server.

Differential Revision: https://phabricator.services.mozilla.com/D116984
2021-06-08 08:56:23 +00:00
Olli Pettay f0114836f9 Bug 1714426 - Disable bfcache in parent for the currently failing tests, r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D116768
2021-06-04 15:07:56 +00:00
Nicolas Chevobbe a5de5d21cf Bug 1704028 - [devtools] Enable touch simulation in remote frame. r=ochameau,devtools-backward-compat-reviewers.
This patch removes the `setTouchEventsOverride` method on the targetConfigurationCommand,
as we're now enabling the touch simulation from the server, in `BrowsingContextActor#updateTargetConfiguration`.
A new configuration property is added, `reloadOnTouchSimulationToggle`, so the
actor is responsible for reloading the page if the user set the pref.
The `touchSimulator` property is moved from the responsive actor to the browsingContext one
to facilitate managing the touch simulation state.

Differential Revision: https://phabricator.services.mozilla.com/D116103
2021-06-03 11:28:00 +00:00
Alexandre Poirot 24e725e900 Bug 1712591 - [devtools] Migrate from navigate to DOCUMENT_EVENT dom-complete in the web console. r=nchevobbe
This helps execute code on navigation, even if the document loads super fast
and target actor's navigate is emitted before frontend has a chance to register the navigate event.

Differential Revision: https://phabricator.services.mozilla.com/D115825
2021-06-02 16:44:41 +00:00
Alexandre Poirot 29f76f8a11 Bug 1712591 - [devtools] Expose hasNativeConsoleAPI via DOCUMENT_EVENT's dom-complete resource. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D115824
2021-06-02 16:44:41 +00:00
Noemi Erli c4daabf361 Backed out changeset 3a6a13e0c147 (bug 1704028) for causing failures in browser_viewport_zoom_resolution_invariant.js CLOSED TREE 2021-06-02 18:22:51 +03:00
Nicolas Chevobbe 4faad2f0f5 Bug 1712739 - [devtools] Fold custom WebConsoleFront#evaluateJSAsync method into scriptCommand#execute. r=ochameau.
Tests that were using `evaluateJSAsync` are updated, either by using the new command,
or by awaiting for the `evaluationResult` event.
A couple chrome tests were moved to devtools/shared/commands/js/tests/ and turned
into browser tests, and some of them were completely removed as we tested the
features in mochitests as well.

Differential Revision: https://phabricator.services.mozilla.com/D116248
2021-06-02 13:15:06 +00:00
Nicolas Chevobbe 5729531df3 Bug 1712739 - [devtools] Add a `script` command with an `execute` method. r=jdescottes.
This method is meant to replace the direct usage
of webconsoleFront.evaluateJSAsync.
The WebConsoleCommands file is removed, and all
client calls to evaluateJSAsync are migrated to
the new method. Callsites are simplified when
possible, and some test are refactored to switch
to spawned task to retrieve content page information.

Differential Revision: https://phabricator.services.mozilla.com/D116242
2021-06-02 13:15:06 +00:00
Nicolas Chevobbe ce4b52c6c4 Bug 1704028 - [devtools] Enable touch simulation in remote frame. r=ochameau,devtools-backward-compat-reviewers.
This patch removes the `setTouchEventsOverride` method on the targetConfigurationCommand,
as we're now enabling the touch simulation from the server, in `BrowsingContextActor#updateTargetConfiguration`.
A new configuration property is added, `reloadOnTouchSimulationToggle`, so the
actor is responsible for reloading the page if the user set the pref.
The `touchSimulator` property is moved from the responsive actor to the browsingContext one
to facilitate managing the touch simulation state.

Differential Revision: https://phabricator.services.mozilla.com/D116103
2021-06-02 12:46:22 +00:00
Alexandre Poirot 4ed1c008de Bug 1712574 - Avoid trying to register the legacy listener twice. r=jdescottes
This code calling `watchResourcesForTarget` should only be called when
we already called `TargetCommand.watchTargets()`.
When we call `ResourceCommand.watchResources` for the first time, `TargetCommand.watchTargets`
will process already existing targets and call `ResourceCommand.onTargetAvailable` (which calls `watchResourcesForTarget`).
But for any subsequent call, we should use `TargetCommand.getAllTargets` and call `watchResourcesForTarget` manually.

Differential Revision: https://phabricator.services.mozilla.com/D116027
2021-06-02 12:45:12 +00:00
Alexandre Poirot 571f6e5f8e Bug 1702511 - [devtools] Expose isNavigationRequest on NETWORK_EVENT to highlight request done for top level document navigation. r=jdescottes,nchevobbe,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D112921
2021-05-31 20:29:56 +00:00
Alexandre Poirot d77d8027ce Bug 1702511 - [devtools] Flush resources when receiving the will-navigate event. r=jdescottes,nchevobbe
That's to ensure clearing the panels sooner than later.
A few tests depend on this. Without that, target actor's "navigate" event,
which isn't throttled, fires *before* DOCUMENT_EVENT's will-navigate.
That ends up being a logic issue in the console code.

Differential Revision: https://phabricator.services.mozilla.com/D112230
2021-05-31 20:29:55 +00:00
Alexandre Poirot 90cdae00f6 Bug 1702511 - [devtools] Add backward compat code for DOCUMENT_EVENT will-navigate events. r=jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D116344
2021-05-31 20:29:55 +00:00
Alexandre Poirot 626a49a05d Bug 1712592 - [devtools] Implement DOCUMENT_EVENT's will-navigate in order to replace target actor's will-navigate. r=jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D112922
2021-05-28 08:59:48 +00:00
Nicolas Chevobbe f8b1226395 Bug 1704458 - [devtools] Update targetFront url and title on DOCUMENT_EVENT resource. r=ochameau,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D114601
2021-05-19 16:58:06 +00:00
Csoregi Natalia 054720f524 Backed out 5 changesets (bug 1711463, bug 1691577, bug 1691576, bug 1704458) for failures on browser_target_list_frames.js. CLOSED TREE
Backed out changeset 5f42d01c0ec3 (bug 1711463)
Backed out changeset c1954aab8ab2 (bug 1704458)
Backed out changeset b7181701f11c (bug 1704458)
Backed out changeset 8bb93508d939 (bug 1691577)
Backed out changeset d4be8b7f7783 (bug 1691576)
2021-05-18 18:52:49 +03:00
Nicolas Chevobbe 312d5c2fa0 Bug 1704458 - [devtools] Update targetFront url and title on DOCUMENT_EVENT resource. r=ochameau,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D114601
2021-05-18 14:16:34 +00:00
Alexandre Poirot 654541cb9d Bug 1644360 - Add console message navigation test for resource watcher api. r=jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D78862
2021-05-18 12:14:55 +00:00
Hubert Boma Manilla 2077c29048 Bug 1707556 - [devtools] Add a thread configuration command r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D113751
2021-05-17 11:55:39 +00:00
Hubert Boma Manilla 50a85d3429 Bug 1711096 - [devtools] Add support for multiple target types to getAllFronts r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D115071
2021-05-17 11:55:38 +00:00