Closed Bug 1615283 Opened 4 years ago Closed 4 years ago

Use a shared test helper to navigate in DevTools tests


(DevTools :: Framework, task, P1)



(Fission Milestone:M6, firefox75 fixed)

Firefox 75
Fission Milestone M6
Tracking Status
firefox75 --- fixed


(Reporter: ochameau, Assigned: ochameau)



(Whiteboard: dt-fission-m2-mvp )


(5 files)

Bug 1613035 tweaked the console helper (loadDocument) used to navigate to a new page.
This was done to better support navigation which spawn a new process and target.
But similar work will be necessary for all panels.
So that it would be benefitial to use a shared test helper when we want to navigate to a new URL, while a toolbox is opened.

Bug 1605763 also applied a similar code to webconsole's loadDocument and it would be nice to share a common waiting code.

We should probably track all the usages of BrowserTestUtils.loadURI and replace all these callsites with a DevTools specific helper, which would wait for toolbox's switched-target event.

Such work would probably be required when we will want to enable target-switching by default.

Assignee: nobody → poirot.alex

This is meant to support all needs we have when navigating to a new document,
while a toolbox is opened. When you don't have one, you should fallback
to BrowserTestUtils helpers.
It looks like, we never navigate in a background tab, so there is no need
to pass a browser element. We may introduce an optional argument if necessary.

The netmonitor may benefit from a custom helper to open the netmonitor and navigate to an URL
as the current code forces a bit of duplication between each test.

See the first bug's changeset, we don't really need a context, but only the URL.
I choose "navigateTo" name as it aligns with other existing helper and the method on the Target actor.

As for the console, we don't really have to pass a context as we always
navigate in the foremost tab. We would need to pass a context if the tab was in background.

Priority: P2 → P1

Tracking dt-fission-m2-mvp bugs for Fission Nightly (M6) milestone

Fission Milestone: --- → M6
Pushed by
Implement a shared `navigateTo` helper. r=nchevobbe
Use shared `navigateTo` helper instead of BrowserTestUtils.loadURI. r=nchevobbe
Migrate console from loadDocument to navigateTo. r=nchevobbe
Converge random other navigation patterns to the unique navigateTo helper. r=nchevobbe
Redirect old inspector "navigateTo" to the new shared helper. r=nchevobbe
Regressions: 1616119
Regressions: 1616113
Blocks: 1616207
Blocks: 1616273
You need to log in before you can comment on or make changes to this bug.