Fix two possible race conditions:
* short lived processes spawn by the test ends up breaking listAllWorkers where the listWorker request
made against a content process target is throwing because its DevToolsServerConnection is closed.
* the worker created by the test may actually still be visible to WorkerDebuggerManager,
so use a better technique to catch the WorkerDebugger's id.
Differential Revision: https://phabricator.services.mozilla.com/D131442
This adds `Localization` to `builtin-modules.js` to make it accessible from
`definitions.js`. It's likely that the abstractions used in `definitions.js`
will need to be revisited when `startup.properties` is also migrated to Fluent.
Differential Revision: https://phabricator.services.mozilla.com/D131219
This required 2 changes:
- fixing WatcherActor notifyTargetAvailable so we get notified about the iframe
target when doing a bfcache navigation (a test case is added in browser_target_command_bfcache.js as well)
- Checking is the target isn't destroyed in inspector onTargetSelected
Differential Revision: https://phabricator.services.mozilla.com/D131471
Well, the RDP method "detach" still exists, but is now destroying the target actor.
There is no more intermediate state where the actor is "detached" but not destroyed,
which is confusing and no longer useful now that we can longer attach again.
Differential Revision: https://phabricator.services.mozilla.com/D130916
This might make the leftover "detach" method a bit more special.
But ideally we would get rid of it and convert it to a call to target actor's destroy method.
Differential Revision: https://phabricator.services.mozilla.com/D130915
By doing that, we no longer have to ensure calling attach here and there.
Some followups will be helpful to get rid of detach and all mentions of attach/detach/attached.
Some code, like descriptors and tests are still calling attach, which is now a no-op.
Gettind rid of detach might be slightly more complicated.
Differential Revision: https://phabricator.services.mozilla.com/D130843
Calling attach was important to bootstrap the thread actor and retrieve its actorID.
But now with server target this is done early on and we already retrieve the actorID
via form(). Except for workers, but I fixed that.
The next patch will ensure that, on the server side we fully initialize the target actors
as soon as they are created.
Differential Revision: https://phabricator.services.mozilla.com/D130842
A new method is added in the HighlighterTestActor to retrieve information about
the highglighter.
The test highlights (pun intended) the issue described in Bug 1740509.
Differential Revision: https://phabricator.services.mozilla.com/D130875
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 wasn't used except for a test and wasn't working with server side targets.
Making this compatible with SST wasn't trivial, so I went for removing this.
Differential Revision: https://phabricator.services.mozilla.com/D130919
Annotating each test individually lets us avoid introducing new failing tests
while we go through the backlog of failing tests.
Depends on D129162
Differential Revision: https://phabricator.services.mozilla.com/D129163
Annotating each test individually lets us avoid introducing new failing tests
while we go through the backlog of failing tests.
Depends on D129162
Differential Revision: https://phabricator.services.mozilla.com/D129163
Otherwise, the warning is displayed:
```
WARNING: Could not lex literal_block as "json". Highlighting skipped.
```
Depends on D131092
Differential Revision: https://phabricator.services.mozilla.com/D131093
The getBackgroundColor already has fallback paths for several situations.
We now use the fallback in case getAdjustedQuads returned an empty array.
A browser mochitest is added to cover this issue as well.
Differential Revision: https://phabricator.services.mozilla.com/D130750
Both window_bug1369072.html and browser_scroll.js have a pattern something like;
1) Call synthesizeKey to scroll an element
2) Wait a scroll event
3) Test something
4) (Re)set the scroll position to (0, 0) by calling Element.scrollTop and
Element.scrollLeft or scrollTo.
With the new transmogrification the step 4) will not reset the scroll position
if there's an on-going scroll animation in APZ triggered by the synthesizeKey.
To avoid the situation where there's an on-going animation at the step 4), we
destroy the corresponding scrollable frame and reconstruct it so that it
clobbers the animation.
Differential Revision: https://phabricator.services.mozilla.com/D130852
The method was throwing if the toolbox was opened with a panel different than
the inspector one but for which we do initialize the inspector front (e.g. Accessibility Panel).
Differential Revision: https://phabricator.services.mozilla.com/D130854
Those tests are passing with Fission enabled, as well as with EFT enabled.
it would be better to not skip them, so we remove the annotation, and use specific
assertions to handle cases where the tests shouldn't pass.
Differential Revision: https://phabricator.services.mozilla.com/D130244
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
The iframe picker code is refactored a bit so it's easier to follow.
This patch makes it so we support both EFT and non EFT scenarios.
Differential Revision: https://phabricator.services.mozilla.com/D130241
Those tests are passing with Fission enabled, as well as with EFT enabled.
it would be better to not skip them, so we remove the annotation, and use specific
assertions to handle cases where the tests shouldn't pass.
Differential Revision: https://phabricator.services.mozilla.com/D130244
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
The iframe picker code is refactored a bit so it's easier to follow.
This patch makes it so we support both EFT and non EFT scenarios.
Differential Revision: https://phabricator.services.mozilla.com/D130241
Using --theme-contrast-color. Sadly --theme-contrast-background looks pretty bad in dark theme, so we can't use the background color.
But the text color itself is fine against --theme-selection-background-hover, so let's use this
Differential Revision: https://phabricator.services.mozilla.com/D130754
The patch for Bug 1737993 did a very readable but not performant replacement
of lodash `without` usage in `getInScopeLines`.
This patch changes things a bit so we get a similar level of performance as
what we had before, when using `without`.
For this we :
- make `getOutOfScopeLines` returns a `Set` so checking inclusion is faster
- create the final array of "in scope lines" using a for loop and assigning
line number when needed, and then filtering out empty slots.
Differential Revision: https://phabricator.services.mozilla.com/D130742
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
The 0 timeout wasn't enough on some platform, so we reload the page before calling
the method; since we're targetting an iframe that takes a few seconds to load,
the call should time out every time.
Differential Revision: https://phabricator.services.mozilla.com/D130612
The test is tagged as `fail-if= a11y_checks`, but as patch for Bug 1738124 switched
to Element.click, we don't get the expected failure anymore (since the a11y_check
task does not perform assertion on element.click).
Let's revert to the original behavior so we can still see that the test need
some a11y work.
Differential Revision: https://phabricator.services.mozilla.com/D130610