Closed Bug 1810995 Opened 2 years ago Closed 2 years ago

Rename BrowserTestUtils.loadURI to BrowserTestUtils.loadURIString

Categories

(Testing :: Mochitest, defect)

Default
Desktop
All
defect

Tracking

(firefox111 fixed)

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

Details

Attachments

(6 files)

In bug 1810141 we discussed making loadURI take an actual URI and using fixupAndLoadURI for strings, to make it clear what is happening.

One annoying thing is that BrowserTestUtils also has a loadURI API with slightly different params (that takes a string).

I think tests should actually use this API with strings (because they're usually hardcoded and forcing individual tests to make URI instances would be bad dev ergonomics) but they should probably actually not use fixup (because the URIs should be harcoded so we should just try to create the URI).

As a first step to make all these distinctions more explicit, and to make it easier to refactor docshell/webnavigation/browsingcontext's loadURI method, let's rename the BTU method. Because this is reliably called on BrowserTestUtils, this is easy to do automatically.

Attached file jscodeshift transformation (deleted) —
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/123292be486e rename BrowserTestUtils' loadURI to loadURIString to more accurately reflect what it does, r=Standard8 https://hg.mozilla.org/integration/autoland/rev/87e779a95478 update BrowserTestUtils.loadURI consumers to use loadURIString (automated) - toolkit/ - r=Standard8,nchevobbe https://hg.mozilla.org/integration/autoland/rev/1c487fd7fbe4 update BrowserTestUtils.loadURI consumers to use loadURIString (automated) - dom and docshell - r=Standard8 https://hg.mozilla.org/integration/autoland/rev/b1e3a79aa45f update BrowserTestUtils.loadURI consumers to use loadURIString (automated) - browser - r=Standard8 https://hg.mozilla.org/integration/autoland/rev/0cc77d71b6b0 update BrowserTestUtils.loadURI consumers to use loadURIString (automated) - other directories - r=Standard8,webdriver-reviewers,whimboo
Regressions: 1811386
No longer regressions: 1811386
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: