Use a shared test helper to navigate in DevTools tests
Categories
(DevTools :: Framework, task, P1)
Tracking
(Fission Milestone:M6, firefox75 fixed)
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 | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
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.
Assignee | ||
Comment 2•5 years ago
|
||
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.
Assignee | ||
Comment 3•5 years ago
|
||
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.
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
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.
Updated•5 years ago
|
Comment 6•5 years ago
|
||
Tracking dt-fission-m2-mvp bugs for Fission Nightly (M6) milestone
Assignee | ||
Comment 7•5 years ago
|
||
Comment 9•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2da062c1a88b
https://hg.mozilla.org/mozilla-central/rev/a0fc038db5b6
https://hg.mozilla.org/mozilla-central/rev/6fc2ecf60dd1
https://hg.mozilla.org/mozilla-central/rev/a838dc056fa9
https://hg.mozilla.org/mozilla-central/rev/cd53a0220c50
Description
•