Closed Bug 1715012 Opened 3 years ago Closed 3 years ago

refreshTab now uses BrowserTestUtils.loadURI which has differences with gBrowser.reloadTab

Categories

(DevTools :: Framework, task)

task

Tracking

(firefox91 fixed)

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

In Bug 1714920, I'm trying to replace the usage of testActor.reload with refreshTab, but one test is failing:
In /browser_inspector_highlighter-06.js#23-24 the page does not keep the scroll position when "reloading" anymore.

My hunch is that since refreshTab uses loadURI to navigate, we're hitting a different path than with an actual reload.
In order to make refreshTab more reliable, we should keep using gBrowser.reloadTab.

In Bug 1710582, refreshTab switched to use navigateTo in order to handle target switching.
The catch is that navigateTo uses BrowserTestUtils.loadURI, which triggers a slightly
different behavior than gBrowser.reloadTab (for example, it does not keep the scroll position).
This patch introduces a new option in navigateTo where the consumer choose how
the navigation occurs, and we make refreshTab use gBrowser.reloadTab.

Attachment #9225610 - Attachment description: Bug 1715012 - [devtools] Make refreshTab use gBrowser.reloadTab for the navigation. r=ochameau. → Bug 1715012 - [devtools] Use gBrowser.reloadTab in navigateTo when the provided URL is the same as the current one. r=ochameau.
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/effb13df8fcd
[devtools] Use gBrowser.reloadTab in navigateTo when the provided URL is the same as the current one. r=ochameau.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: