Closed Bug 1615283 Opened 5 years ago Closed 5 years ago

Use a shared test helper to navigate in DevTools tests

Categories

(DevTools :: Framework, task, P1)

task

Tracking

(Fission Milestone:M6, firefox75 fixed)

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

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

(Whiteboard: dt-fission-m2-mvp )

Attachments

(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.

Status: NEW → ASSIGNED
Priority: P2 → P1

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

Fission Milestone: --- → M6
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2da062c1a88b Implement a shared `navigateTo` helper. r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/a0fc038db5b6 Use shared `navigateTo` helper instead of BrowserTestUtils.loadURI. r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/6fc2ecf60dd1 Migrate console from loadDocument to navigateTo. r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/a838dc056fa9 Converge random other navigation patterns to the unique navigateTo helper. r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/cd53a0220c50 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.

Attachment

General

Created:
Updated:
Size: