Closed Bug 1691836 Opened 3 years ago Closed 3 years ago

Inspector Markup view might not be fully initialized after using Toolbox::selectTool

Categories

(DevTools :: Inspector, task, P3)

task

Tracking

(firefox87 fixed)

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

Attachments

(1 file)

See https://phabricator.services.mozilla.com/D104206#inline-585178 for more context.

When the inspector panel is returned by a call to await toolbox.selectTool("inspector") it is not fully loaded yet. The markup view frame has loaded its document, but the inspector will still be expanding the selected node, etc...

To workaround this, tests wait for an additional inspector-updated event (see https://searchfox.org/mozilla-central/search?q=inspector._updateProgress&path=test)

We could try to change the inspector init logic to wait until the "reloaded" event instead of the "markuploaded" event to resolve the initial open call.

We used to only wait until the markup view document was loaded, via the markuploaded event.
This lead tests to wait for additional events to make sure the inspector markup view could
be interacted with.

Here we wait for a new dedicated internal promise instead of an event.
This promise is only resolved once the inspector has initialized the markup view.

Test helpers are updated to stop listening for additional events.

Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6d7ff75c6ab8
[devtools] Wait for the initialization of markupview in inspector open() r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: