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

4728 Коммитов

Автор SHA1 Сообщение Дата
Nicolas Chevobbe c6f6b43576 Bug 1722801 - [devtools] Get all connections before closing them in DevToolsServer.destroy. r=jdescottes.
When running test_webconsole-node-grip.html with server side target switching,
the test was failing as accessing this._connections[connID] was returning a
null object.
From some quick investigation, it looks like the object was nullified after
a first connection was closed.
Retrieving all the connection objects before looping closing them seems to
fix the issue.

Differential Revision: https://phabricator.services.mozilla.com/D121165
2021-07-29 14:39:55 +00:00
Alexandre Poirot 6ca49be366 Bug 1722800 - [devtools] Fix mochitest chrome tests with server targets. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D121141
2021-07-29 07:41:49 +00:00
Claudia c0e4f423b1 Bug 1430022 - [devtools] Adds an error message in the copy command on a cyclic object r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D120623
2021-07-29 05:36:13 +00:00
Christoph Kerschbaumer 4a6250387f Bug 1719272: Annotate failing browser/ tests to potentially enable https-first mode in Nightly r=webcompat-reviewers,denschub,webdriver-reviewers,preferences-reviewers,Gijs,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D119177
2021-07-28 19:16:16 +00:00
Sandor Molnar 68cdec0548 Backed out changeset 7eb8945dd8e3 (bug 1719272) for causing bustages in gecko decision task. CLOSED TREE 2021-07-28 19:47:06 +03:00
Christoph Kerschbaumer bb716f0701 Bug 1719272: Annotate failing browser/ tests to potentially enable https-first mode in Nightly r=webcompat-reviewers,denschub,webdriver-reviewers,preferences-reviewers,Gijs,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D119177
2021-07-28 16:08:07 +00:00
Alexandre Poirot 0a1553cb94 Bug 1722501 - [devtools] Remove now unused DOCUMENT_EVENT's dom-loading's shouldBeIgnoredAsRedundantWithTargetAvailable attribute. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D120962
2021-07-28 11:48:48 +00:00
Alexandre Poirot ea648a1045 Bug 1715878 - [devtools] Reduce chances to hit browser_resources_document_events.js intermittent. r=nchevobbe DONTBUILD
10ms time shift isn't enough. Locally --run-until-failure no longer reproduce with 20ms.
This time shift controls the negative time shift we apply to will-navigate
so that it appears *before* dom-loading.

The issue we work around is that will-navigate is notified by the platform
*after* the timestamp for dom-loading is recorded.

Differential Revision: https://phabricator.services.mozilla.com/D121054
2021-07-28 11:25:44 +00:00
Paul Zuehlcke 947223ccc9 Bug 1721131 - [devtools] Use WindowGlobalParent documentStoragePrincipal for storage access. r=nchevobbe
We need to use documentStoragePrincipal rather than the regular document principal, because it
contains the partitionKey which is used to isolate storage of third-party resources.

Differential Revision: https://phabricator.services.mozilla.com/D120853
2021-07-27 16:44:55 +00:00
Emilio Cobos Álvarez 02bbf0389a Bug 1722299 - Initial support for the color-scheme CSS property. r=mstange
Add initial support for the color-scheme CSS property, allowing pages to
choose between light and dark system colors per-element, and such.

Things that are left to do so that this can be enabled by default:

 * Dark system colors on Windows / Android / Standins.
 * Dark Canvas/CanvasText/Link visited colors (which right now are set
   via PreferenceSheet).
 * Dark form controls in nsNativeBasicTheme.
 * Processing the color-scheme meta tag to fill-in
   Document::mColorSchemeBits.

But this seems like enough progress to be landable on its own.

Differential Revision: https://phabricator.services.mozilla.com/D120843
2021-07-27 15:50:48 +00:00
Alexandre Poirot cf218bbc87 Bug 1721823 - [devtools] Make isServerTargetSwitchingEnabled be a runtime flag from server standpoint. r=jdescottes,devtools-backward-compat-reviewers
This helps enabling server targets only for local tabs descriptors
and so prevents enabling them for about:debugging toolboxes.
They are always using remote tabs descriptors and do not support target switching yet.

Differential Revision: https://phabricator.services.mozilla.com/D120629
2021-07-27 15:23:24 +00:00
Alexandre Poirot 2089c9ab98 Bug 1713670 - [devtools] Disable server targets in tests covering client targets. r=nchevobbe
target actor's will-navigate and navigate is no longer fired with server targets.
These two tests are still asserting them, so disable server target in these two tests.
We should probably remove them once we drop the server target preference (bug 1721852).

Differential Revision: https://phabricator.services.mozilla.com/D120947
2021-07-27 15:10:34 +00:00
Nicolas Chevobbe 8ded5695e6 Bug 1721911 - [devtools] Fix a11y inspector with server side target switch.r=ochameau.
Wait for accessibility front to be available on target switch in the client.
Disable accessibility service on ParentAccessibilityActor destroy.

Differential Revision: https://phabricator.services.mozilla.com/D120827
2021-07-27 12:19:56 +00:00
Hubert Boma Manilla 2c45a516e9 Bug 1722153 - [devtools] Fix blank stacktrace panel when opening from a second location r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D120819
2021-07-26 13:07:55 +00:00
Hubert Boma Manilla d54f0f14dd Bug 1721384 - [devtools] Fix browser_net_websocket_stacks.js with server side targets r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D120620
2021-07-26 11:51:53 +00:00
Nicolas Chevobbe c0db300844 Bug 1721398 - [devtools] Don't restore target configuration on target switching. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D120719
2021-07-26 10:07:22 +00:00
Alexandre Poirot 7889c33392 Bug 1721800 - [devtools] Fix browser_watcher-watchTargets-frames.js. r=jdescottes
We have to call TargetCommand.startListening() in order to have a functional TabDescriptor.getTarget

Differential Revision: https://phabricator.services.mozilla.com/D120615
2021-07-23 09:33:40 +00:00
Markus Stange e6f68680c1 Bug 1721072 - Clarify ActorReadyGeckoProfilerInterface situation. r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D120164
2021-07-22 18:54:30 +00:00
Alexandre Poirot dd56a80519 Bug 1721555 - [devtools] Fix browser_dbg-windowless-service-workers-reload.js with server side targets. r=nchevobbe
For some reason, the timing is different. Surprising that we never hit this issue before?!

Differential Revision: https://phabricator.services.mozilla.com/D120548
2021-07-22 10:01:14 +00:00
Alexandre Poirot a983d8402a Bug 1721372 - [devtools] Fix browser_styleeditor_inline_friendly_names.js with server side targets. r=nchevobbe
Destroy previous target before instantiating a new one.
Otherwise we will destroy it after having setup the new one
and the teardown sequence of the previous may undo the setup of the second.

Typically, in styleeditor, the `styleSheetChangeEventsEnabled` boolean would be toggled
to true by the new target and reset back to false by the old target.

Differential Revision: https://phabricator.services.mozilla.com/D120342
2021-07-22 09:16:18 +00:00
Alexandre Poirot 347ecc495f Bug 1713607 - [devtools] Emit DOCUMENT_EVENT will-navigate in case of bfcache navigations. r=nchevobbe,jdescottes
Introduce a new watcher for DOCUMENT_EVENT, now running in the parent process.
This watcher will only emit the "will-navigate" resource and we will stop emitting it from the
existing watcher, running in the content process. (except for iframe switching. i.e. the iframe dropdown menu)

We have to move it to the parent to better handle bfcache navigations
and more generally all navigations which are initiated from the parent process.
bfcacheInParent feature enabled many types of navigations to be controlled from the parent process.

This was especially important to have this implementation in the parent
because the navigation event may be fired too late in the content process.
Leading to will-navigate being emitted *after* the new target we navigate to is notified to the client.

Differential Revision: https://phabricator.services.mozilla.com/D116383
2021-07-22 08:14:26 +00:00
Alexandre Poirot 4175e07109 Bug 1721557 - [devtools] Fix browser_accessibility_walker.js with server side targets. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D120445
2021-07-22 07:35:05 +00:00
Nicolas Chevobbe 554490c7df Bug 1717625 - [devtools] Fix storage inspector tree when bfCacheInParent is enabled and server side target switching is disabled. r=ochameau.
In this patch, we pass a property alongside the DevToolsFrameChild:bf-cache-navigation-pageshow
message that indicates if a new target is being created as a result of this
bfcache navigation.
This flag is then used in the ParentProcessStorage to spawn a new StorageActorMock
when a new target is being created.

As a result we can stop disabling the bfCacheInParent pref in browser_storage_cookies_navigation.js,
where a bfcache navigation is performed.

Differential Revision: https://phabricator.services.mozilla.com/D120438
2021-07-22 05:33:30 +00:00
Markus Stange 40bbd6b5fe Bug 1720795 - Tweak some comments. r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D120034
2021-07-22 00:11:07 +00:00
Alexandre Poirot 995ba3de01 Bug 1721558 - [devtools] Fix browser_debugger_server.js with server side targets. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D120447
2021-07-21 15:58:09 +00:00
Nicolas Chevobbe bb2177bfd6 Bug 1721379 - [devtools] Don't reload page when re-applying target configuration when the target just got created. r=ochameau.
This makes browser_touch_device.js and browser_toolbox_rule_view_reload.js  pass
with server side target switching enabled.

Differential Revision: https://phabricator.services.mozilla.com/D120457
2021-07-21 12:46:51 +00:00
Nicolas Chevobbe 358dccd20c Bug 1721571 - [devtools] Remove ResponsiveActor (get|set|clear)MetaViewportOverride. r=ochameau,devtools-backward-compat-reviewers.
The functions were only called from RDM ui `updateTouchSimulation`, before
the call to updateConfiguration for touch simulation, based on the touch simulation value.
This means we can directly set the proper flag on the docShell in
BrowsingContextTargetActor#updateTargetConfiguration before handling touch simulation.

The devtools.responsive.metaViewport.enabled pref is removed, as it was set to
true by default, and wasn't exposed in any UI.

Differential Revision: https://phabricator.services.mozilla.com/D120456
2021-07-21 12:46:51 +00:00
Alexandre Poirot 6128df7650 Bug 1721561 - [devtools] Disable server targets for browser_spawn_actor_in_parent.js. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D120449
2021-07-21 12:45:32 +00:00
Alexandre Poirot 2bbd9e6888 Bug 1721559 - [devtools] Disable server targets for browser_setup_in_parent.js. r=nchevobbe
setupInParent is now only used by WebExt toolbox, which should have
server side targets enabled.
Keep setupInParent tests running until we migrate WebExt toolbox to resources.
This is blocked on supporting WebExt targets by the Watcher actor (bug 1675456).

We can't remove any usage of setupInParent in storage until this is done.

Differential Revision: https://phabricator.services.mozilla.com/D120448
2021-07-21 12:45:32 +00:00
Alexandre Poirot 48c02c41f1 Bug 1721364 - [devtools] Fix devtools/client/framework/test/browser_toolbox_window_title_frame_select.js with server side targets. r=nchevobbe
We weren't emitting window-ready in case of iframe switching,
leading to some breakage in walker actor not updating correctly when using the iframe dropdown.

Differential Revision: https://phabricator.services.mozilla.com/D120339
2021-07-21 08:24:01 +00:00
Dana Keeler a3a8d74a08 Bug 1712983 - memoize decoded certificates in devtools to avoid unnecessary work r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D118555
2021-07-19 20:15:49 +00:00
Alexandre Poirot 79a3ae0b0f Bug 1720512 - [devtools] Avoid storing and restoring broken breakpoints. r=jdescottes,bomsy
This is a bit surprising that broken breakpoints are stored
as the frontend seems to try to do a couple of assertions:
https://searchfox.org/mozilla-central/rev/c0fc8c4852e927b0ae75d893d35772b8c60ee06b/devtools/client/debugger/src/utils/breakpoint/index.js#84-106

But at least, now, we start using same assertions in both sides.

Differential Revision: https://phabricator.services.mozilla.com/D120002
2021-07-19 15:30:34 +00:00
Nicolas Chevobbe 3dd22f3100 Bug 1713072 - [devtools] Fix storage inspector cross process navigation when fission is disabled. r=ochameau.
In the ParentProcessStorage class, we are listening for window-global-created/destroyed
event to notify the client that hosts can be added/removed.
But in case of bfcache navigation, those events are not emitted.

In order to fix this issue, we forward pageshow and pagehide events from the
DevToolsFrameChild to the DevToolsFrameParent, where the watcher actor can emit
those events, which we'll be listened to by the ParentProcessStorage.

Test cases are added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D118325
2021-07-19 12:29:44 +00:00
Alexandre Poirot fccb304b45 Bug 1625026 - [devtools] Accept final about:blank documents in DevToolsFrameChild. r=jdescottes
This helps create targets in the browser toolbox for tabs loaded directly against about:blank.

Differential Revision: https://phabricator.services.mozilla.com/D117913
2021-07-15 13:58:30 +00:00
Alexandre Poirot aa3263e294 Bug 1625026 - [devtools] Accept about:blank documents in frame target helpers. r=jdescottes
The check from `shouldNotifyWindowGlobal` was only used from frame-target helper, from the parent process.
The only case it was filtering out was for browser toolbox watcher,
where we were filtering out tabs with about:blank loaded in a content process.
We weren't having any issues around about:blank with tab watchers.
I added test coverage for tab watchers, but they were already passing.

The check in DevToolsFrameChild was wrong with the browser toolbox codepath.
We don't have any browserId. This wasn't throwing because shouldNotifyWindowGlobal
was rejecting the about:blank documents.
This issue was catched by browser_console_content_object_in_sidebar.js,
which probably only involve about:blank documents.

Differential Revision: https://phabricator.services.mozilla.com/D117466
2021-07-15 13:58:29 +00:00
Markus Stange d46be492d2 Bug 1719935 - Remove unused "gzipped" option from ActorReadyGeckoProfilerInterface. r=canaltinova
ActorReadyGeckoProfilerInterface is used in two contexts:
 - For the perf actor, which is used when the profiler is used from the
   devtools Performance panel or via remote debugging (on about:debugging), and
 - On about:profiling, which only exercises a subset of the interface's methods
   because about:profiling does not have any UI for capturing profiles.

There are three other ways to capture profiles:
 - The global browser keyboard shortcuts (implemented in DevToolsStartup.jsm)
 - Clicking the toolbarbutton directly (implemented in popup/menu-button.jsm.js)
 - Clicking the Capture button inside the popup (implemented in popup/panel.jsm.js)

These three other ways use functions in popup/background.jsm.js to capture the profile.
They do not call ActorReadyGeckoProfilerInterface.getProfileAndStopProfiler().

When the ActorReadyGeckoProfilerInterface instance for the perf actor is created,
we pass { gzipped: false }. Consequently, ActorReadyGeckoProfilerInterface.getProfileAndStopProfiler()
is only ever called with gzipped: false. So the option can be removed.

The other three ways to capture profiles, which use captureProfile in
popup/background.jsm.js, always get the gzipped profile because captureProfile
calls Services.profiler.getProfileDataAsGzippedArrayBuffer().

Differential Revision: https://phabricator.services.mozilla.com/D119561
2021-07-13 21:43:46 +00:00
Masayuki Nakano 3169bc5de5 Bug 1720252 - Get rid of "dom.input_events.beforeinput.enabled" from tests r=smaug
`beforeinput` event was shipped and it won't be disabled for avoiding confusion
of web developers. So, we can drop the pref setting of
"dom.input_events.beforeinput.enabled" in our tests.

Depends on D119716

Differential Revision: https://phabricator.services.mozilla.com/D119729
2021-07-13 10:02:12 +00:00
Alexandre Poirot 0aae4b0803 Bug 1717005 - [devtools] Simplify nested event loop management. r=jdescottes,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D118174
2021-07-12 21:04:56 +00:00
Alexandre Poirot e260f44463 Bug 1717005 - [devtools] Stop using unsafeSynchronize. r=jdescottes,bomsy
I don't think it was any useful to block synchronously on the call to `doResume`.
In the past it used to send an event to the client synchronously,
it may have been important back then.

test_nesting-03.js is still covering nested event loop by using two clients.

Differential Revision: https://phabricator.services.mozilla.com/D118173
2021-07-12 21:04:55 +00:00
Alexandre Poirot 10a90f5347 Bug 1715916 - Disable browser_storage_dynamic_windows.js on debug builds. r=nchevobbe DONTBUILD
Slow runtimes highlight race conditions explain in bugzilla comment 3,
which aren't trivial to address. So better disable this test on debug builds for now.
And at least keep it running on opt.

Differential Revision: https://phabricator.services.mozilla.com/D119323
2021-07-08 11:58:38 +00:00
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
Luca Greco 8ea86f2461 Bug 1719187 - Fix test_addon_debugging_connect.js intermittent failures. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D119121
2021-07-06 09:54:57 +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
Julian Descottes 281bb4cb1c Bug 1718279 - [devtools] Addon toolbox reload should use the addon manager r=ochameau
Depends on D118473

Differential Revision: https://phabricator.services.mozilla.com/D118851
2021-07-06 07:02:31 +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 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 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 30c134da37 Bug 1717861 - [devtools] Remove willInterrupt event from ThreadActor r=ochameau,devtools-backward-compat-reviewers
Depends on D118607

Differential Revision: https://phabricator.services.mozilla.com/D118875
2021-07-05 15:58:46 +00:00
Julian Descottes d71a5c5014 Bug 1717861 - [devtools] Remove poppedFrames from ThreadActor paused event r=ochameau,devtools-backward-compat-reviewers
Depends on D118471

Differential Revision: https://phabricator.services.mozilla.com/D118607
2021-07-05 15:58:46 +00:00
Luca Greco 511741e57d Bug 1467313 - Replace disabled addon debugging mochitest-chrome test with a new devtools xpcshell test. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D118709
2021-07-05 12:54:56 +00:00