Bug 1810995 - rename BrowserTestUtils' loadURI to loadURIString to more accurately reflect what it does, r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D167150
This commit is contained in:
Gijs Kruitbosch 2023-01-19 20:16:41 +00:00
parent 2a48a3fd2f
commit 01b24928ce

View file

@ -933,12 +933,23 @@ export var BrowserTestUtils = {
* @param {string} uri
* The URI to load.
*/
loadURI(browser, uri) {
loadURIString(browser, uri) {
browser.loadURI(uri, {
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
});
},
/**
* Compatibility shim. Should go away Very Soon.
* @param {xul:browser} browser
* A xul:browser.
* @param {string} uri
* The URI to load.
*/
loadURI(browser, uri) {
return this.loadURIString(browser, uri);
},
/**
* Maybe create a preloaded browser and ensure it's finished loading.
*