зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1810995 - update BrowserTestUtils.loadURI consumers to use loadURIString (automated) - toolkit/ - r=Standard8,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D167151
This commit is contained in:
Родитель
01b24928ce
Коммит
38016dd0ff
|
@ -80,7 +80,7 @@ add_task(async function() {
|
|||
false,
|
||||
encodeURI(EXAMPLE_ORG_URI)
|
||||
);
|
||||
BrowserTestUtils.loadURI(newTab.linkedBrowser, EXAMPLE_ORG_URI);
|
||||
BrowserTestUtils.loadURIString(newTab.linkedBrowser, EXAMPLE_ORG_URI);
|
||||
await onBrowserLoaded;
|
||||
|
||||
isnot(
|
||||
|
|
|
@ -44,7 +44,7 @@ add_task(async function testMultipleNavigations() {
|
|||
gBrowser,
|
||||
TEST_URI_ORG
|
||||
);
|
||||
BrowserTestUtils.loadURI(gBrowser, TEST_URI_ORG);
|
||||
BrowserTestUtils.loadURIString(gBrowser, TEST_URI_ORG);
|
||||
await onLocationChange;
|
||||
|
||||
info("And then navigate to a different origin");
|
||||
|
@ -52,7 +52,7 @@ add_task(async function testMultipleNavigations() {
|
|||
gBrowser,
|
||||
TEST_URI_COM
|
||||
);
|
||||
BrowserTestUtils.loadURI(gBrowser, TEST_URI_COM);
|
||||
BrowserTestUtils.loadURIString(gBrowser, TEST_URI_COM);
|
||||
await onLocationChange;
|
||||
|
||||
info(
|
||||
|
|
|
@ -83,7 +83,7 @@ async function navigateTo(uri, browser, animationInspector, inspector) {
|
|||
const previousAnimationsFront = animationInspector.animationsFront;
|
||||
const onReloaded = inspector.once("reloaded");
|
||||
const onUpdated = inspector.once("inspector-updated");
|
||||
BrowserTestUtils.loadURI(browser, uri);
|
||||
BrowserTestUtils.loadURIString(browser, uri);
|
||||
await waitUntil(
|
||||
() => previousAnimationsFront !== animationInspector.animationsFront
|
||||
);
|
||||
|
|
|
@ -104,7 +104,10 @@ add_task(async function() {
|
|||
await _selectSidebarPanel(inspector, "changesview");
|
||||
|
||||
info("Navigate to another page");
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, _toDataURL(TEST_ANOTHER_URI));
|
||||
BrowserTestUtils.loadURIString(
|
||||
tab.linkedBrowser,
|
||||
_toDataURL(TEST_ANOTHER_URI)
|
||||
);
|
||||
|
||||
info("Select the compatibility panel again");
|
||||
const onSelectedNodePaneUpdated = waitForUpdateSelectedNodeAction(
|
||||
|
|
|
@ -71,6 +71,6 @@ async function navigateTo(uri, tab, { store }) {
|
|||
const onSelectedNodeUpdated = waitForUpdateSelectedNodeAction(store);
|
||||
const onTopLevelTargetUpdated = waitForUpdateTopLevelTargetAction(store);
|
||||
const onLoaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, uri);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, uri);
|
||||
await Promise.all([onLoaded, onSelectedNodeUpdated, onTopLevelTargetUpdated]);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ add_task(async function() {
|
|||
// See next comments.
|
||||
const browser = tab.linkedBrowser;
|
||||
const onBrowserLoaded = BrowserTestUtils.browserLoaded(browser);
|
||||
BrowserTestUtils.loadURI(browser, TEST_URL);
|
||||
BrowserTestUtils.loadURIString(browser, TEST_URL);
|
||||
await onBrowserLoaded;
|
||||
|
||||
// We do not want to wait for the inspector to be fully ready before testing
|
||||
|
|
|
@ -33,7 +33,7 @@ add_task(async function() {
|
|||
// flag will be applied to the loadgroup, such that the sub resources
|
||||
// are forced to be revalidated. So we use `BrowserTestUtils.loadURI` to
|
||||
// avoid having `VALIDATE_ALWAYS` applied.
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, IMAGE_CACHE_URL);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, IMAGE_CACHE_URL);
|
||||
await waitForEvents;
|
||||
|
||||
const requests = document.querySelectorAll(".request-list-item");
|
||||
|
|
|
@ -152,7 +152,7 @@ add_task(async function() {
|
|||
store.dispatch(Actions.batchEnable(false));
|
||||
|
||||
const wait = waitForNetworkEvents(monitor, EXPECTED_REQUESTS.length);
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, INITIATOR_URL);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, INITIATOR_URL);
|
||||
|
||||
registerFaviconNotifier(tab.linkedBrowser);
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ addRDMTask(TEST_COM_URL, async function({ ui, browser, tab }) {
|
|||
const previousBrowsingContextId = browser.browsingContext.id;
|
||||
|
||||
const waitForDevToolsReload = await watchForDevToolsReload(browser);
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
URL_ROOT_ORG_SSL + TEST_DOCUMENT + "?crossOriginIsolated=true"
|
||||
);
|
||||
|
|
|
@ -98,7 +98,7 @@ addRDMTask(TEST_COM_URL, async function({ ui }) {
|
|||
const previousBrowsingContextId = browser.browsingContext.id;
|
||||
const waitForReload = await watchForDevToolsReload(browser);
|
||||
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
URL_ROOT_ORG_SSL + TEST_DOCUMENT + "?crossOriginIsolated=true"
|
||||
);
|
||||
|
|
|
@ -34,7 +34,7 @@ addRDMTask(
|
|||
// wait specifically for the redirected page
|
||||
url => url.includes(`?redirected`)
|
||||
);
|
||||
BrowserTestUtils.loadURI(browser, `${TEST_URL}?redirect`);
|
||||
BrowserTestUtils.loadURIString(browser, `${TEST_URL}?redirect`);
|
||||
await onRedirectedPageLoaded;
|
||||
|
||||
info("Check the user agent for each requests");
|
||||
|
|
|
@ -45,7 +45,7 @@ function testNavigate(target) {
|
|||
}
|
||||
});
|
||||
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TAB2_URL);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, TAB2_URL);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -566,7 +566,7 @@ async function navigateTo(
|
|||
if (uri === browser.currentURI.spec) {
|
||||
gBrowser.reloadTab(gBrowser.getTabForBrowser(browser));
|
||||
} else {
|
||||
BrowserTestUtils.loadURI(browser, uri);
|
||||
BrowserTestUtils.loadURIString(browser, uri);
|
||||
}
|
||||
|
||||
if (waitForLoad) {
|
||||
|
|
|
@ -21,7 +21,7 @@ add_task(async function() {
|
|||
const onBrowserLoaded = BrowserTestUtils.browserLoaded(
|
||||
gBrowser.selectedBrowser
|
||||
);
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_URI_REPLACED);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, TEST_URI_REPLACED);
|
||||
await onBrowserLoaded;
|
||||
|
||||
const toolbox = await openToolboxForTab(gBrowser.selectedTab, "webconsole");
|
||||
|
|
|
@ -47,7 +47,7 @@ async function testCrossProcessTabNavigation(browser, resourceCommand) {
|
|||
);
|
||||
|
||||
const onLoaded = BrowserTestUtils.browserLoaded(browser);
|
||||
await BrowserTestUtils.loadURI(browser, TEST_URL);
|
||||
await BrowserTestUtils.loadURIString(browser, TEST_URL);
|
||||
await onLoaded;
|
||||
|
||||
info("Wait for log message");
|
||||
|
|
|
@ -283,7 +283,7 @@ async function testBfCacheNavigation() {
|
|||
const secondLocation = "data:text/html,<title>second</title>second page";
|
||||
const tab = await addTab(firstLocation);
|
||||
const onLoaded = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, secondLocation);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, secondLocation);
|
||||
await onLoaded;
|
||||
|
||||
const { commands } = await initResourceCommand(tab);
|
||||
|
@ -425,7 +425,7 @@ async function testCrossOriginNavigation() {
|
|||
"https://example.net/document-builder.sjs?html=<head><title>titleNet</title></head>net";
|
||||
const onLoaded = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
|
||||
const targetBeforeNavigation = commands.targetCommand.targetFront;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, netUrl);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, netUrl);
|
||||
await onLoaded;
|
||||
|
||||
// We are switching to a new target only when fission is enabled...
|
||||
|
@ -570,7 +570,7 @@ async function testDomCompleteWithWindowStop() {
|
|||
</html>`;
|
||||
const secondLocation = "data:text/html," + encodeURIComponent(html);
|
||||
const targetBeforeNavigation = commands.targetCommand.targetFront;
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, secondLocation);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, secondLocation);
|
||||
info(
|
||||
"Wait for will-navigate, dom-loading, dom-interactive and dom-complete events"
|
||||
);
|
||||
|
|
|
@ -263,7 +263,7 @@ async function assertNetworkResourcesOnPage(
|
|||
|
||||
// Load the test page that fires network requests
|
||||
const onLoaded = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, url);
|
||||
await onLoaded;
|
||||
|
||||
// Make sure we processed all the expected request updates
|
||||
|
|
|
@ -110,7 +110,7 @@ add_task(async function testRootNodeFrontIsCorrect() {
|
|||
|
||||
info("Navigate to another URL");
|
||||
rootNodePromise = new Promise(r => (rootNodeResolve = r));
|
||||
BrowserTestUtils.loadURI(browser, `data:text/html,<div id=div3>`);
|
||||
BrowserTestUtils.loadURIString(browser, `data:text/html,<div id=div3>`);
|
||||
const root3 = await rootNodePromise;
|
||||
info("Check we can query an expected node under the retrieved root");
|
||||
const div3 = await root3.walkerFront.querySelector(root3, "div");
|
||||
|
|
|
@ -255,7 +255,7 @@ add_task(async function testSourcesOnload() {
|
|||
onAvailable: resources => availableResources.push(...resources),
|
||||
});
|
||||
|
||||
await BrowserTestUtils.loadURI(tab.linkedBrowser, TEST_URL);
|
||||
await BrowserTestUtils.loadURIString(tab.linkedBrowser, TEST_URL);
|
||||
|
||||
// Some sources may be created after the document is done loading (like eventHandler usecase)
|
||||
// so we may be received *after* watchResource resolved
|
||||
|
|
|
@ -184,7 +184,7 @@ add_task(async function() {
|
|||
);
|
||||
const previousBrowsingContextId = tab.linkedBrowser.browsingContext.id;
|
||||
const onLoaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
await BrowserTestUtils.loadURI(
|
||||
await BrowserTestUtils.loadURIString(
|
||||
tab.linkedBrowser,
|
||||
TEST_URI_NEW_BROWSING_CONTEXT
|
||||
);
|
||||
|
|
|
@ -55,7 +55,7 @@ add_task(async function() {
|
|||
|
||||
let onSwitched = targetCommand.once("switched-target");
|
||||
info("Navigate to another process");
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, "about:robots");
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, "about:robots");
|
||||
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
|
||||
await onSwitched;
|
||||
|
||||
|
@ -67,7 +67,7 @@ add_task(async function() {
|
|||
|
||||
info("Navigate back to data: URI");
|
||||
onSwitched = targetCommand.once("switched-target");
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_URI);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, TEST_URI);
|
||||
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
|
||||
await onSwitched;
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ add_task(async function() {
|
|||
gBrowser.selectedBrowser,
|
||||
/* includeSubFrames */ true
|
||||
);
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
gBrowser.selectedBrowser,
|
||||
URL_ROOT_ORG_SSL + TEST_DOCUMENT + "?crossOriginIsolated=true"
|
||||
);
|
||||
|
|
|
@ -91,7 +91,7 @@ add_task(async function() {
|
|||
gBrowser.selectedBrowser,
|
||||
/* includeSubFrames */ true
|
||||
);
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
gBrowser.selectedBrowser,
|
||||
URL_ROOT_ORG_SSL + TEST_DOCUMENT + "?crossOriginIsolated=true"
|
||||
);
|
||||
|
|
|
@ -70,7 +70,7 @@ add_task(async function() {
|
|||
gBrowser.selectedBrowser,
|
||||
/* includeSubFrames */ true
|
||||
);
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
gBrowser.selectedBrowser,
|
||||
URL_ROOT_ORG_SSL + TEST_DOCUMENT + "?crossOriginIsolated=true"
|
||||
);
|
||||
|
|
|
@ -96,7 +96,7 @@ add_task(async function() {
|
|||
gBrowser.selectedBrowser,
|
||||
true
|
||||
);
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
gBrowser.selectedBrowser,
|
||||
URL_ROOT_ORG_SSL + TEST_DOCUMENT + "?crossOriginIsolated=true"
|
||||
);
|
||||
|
|
|
@ -111,7 +111,7 @@ async function testTopLevelNavigations(bfcacheInParent) {
|
|||
false,
|
||||
secondPageUrl
|
||||
);
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, secondPageUrl);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, secondPageUrl);
|
||||
await onLoaded;
|
||||
|
||||
// Assert BrowsingContext changes as it impact the behavior of targets
|
||||
|
@ -368,7 +368,7 @@ async function testTopLevelNavigationsOnDocumentWithIframe(bfcacheInParent) {
|
|||
false,
|
||||
secondPageUrl
|
||||
);
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, secondPageUrl);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, secondPageUrl);
|
||||
await onLoaded;
|
||||
|
||||
if (bfcacheInParent || isServerTargetSwitchingEnabled()) {
|
||||
|
|
|
@ -95,7 +95,7 @@ async function testNavigationToParentProcessDocument() {
|
|||
const onSwitchedTarget = targetCommand.once("switched-target");
|
||||
const browser = tab.linkedBrowser;
|
||||
const onLoaded = BrowserTestUtils.browserLoaded(browser);
|
||||
await BrowserTestUtils.loadURI(browser, secondLocation);
|
||||
await BrowserTestUtils.loadURIString(browser, secondLocation);
|
||||
await onLoaded;
|
||||
is(
|
||||
browser.browsingContext.currentWindowGlobal.osPid,
|
||||
|
@ -166,7 +166,7 @@ async function testNavigationToAboutBlankDocument() {
|
|||
const onSwitchedTarget = targetCommand.once("switched-target");
|
||||
const browser = tab.linkedBrowser;
|
||||
const onLoaded = BrowserTestUtils.browserLoaded(browser);
|
||||
await BrowserTestUtils.loadURI(browser, secondLocation);
|
||||
await BrowserTestUtils.loadURIString(browser, secondLocation);
|
||||
await onLoaded;
|
||||
|
||||
if (isServerTargetSwitchingEnabled()) {
|
||||
|
@ -510,7 +510,7 @@ async function testTabFrames(mainRoot) {
|
|||
|
||||
const browser = tab.linkedBrowser;
|
||||
const onLoaded = BrowserTestUtils.browserLoaded(browser);
|
||||
await BrowserTestUtils.loadURI(browser, SECOND_PAGE_URL);
|
||||
await BrowserTestUtils.loadURIString(browser, SECOND_PAGE_URL);
|
||||
await onLoaded;
|
||||
|
||||
if (isFissionEnabled() || isEveryFrameTargetEnabled()) {
|
||||
|
|
|
@ -61,7 +61,7 @@ add_task(async function test_NavigationBetweenTwoDomains_NoDestroy() {
|
|||
});
|
||||
|
||||
info("Go to .org page, wait for onAvailable to be called");
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, ORG_PAGE_URL);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, ORG_PAGE_URL);
|
||||
await checkHooks(hooks, {
|
||||
available: 2,
|
||||
destroyed: 0,
|
||||
|
@ -88,7 +88,7 @@ add_task(async function test_NavigationBetweenTwoDomains_NoDestroy() {
|
|||
const onBrowserLoaded = BrowserTestUtils.browserLoaded(
|
||||
gBrowser.selectedBrowser
|
||||
);
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, COM_PAGE_URL);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, COM_PAGE_URL);
|
||||
await onBrowserLoaded;
|
||||
await checkHooks(hooks, {
|
||||
available: 2,
|
||||
|
@ -147,7 +147,7 @@ add_task(async function test_NavigationBetweenTwoDomains_WithDestroy() {
|
|||
});
|
||||
|
||||
info("Go to .org page, wait for onAvailable to be called");
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, ORG_PAGE_URL);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, ORG_PAGE_URL);
|
||||
await checkHooks(hooks, {
|
||||
available: 2,
|
||||
destroyed: 1,
|
||||
|
@ -167,7 +167,7 @@ add_task(async function test_NavigationBetweenTwoDomains_WithDestroy() {
|
|||
await checkHooks(hooks, { available: 3, destroyed: 3, targets: [] });
|
||||
|
||||
info("Go back to page 1, wait for onDestroyed and onAvailable to be called");
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, COM_PAGE_URL);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, COM_PAGE_URL);
|
||||
await checkHooks(hooks, {
|
||||
available: 4,
|
||||
destroyed: 3,
|
||||
|
@ -241,7 +241,7 @@ async function testNavigationToPageWithExistingWorker({
|
|||
let onBrowserLoaded = BrowserTestUtils.browserLoaded(
|
||||
gBrowser.selectedBrowser
|
||||
);
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, ORG_PAGE_URL);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, ORG_PAGE_URL);
|
||||
|
||||
// Avoid TV failures, where target list still starts thinking that the
|
||||
// current domain is .com .
|
||||
|
@ -270,7 +270,7 @@ async function testNavigationToPageWithExistingWorker({
|
|||
|
||||
info("Go back .com page, wait for onAvailable to be called");
|
||||
onBrowserLoaded = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, COM_PAGE_URL);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, COM_PAGE_URL);
|
||||
await onBrowserLoaded;
|
||||
|
||||
await checkHooks(hooks, {
|
||||
|
|
|
@ -276,7 +276,7 @@ add_task(async function() {
|
|||
);
|
||||
|
||||
info("Check that navigating away does destroy all targets");
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
tab.linkedBrowser,
|
||||
"data:text/html,<meta charset=utf8>Away"
|
||||
);
|
||||
|
|
|
@ -92,7 +92,7 @@ add_task(async function() {
|
|||
|
||||
info("Check that navigating away does destroy all targets");
|
||||
const onBrowserLoaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
tab.linkedBrowser,
|
||||
"data:text/html,<meta charset=utf8>Away"
|
||||
);
|
||||
|
|
|
@ -151,7 +151,7 @@ async function testRemoteTab() {
|
|||
|
||||
const browser = tab.linkedBrowser;
|
||||
const onLoaded = BrowserTestUtils.browserLoaded(browser);
|
||||
await BrowserTestUtils.loadURI(browser, SECOND_TEST_URL);
|
||||
await BrowserTestUtils.loadURIString(browser, SECOND_TEST_URL);
|
||||
await onLoaded;
|
||||
|
||||
info("Wait for the new target");
|
||||
|
|
|
@ -26,7 +26,7 @@ const URL_ROOT = CHROME_URL_ROOT.replace(
|
|||
*/
|
||||
async function loadURL(browser, url) {
|
||||
const loaded = BrowserTestUtils.browserLoaded(browser);
|
||||
BrowserTestUtils.loadURI(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
return loaded;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ add_task(async function testAlertForceClosed() {
|
|||
"DOMModalDialogClosed"
|
||||
);
|
||||
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, "about:newtab");
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, "about:newtab");
|
||||
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
|
||||
|
|
|
@ -825,7 +825,7 @@ this.AntiTracking = {
|
|||
doAccessRemovalChecks &&
|
||||
options.accessRemoval == "navigate-topframe"
|
||||
) {
|
||||
BrowserTestUtils.loadURI(browser, TEST_4TH_PARTY_PAGE);
|
||||
BrowserTestUtils.loadURIString(browser, TEST_4TH_PARTY_PAGE);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
let pageshow = BrowserTestUtils.waitForContentEvent(
|
||||
|
|
|
@ -89,7 +89,7 @@ add_task(async function() {
|
|||
// the preflight cache is partitioned. The fetch will also be performed in
|
||||
// the iframe with the same origin as above to ensure we use the same
|
||||
// loading principal.
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, TEST_ANOTHER_PAGE);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, TEST_ANOTHER_PAGE);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
|
||||
await SpecialPowers.spawn(
|
||||
|
|
|
@ -48,7 +48,7 @@ function cleanupHSTS(aPartitionEnabled, aUseSite) {
|
|||
|
||||
function promiseTabLoadEvent(aTab, aURL, aFinalURL) {
|
||||
info("Wait for load tab event");
|
||||
BrowserTestUtils.loadURI(aTab.linkedBrowser, aURL);
|
||||
BrowserTestUtils.loadURIString(aTab.linkedBrowser, aURL);
|
||||
return BrowserTestUtils.browserLoaded(aTab.linkedBrowser, false, aFinalURL);
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,10 @@ add_task(async function test_includeSubDomains() {
|
|||
let certErrorLoaded = BrowserTestUtils.waitForErrorPage(
|
||||
tab.linkedBrowser
|
||||
);
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, unsecureNoCertSubEmptyURL);
|
||||
BrowserTestUtils.loadURIString(
|
||||
tab.linkedBrowser,
|
||||
unsecureNoCertSubEmptyURL
|
||||
);
|
||||
await certErrorLoaded;
|
||||
|
||||
// Verify the error page has the 'badStsCert' in its query string
|
||||
|
|
|
@ -89,7 +89,7 @@ add_task(async function() {
|
|||
|
||||
info("Let's load a page to populate some entries");
|
||||
let tab = (gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser));
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, cacheURL);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, cacheURL);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, cacheURL);
|
||||
|
||||
let argObj = {
|
||||
|
|
|
@ -110,9 +110,9 @@ async function openLookUpTelemetryTestPage(browser, testInTop, page, domain) {
|
|||
let clickFinishPromise = promiseBannerClickingFinish(domain);
|
||||
|
||||
if (testInTop) {
|
||||
BrowserTestUtils.loadURI(browser, page);
|
||||
BrowserTestUtils.loadURIString(browser, page);
|
||||
} else {
|
||||
BrowserTestUtils.loadURI(browser, TEST_ORIGIN_C);
|
||||
BrowserTestUtils.loadURIString(browser, TEST_ORIGIN_C);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
await SpecialPowers.spawn(browser, [page], async testURL => {
|
||||
|
@ -581,7 +581,7 @@ add_task(async function test_reload_telemetry() {
|
|||
);
|
||||
|
||||
// Load the page with another origin.
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, TEST_ORIGIN_B);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, TEST_ORIGIN_B);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
|
||||
// Trigger the reload
|
||||
|
@ -663,7 +663,7 @@ add_task(async function test_reload_telemetry_mode_reject() {
|
|||
});
|
||||
|
||||
// Load the page with the domain only has opt-in click rule.
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, TEST_ORIGIN_B);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, TEST_ORIGIN_B);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
|
||||
// Trigger the reload
|
||||
|
|
|
@ -48,7 +48,7 @@ async function visitTestSites(urls = [ORIGIN_A, ORIGIN_B, ORIGIN_C]) {
|
|||
let tab = BrowserTestUtils.addTab(gBrowser, "about:blank");
|
||||
|
||||
for (let url of urls) {
|
||||
await BrowserTestUtils.loadURI(tab.linkedBrowser, url);
|
||||
await BrowserTestUtils.loadURIString(tab.linkedBrowser, url);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
}
|
||||
|
||||
|
@ -328,7 +328,7 @@ add_task(async function test_pbm() {
|
|||
private: true,
|
||||
});
|
||||
let tab = BrowserTestUtils.addTab(pbmWindow.gBrowser, "about:blank");
|
||||
await BrowserTestUtils.loadURI(tab.linkedBrowser, ORIGIN_A);
|
||||
await BrowserTestUtils.loadURIString(tab.linkedBrowser, ORIGIN_A);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
|
||||
ok(
|
||||
|
@ -381,7 +381,7 @@ add_task(async function test_container_tab() {
|
|||
let tab = BrowserTestUtils.addTab(gBrowser, ORIGIN_B, {
|
||||
userContextId: 1,
|
||||
});
|
||||
await BrowserTestUtils.loadURI(tab.linkedBrowser, ORIGIN_B);
|
||||
await BrowserTestUtils.loadURIString(tab.linkedBrowser, ORIGIN_B);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
|
||||
ok(
|
||||
|
@ -564,7 +564,7 @@ add_task(async function test_site_preference_pbm() {
|
|||
private: true,
|
||||
});
|
||||
let tab = BrowserTestUtils.addTab(pbmWindow.gBrowser, "about:blank");
|
||||
await BrowserTestUtils.loadURI(tab.linkedBrowser, ORIGIN_B);
|
||||
await BrowserTestUtils.loadURIString(tab.linkedBrowser, ORIGIN_B);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
|
||||
ok(
|
||||
|
@ -586,7 +586,7 @@ add_task(async function test_site_preference_pbm() {
|
|||
true
|
||||
);
|
||||
|
||||
await BrowserTestUtils.loadURI(tab.linkedBrowser, ORIGIN_B);
|
||||
await BrowserTestUtils.loadURIString(tab.linkedBrowser, ORIGIN_B);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
|
||||
ok(
|
||||
|
|
|
@ -121,7 +121,7 @@ add_task(async function test_extension_page_sameprocess_navigation() {
|
|||
ok(true, "extpage1 got a webRequest event as expected");
|
||||
|
||||
info("Load a second extension page in the same tab");
|
||||
BrowserTestUtils.loadURI(browser, extPageURL2);
|
||||
BrowserTestUtils.loadURIString(browser, extPageURL2);
|
||||
|
||||
info("Wait extpage1 to receive a pagehide event");
|
||||
await extension.awaitMessage("pagehide:extpage1");
|
||||
|
@ -193,7 +193,7 @@ add_task(async function test_extension_page_context_navigated_to_web_page() {
|
|||
false,
|
||||
webPageURL
|
||||
);
|
||||
BrowserTestUtils.loadURI(browserForTab1, webPageURL);
|
||||
BrowserTestUtils.loadURIString(browserForTab1, webPageURL);
|
||||
info("Wait the tab to have loaded the new webpage url");
|
||||
await promiseLoaded;
|
||||
info("Wait the extension page to receive a pagehide event");
|
||||
|
|
|
@ -111,7 +111,7 @@ add_task(async function() {
|
|||
let browser = gBrowser.selectedBrowser;
|
||||
|
||||
let errorPageLoaded = BrowserTestUtils.waitForErrorPage(browser);
|
||||
BrowserTestUtils.loadURI(browser, BAD_CERT);
|
||||
BrowserTestUtils.loadURIString(browser, BAD_CERT);
|
||||
await errorPageLoaded;
|
||||
|
||||
is(
|
||||
|
|
|
@ -30,7 +30,7 @@ add_task(async function avoid_timeout_and_show_https_only_error_page() {
|
|||
TIMEOUT_PAGE_URI_HTTPS, // Wait for upgraded page to timeout
|
||||
true // maybeErrorPage = true, because we need the error page to appear
|
||||
);
|
||||
BrowserTestUtils.loadURI(browser, TIMEOUT_PAGE_URI_HTTP);
|
||||
BrowserTestUtils.loadURIString(browser, TIMEOUT_PAGE_URI_HTTP);
|
||||
await loaded;
|
||||
|
||||
await SpecialPowers.spawn(browser, [], async function() {
|
||||
|
|
|
@ -26,7 +26,7 @@ add_task(async function() {
|
|||
|
||||
let browser = gBrowser.selectedBrowser;
|
||||
let errorPageLoaded = BrowserTestUtils.waitForErrorPage(browser);
|
||||
BrowserTestUtils.loadURI(browser, KICK_OF_REQUEST_WITH_SUGGESTION);
|
||||
BrowserTestUtils.loadURIString(browser, KICK_OF_REQUEST_WITH_SUGGESTION);
|
||||
await errorPageLoaded;
|
||||
|
||||
let pageShownPromise = BrowserTestUtils.waitForContentEvent(
|
||||
|
|
|
@ -10,7 +10,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
|
||||
async function openURLInWindow(window, url) {
|
||||
const { selectedBrowser } = window.gBrowser;
|
||||
BrowserTestUtils.loadURI(selectedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(selectedBrowser, url);
|
||||
await BrowserTestUtils.browserLoaded(selectedBrowser, false, url);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ add_task(async function() {
|
|||
});
|
||||
|
||||
await BrowserTestUtils.withNewTab("about:blank", async function() {
|
||||
BrowserTestUtils.loadURI(gBrowser, "moz://a");
|
||||
BrowserTestUtils.loadURIString(gBrowser, "moz://a");
|
||||
await BrowserTestUtils.waitForLocationChange(
|
||||
gBrowser,
|
||||
`https://example.com/${path}mozprotocol.html`
|
||||
|
|
|
@ -93,7 +93,7 @@ add_task(async function() {
|
|||
let tab = (gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser));
|
||||
|
||||
let promise = ContentTask.spawn(tab.linkedBrowser, ids, task);
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
tab.linkedBrowser,
|
||||
"data:text/html;charset=utf-8," +
|
||||
"<html><body>" +
|
||||
|
|
|
@ -149,7 +149,7 @@ add_task(async function test_usernameOnlyForm() {
|
|||
{ contentIds: ids, expected: true },
|
||||
task
|
||||
);
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
tab.linkedBrowser,
|
||||
"data:text/html;charset=utf-8," +
|
||||
"<html><body>" +
|
||||
|
@ -181,7 +181,7 @@ add_task(async function test_nonSupportedInputType() {
|
|||
{ contentIds: ids, expected: false },
|
||||
task
|
||||
);
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
tab.linkedBrowser,
|
||||
"data:text/html;charset=utf-8," +
|
||||
"<html><body>" +
|
||||
|
@ -215,7 +215,7 @@ add_task(async function test_usernameOnlyFormPrefOff() {
|
|||
{ contentIds: ids, expected: false },
|
||||
task
|
||||
);
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
tab.linkedBrowser,
|
||||
"data:text/html;charset=utf-8," +
|
||||
"<html><body>" +
|
||||
|
|
|
@ -107,7 +107,7 @@ function task(contentConsts) {
|
|||
add_task(async function() {
|
||||
let tab = (gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser));
|
||||
let promise = ContentTask.spawn(tab.linkedBrowser, consts, task);
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
tab.linkedBrowser,
|
||||
"data:text/html;charset=utf-8," +
|
||||
"<html><body>" +
|
||||
|
|
|
@ -55,7 +55,7 @@ testUrlsWithForm.forEach(testUrl => {
|
|||
);
|
||||
|
||||
let formProcessedPromise = listenForTestNotification("FormProcessed");
|
||||
BrowserTestUtils.loadURI(tab1.linkedBrowser, testUrl);
|
||||
BrowserTestUtils.loadURIString(tab1.linkedBrowser, testUrl);
|
||||
await formProcessedPromise;
|
||||
gBrowser.removeTab(tab1);
|
||||
});
|
||||
|
@ -88,7 +88,7 @@ testUrls.forEach(testUrl => {
|
|||
listenForTestNotification("FormProcessed").then(() => {
|
||||
formFilled = true;
|
||||
});
|
||||
BrowserTestUtils.loadURI(tab1.linkedBrowser, testUrl);
|
||||
BrowserTestUtils.loadURIString(tab1.linkedBrowser, testUrl);
|
||||
|
||||
await TestUtils.waitForCondition(() => {
|
||||
let windowGlobal = tab1.linkedBrowser.browsingContext.currentWindowGlobal;
|
||||
|
@ -189,7 +189,7 @@ testUrlsWithForm.forEach(testUrl => {
|
|||
// In this case we will try to autofill while hidden, so look for the passwordmgr-processed-form
|
||||
// to be observed
|
||||
let formProcessedPromise = listenForTestNotification("FormProcessed");
|
||||
BrowserTestUtils.loadURI(tab1.linkedBrowser, testUrl);
|
||||
BrowserTestUtils.loadURIString(tab1.linkedBrowser, testUrl);
|
||||
await Promise.all([formProcessedPromise, dialogObserved]);
|
||||
|
||||
Assert.ok(
|
||||
|
|
|
@ -47,7 +47,7 @@ async function openTabWithAuthPrompt(origin, authOptions) {
|
|||
url.toString()
|
||||
);
|
||||
info("Loading " + url.toString());
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, url.toString());
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, url.toString());
|
||||
return { origin, tab, authOptions, loadPromise, promptPromise };
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ add_task(async function test() {
|
|||
|
||||
let authShown = promiseAuthWindowShown();
|
||||
let browserLoaded = BrowserTestUtils.browserLoaded(browser);
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
"https://example.com/browser/toolkit/components/passwordmgr/test/browser/authenticate.sjs"
|
||||
);
|
||||
|
@ -71,7 +71,7 @@ add_task(async function test() {
|
|||
|
||||
// Now check loading subresources with auth on the page.
|
||||
browserLoaded = BrowserTestUtils.browserLoaded(browser);
|
||||
BrowserTestUtils.loadURI(browser, "https://example.com");
|
||||
BrowserTestUtils.loadURIString(browser, "https://example.com");
|
||||
await browserLoaded;
|
||||
|
||||
// We've already seen the dialog once, hence we start the loop at 1.
|
||||
|
|
|
@ -14,7 +14,7 @@ add_task(async function test() {
|
|||
});
|
||||
|
||||
let loadPromise = BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
tab.linkedBrowser,
|
||||
"https://example.com/browser/toolkit/components/passwordmgr/test/browser/authenticate.sjs"
|
||||
);
|
||||
|
|
|
@ -80,7 +80,7 @@ add_task(async function test_backButton_forwardButton() {
|
|||
await withTestPage(async function(aBrowser) {
|
||||
info("Loading formless_basic.html?second");
|
||||
// Load a new page in the tab so we can test going back
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
aBrowser,
|
||||
"https://example.com" + DIRECTORY_PATH + "formless_basic.html?second"
|
||||
);
|
||||
|
@ -139,7 +139,7 @@ add_task(async function test_reloadButton() {
|
|||
add_task(async function test_back_keyboard_shortcut() {
|
||||
await withTestPage(async function(aBrowser) {
|
||||
// Load a new page in the tab so we can test going back
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
aBrowser,
|
||||
"https://example.com" + DIRECTORY_PATH + "formless_basic.html?second"
|
||||
);
|
||||
|
|
|
@ -72,7 +72,7 @@ function getAuthPrompt() {
|
|||
|
||||
async function loadAccessRestrictedURL(browser, url, username, password) {
|
||||
let browserLoaded = BrowserTestUtils.browserLoaded(browser);
|
||||
BrowserTestUtils.loadURI(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
|
||||
// Wait for the auth prompt, enter the login details and close the prompt
|
||||
await PromptTestUtils.handleNextPrompt(
|
||||
|
@ -639,7 +639,7 @@ add_task(async function test_normal_autofilled_7() {
|
|||
// Add the observer before loading the form page
|
||||
let formFilled = listenForTestNotification("FormProcessed");
|
||||
await SimpleTest.promiseFocus(browser.ownerGlobal);
|
||||
BrowserTestUtils.loadURI(browser, form1Url);
|
||||
BrowserTestUtils.loadURIString(browser, form1Url);
|
||||
await formFilled;
|
||||
|
||||
// the form should have been autofilled, so submit without updating field values
|
||||
|
|
|
@ -116,7 +116,7 @@ add_task(async function test_downloading_pdf_nonprivate_window() {
|
|||
"InitialDownloadsLoaded",
|
||||
true
|
||||
);
|
||||
BrowserTestUtils.loadURI(browser, "about:downloads");
|
||||
BrowserTestUtils.loadURIString(browser, "about:downloads");
|
||||
await downloadsLoaded;
|
||||
|
||||
info("Wait for the clipboard to contain the url of the pdf");
|
||||
|
|
|
@ -115,7 +115,7 @@ add_task(async function test_findbar_after_navigate() {
|
|||
);
|
||||
|
||||
info("navigating to a webpage");
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
"http://mochi.test:8888/document-builder.sjs?html=<h1>hello, world!</h1>"
|
||||
);
|
||||
|
|
|
@ -32,7 +32,7 @@ add_task(async function test_notification_is_removed_upon_navigation() {
|
|||
"Notification should be pdfjs-fallback"
|
||||
);
|
||||
|
||||
BrowserTestUtils.loadURI(browser, "https://example.com");
|
||||
BrowserTestUtils.loadURIString(browser, "https://example.com");
|
||||
|
||||
await TestUtils.waitForCondition(
|
||||
() => !notification.parentNode,
|
||||
|
|
|
@ -7,7 +7,7 @@ async function waitForPdfJS(browser, url) {
|
|||
null,
|
||||
true
|
||||
);
|
||||
BrowserTestUtils.loadURI(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
return loadPromise;
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ async function waitForPdfJSAnnotationLayer(browser, url) {
|
|||
null,
|
||||
true
|
||||
);
|
||||
BrowserTestUtils.loadURI(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
return loadPromise;
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ async function waitForPdfJSAllLayers(browser, url, layers) {
|
|||
true
|
||||
);
|
||||
|
||||
BrowserTestUtils.loadURI(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
await Promise.all([loadPromise, annotationPromise, annotationEditorPromise]);
|
||||
|
||||
await SpecialPowers.spawn(browser, [layers], async function(layers) {
|
||||
|
@ -80,7 +80,7 @@ async function waitForPdfJSCanvas(browser, url) {
|
|||
null,
|
||||
true
|
||||
);
|
||||
BrowserTestUtils.loadURI(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
return loadPromise;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ add_task(async function() {
|
|||
expectedURI = uri;
|
||||
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser);
|
||||
PlacesObservers.addListener(["page-visited"], onVisitsListener);
|
||||
BrowserTestUtils.loadURI(gBrowser, uri);
|
||||
BrowserTestUtils.loadURIString(gBrowser, uri);
|
||||
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, uri);
|
||||
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, uri);
|
||||
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, uri);
|
||||
|
|
|
@ -31,7 +31,7 @@ function test() {
|
|||
null,
|
||||
true
|
||||
).then(errorListener);
|
||||
BrowserTestUtils.loadURI(ourTab.linkedBrowser, kUniqueURI.spec);
|
||||
BrowserTestUtils.loadURIString(ourTab.linkedBrowser, kUniqueURI.spec);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ function test() {
|
|||
BrowserTestUtils.browserLoaded(aWin.gBrowser.selectedBrowser).then(
|
||||
aCallback
|
||||
);
|
||||
BrowserTestUtils.loadURI(aWin.gBrowser.selectedBrowser, pageURI);
|
||||
BrowserTestUtils.loadURIString(aWin.gBrowser.selectedBrowser, pageURI);
|
||||
}
|
||||
|
||||
testOnWindow(true, function(win) {
|
||||
|
|
|
@ -32,7 +32,7 @@ add_task(async function() {
|
|||
const url2 =
|
||||
"http://example.com/tests/toolkit/components/places/tests/browser/title2.html";
|
||||
let loadPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, url2);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, url2);
|
||||
await loadPromise;
|
||||
|
||||
const events = await titleChangedPromise;
|
||||
|
|
|
@ -29,7 +29,7 @@ add_task(async function test() {
|
|||
}
|
||||
PlacesObservers.addListener(["page-visited"], onVisits);
|
||||
});
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_URL);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, TEST_URL);
|
||||
await promiseVisit;
|
||||
|
||||
is(
|
||||
|
|
|
@ -32,7 +32,7 @@ add_task(async function() {
|
|||
let browserLoadedPromise = BrowserTestUtils.browserLoaded(
|
||||
gBrowser.selectedBrowser
|
||||
);
|
||||
BrowserTestUtils.loadURI(gBrowser, FINAL_URL);
|
||||
BrowserTestUtils.loadURIString(gBrowser, FINAL_URL);
|
||||
await browserLoadedPromise;
|
||||
|
||||
let subject = await visitUriPromise;
|
||||
|
|
|
@ -58,6 +58,6 @@ async function testLoadInWindow(options, url) {
|
|||
let loadedPromise = BrowserTestUtils.browserLoaded(
|
||||
win.gBrowser.selectedBrowser
|
||||
);
|
||||
BrowserTestUtils.loadURI(win.gBrowser.selectedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(win.gBrowser.selectedBrowser, url);
|
||||
await loadedPromise;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ class PrintHelper {
|
|||
null,
|
||||
true
|
||||
);
|
||||
BrowserTestUtils.loadURI(browser, pageUrl);
|
||||
BrowserTestUtils.loadURIString(browser, pageUrl);
|
||||
await loaded;
|
||||
}
|
||||
await testFn(new PrintHelper(browser));
|
||||
|
|
|
@ -267,7 +267,7 @@ add_task(async function test_reader_view_element_attribute_transform() {
|
|||
"hidden",
|
||||
() => {
|
||||
let url = TEST_PATH + "readerModeArticle.html";
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, url);
|
||||
},
|
||||
() => !menuitem.hidden
|
||||
);
|
||||
|
@ -285,7 +285,7 @@ add_task(async function test_reader_view_element_attribute_transform() {
|
|||
"hidden",
|
||||
() => {
|
||||
let url = TEST_PATH + "readerModeArticleHiddenNodes.html";
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, url);
|
||||
},
|
||||
() => menuitem.hidden
|
||||
);
|
||||
|
@ -303,7 +303,7 @@ add_task(async function test_reader_view_element_attribute_transform() {
|
|||
"hidden",
|
||||
() => {
|
||||
let url = TEST_PATH + "readerModeArticle.html";
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, url);
|
||||
},
|
||||
() => !menuitem.hidden
|
||||
);
|
||||
|
@ -362,7 +362,7 @@ add_task(async function test_reader_view_element_attribute_transform() {
|
|||
"hidden",
|
||||
() => {
|
||||
let url = TEST_PATH + "readerModeArticleHiddenNodes.html";
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, url);
|
||||
},
|
||||
() => menuitem.hidden
|
||||
);
|
||||
|
@ -377,7 +377,7 @@ add_task(async function test_reader_view_element_attribute_transform() {
|
|||
add_task(async function test_reader_mode_lang() {
|
||||
let url = TEST_PATH + "readerModeArticle.html";
|
||||
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser);
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, url);
|
||||
|
||||
await promiseTabLoadEvent(tab, url);
|
||||
await TestUtils.waitForCondition(() => !readerButton.hidden);
|
||||
|
|
|
@ -46,7 +46,7 @@ add_task(async function test_reader_button() {
|
|||
e.originalTarget.location.href.endsWith("HiddenNodes.html") &&
|
||||
e.originalTarget.document.readyState == "complete"
|
||||
);
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, url);
|
||||
await paintPromise;
|
||||
|
||||
is_element_hidden(
|
||||
|
|
|
@ -74,7 +74,7 @@ add_task(async function() {
|
|||
);
|
||||
}
|
||||
|
||||
BrowserTestUtils.loadURI(browser, aboutReaderURL);
|
||||
BrowserTestUtils.loadURIString(browser, aboutReaderURL);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
is(
|
||||
|
|
|
@ -34,7 +34,7 @@ add_task(async function test_ss_cookie_redirect() {
|
|||
browser,
|
||||
"AboutReaderContentReady"
|
||||
);
|
||||
await BrowserTestUtils.loadURI(
|
||||
await BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
"about:reader?url=" + encodeURIComponent(serverURL)
|
||||
);
|
||||
|
|
|
@ -44,7 +44,7 @@ function promiseTabLoadEvent(tab, url) {
|
|||
});
|
||||
|
||||
if (url) {
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, url);
|
||||
}
|
||||
|
||||
// Promise.all rejects if either promise rejects (i.e. if we time out) and
|
||||
|
|
|
@ -148,7 +148,7 @@ async function loadAndGetProcessID(browser, target) {
|
|||
maybeErrorPage: true,
|
||||
},
|
||||
() => {
|
||||
BrowserTestUtils.loadURI(browser, target);
|
||||
BrowserTestUtils.loadURIString(browser, target);
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ async function test_coop(
|
|||
url: target,
|
||||
maybeErrorPage: false,
|
||||
},
|
||||
async () => BrowserTestUtils.loadURI(browser, target)
|
||||
async () => BrowserTestUtils.loadURIString(browser, target)
|
||||
);
|
||||
|
||||
info(`Navigated to: ${target}`);
|
||||
|
@ -168,7 +168,7 @@ async function test_download_from(initCoop, downloadCoop) {
|
|||
},
|
||||
async () => {
|
||||
info(`test_download: Loading download page ${start}`);
|
||||
return BrowserTestUtils.loadURI(_browser, start);
|
||||
return BrowserTestUtils.loadURIString(_browser, start);
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -222,7 +222,7 @@ add_task(async function test_multiple_nav_process_switches() {
|
|||
url: target,
|
||||
maybeErrorPage: false,
|
||||
},
|
||||
async () => BrowserTestUtils.loadURI(browser, target)
|
||||
async () => BrowserTestUtils.loadURIString(browser, target)
|
||||
);
|
||||
|
||||
Assert.equal(prevBC, browser.browsingContext);
|
||||
|
@ -238,7 +238,7 @@ add_task(async function test_multiple_nav_process_switches() {
|
|||
url: target,
|
||||
maybeErrorPage: false,
|
||||
},
|
||||
async () => BrowserTestUtils.loadURI(browser, target)
|
||||
async () => BrowserTestUtils.loadURIString(browser, target)
|
||||
);
|
||||
|
||||
Assert.notEqual(prevBC, browser.browsingContext);
|
||||
|
@ -254,7 +254,7 @@ add_task(async function test_multiple_nav_process_switches() {
|
|||
url: target,
|
||||
maybeErrorPage: false,
|
||||
},
|
||||
async () => BrowserTestUtils.loadURI(browser, target)
|
||||
async () => BrowserTestUtils.loadURIString(browser, target)
|
||||
);
|
||||
|
||||
Assert.notEqual(prevBC, browser.browsingContext);
|
||||
|
@ -270,7 +270,7 @@ add_task(async function test_multiple_nav_process_switches() {
|
|||
url: target,
|
||||
maybeErrorPage: false,
|
||||
},
|
||||
async () => BrowserTestUtils.loadURI(browser, target)
|
||||
async () => BrowserTestUtils.loadURIString(browser, target)
|
||||
);
|
||||
|
||||
Assert.equal(prevBC, browser.browsingContext);
|
||||
|
|
|
@ -24,7 +24,7 @@ async function runTest() {
|
|||
let count = 0;
|
||||
let index = -1;
|
||||
for (let { url } of HISTORY) {
|
||||
BrowserTestUtils.loadURI(aBrowser, url);
|
||||
BrowserTestUtils.loadURIString(aBrowser, url);
|
||||
|
||||
await BrowserTestUtils.browserLoaded(aBrowser, false, loaded => {
|
||||
return (
|
||||
|
|
|
@ -93,7 +93,7 @@ add_task(async function init_navigate() {
|
|||
is(port.browser, gBrowser.selectedBrowser, "Port is for the correct browser");
|
||||
|
||||
let loaded = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
|
||||
BrowserTestUtils.loadURI(gBrowser, "about:blank");
|
||||
BrowserTestUtils.loadURIString(gBrowser, "about:blank");
|
||||
|
||||
await waitForMessage(port, "RemotePage:Unload");
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ add_task(async function test() {
|
|||
|
||||
async function doTest(aShouldValueExist, aWindow) {
|
||||
let browser = aWindow.gBrowser.selectedBrowser;
|
||||
BrowserTestUtils.loadURI(browser, testURI);
|
||||
BrowserTestUtils.loadURIString(browser, testURI);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
// Wait for the page to reload itself.
|
||||
|
|
|
@ -18,7 +18,7 @@ add_task(async function thumbnails_bg_bug726727() {
|
|||
null,
|
||||
true
|
||||
);
|
||||
BrowserTestUtils.loadURI(browser, "http://127.0.0.1:1");
|
||||
BrowserTestUtils.loadURIString(browser, "http://127.0.0.1:1");
|
||||
await errorPageLoaded;
|
||||
let result = await PageThumbs.shouldStoreThumbnail(browser);
|
||||
ok(!result, "we're not going to capture an error page");
|
||||
|
|
|
@ -17,7 +17,7 @@ add_task(async function thumbnails_capture() {
|
|||
|
||||
// Load a page with a green background.
|
||||
let loaded = BrowserTestUtils.browserLoaded(browser);
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
"data:text/html,<body bgcolor=00ff00></body>"
|
||||
);
|
||||
|
@ -26,7 +26,7 @@ add_task(async function thumbnails_capture() {
|
|||
|
||||
// Load a page with a blue background.
|
||||
loaded = BrowserTestUtils.browserLoaded(browser);
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
"data:text/html,<body bgcolor=0000ff></body>"
|
||||
);
|
||||
|
|
|
@ -91,7 +91,7 @@ add_task(async function thumbnails_captureAndStoreIfStale_error_response() {
|
|||
// The service should not save the thumbnail - so we (a) check the thumbnail
|
||||
// remains green and (b) check the mtime of the file is < now.
|
||||
ensureThumbnailStale(URL);
|
||||
BrowserTestUtils.loadURI(browser, URL);
|
||||
BrowserTestUtils.loadURIString(browser, URL);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
// now() returns a higher-precision value than the modified time of a file.
|
||||
|
@ -127,7 +127,7 @@ add_task(async function thumbnails_captureAndStoreIfStale_non_error_response() {
|
|||
// return a 200 response and a red thumbnail - so that new thumbnail should
|
||||
// end up captured.
|
||||
ensureThumbnailStale(URL);
|
||||
BrowserTestUtils.loadURI(browser, URL);
|
||||
BrowserTestUtils.loadURIString(browser, URL);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
// now() returns a higher-precision value than the modified time of a file.
|
||||
|
|
|
@ -36,7 +36,7 @@ add_task(async function test_non_popup_from_popup() {
|
|||
const newTabPromise = BrowserTestUtils.waitForNewTab(gBrowser, OPEN_PAGE);
|
||||
|
||||
// Open a new tab that opens a popup with NON_POPUP_OPENER.
|
||||
BrowserTestUtils.loadURI(gBrowser, POPUP_OPENER);
|
||||
BrowserTestUtils.loadURIString(gBrowser, POPUP_OPENER);
|
||||
|
||||
let win = await newPopupPromise;
|
||||
Assert.ok(true, "popup is opened");
|
||||
|
|
|
@ -127,7 +127,7 @@ async function testPopupPatterns(nonPopup) {
|
|||
},
|
||||
async function(browser) {
|
||||
const newWinPromise = BrowserTestUtils.waitForNewWindow();
|
||||
BrowserTestUtils.loadURI(gBrowser, SCRIPT_PAGE);
|
||||
BrowserTestUtils.loadURIString(gBrowser, SCRIPT_PAGE);
|
||||
|
||||
const win = await newWinPromise;
|
||||
const parentChromeFlags = getParentChromeFlags(win);
|
||||
|
@ -164,7 +164,7 @@ async function testPopupPatterns(nonPopup) {
|
|||
gBrowser,
|
||||
OPEN_PAGE
|
||||
);
|
||||
BrowserTestUtils.loadURI(gBrowser, SCRIPT_PAGE);
|
||||
BrowserTestUtils.loadURIString(gBrowser, SCRIPT_PAGE);
|
||||
|
||||
let tab = await newTabPromise;
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
|
@ -184,7 +184,7 @@ async function testPopupPatterns(nonPopup) {
|
|||
false,
|
||||
OPEN_PAGE
|
||||
);
|
||||
BrowserTestUtils.loadURI(gBrowser, SCRIPT_PAGE);
|
||||
BrowserTestUtils.loadURIString(gBrowser, SCRIPT_PAGE);
|
||||
|
||||
await pagePromise;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ add_task(async function() {
|
|||
</body></html>';
|
||||
|
||||
let loadedPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
|
||||
BrowserTestUtils.loadURI(gBrowser, dataUri);
|
||||
BrowserTestUtils.loadURIString(gBrowser, dataUri);
|
||||
await loadedPromise;
|
||||
|
||||
await BrowserTestUtils.synthesizeMouse(
|
||||
|
|
|
@ -54,7 +54,10 @@ add_task(async function() {
|
|||
async function(browser) {
|
||||
let menu_cut_disabled, menu_copy_disabled;
|
||||
|
||||
BrowserTestUtils.loadURI(browser, "data:text/html,<div>hello!</div>");
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
"data:text/html,<div>hello!</div>"
|
||||
);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
browser.focus();
|
||||
await new Promise(resolve => waitForFocus(resolve, window));
|
||||
|
@ -73,7 +76,7 @@ add_task(async function() {
|
|||
|
||||
// When there is no text selected in the contentEditable, we expect the Cut
|
||||
// and Copy commands to be disabled.
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
"data:text/html,<div contentEditable='true'>hello!</div>"
|
||||
);
|
||||
|
@ -95,7 +98,7 @@ add_task(async function() {
|
|||
|
||||
// When the text of the contentEditable is selected, the Cut and Copy commands
|
||||
// should be enabled.
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
"data:text/html,<div contentEditable='true'>hello!</div><script>r=new Range;r.selectNodeContents(document.body.firstChild);document.getSelection().addRange(r);</script>"
|
||||
);
|
||||
|
@ -115,7 +118,7 @@ add_task(async function() {
|
|||
is(menu_copy_disabled, false, "menu_copy should be enabled");
|
||||
await new Promise(closeMenu);
|
||||
|
||||
BrowserTestUtils.loadURI(browser, "about:preferences");
|
||||
BrowserTestUtils.loadURIString(browser, "about:preferences");
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
browser.focus();
|
||||
await new Promise(resolve => waitForFocus(resolve, window));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
add_task(async function test_bug_1572798() {
|
||||
let tab = BrowserTestUtils.addTab(window.gBrowser, "about:blank");
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
tab.linkedBrowser,
|
||||
"https://example.com/browser/toolkit/content/tests/browser/file_document_open_audio.html"
|
||||
);
|
||||
|
|
|
@ -188,7 +188,7 @@ body > div > div {width: 1000px;height: 1000px;}\
|
|||
let loadedPromise = BrowserTestUtils.browserLoaded(
|
||||
gBrowser.selectedBrowser
|
||||
);
|
||||
BrowserTestUtils.loadURI(gBrowser, test.dataUri);
|
||||
BrowserTestUtils.loadURIString(gBrowser, test.dataUri);
|
||||
await loadedPromise;
|
||||
await ContentTask.spawn(gBrowser.selectedBrowser, {}, async () => {
|
||||
// Wait for a paint so that hit-testing works correctly.
|
||||
|
|
|
@ -34,7 +34,7 @@ add_task(async function() {
|
|||
let textarea = content.document.getElementById("textarea1");
|
||||
textarea.scrollTop = textarea.scrollHeight;
|
||||
});
|
||||
BrowserTestUtils.loadURI(browser, "about:blank");
|
||||
BrowserTestUtils.loadURIString(browser, "about:blank");
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
ok(
|
||||
|
|
|
@ -61,7 +61,7 @@ add_task(async function test_content_url_annotation() {
|
|||
null,
|
||||
true
|
||||
);
|
||||
BrowserTestUtils.loadURI(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
await promise;
|
||||
|
||||
// Crash the tab
|
||||
|
|
|
@ -39,7 +39,7 @@ add_task(async function testCrossOriginNavigation() {
|
|||
);
|
||||
|
||||
info("Navigate to a cross-origin video file");
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
tab.linkedBrowser,
|
||||
getTestWebBasedURL(MEDIA_FILE, { crossOrigin: true })
|
||||
);
|
||||
|
|
|
@ -131,7 +131,7 @@ add_task(async function resume_delayed_media_when_enable_blocking_autoplay() {
|
|||
info(
|
||||
"- check that loading a new URI in page clears gesture activation status -"
|
||||
);
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, PAGE);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, PAGE);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
|
||||
info("- should block autoplay again as gesture activation status cleared -");
|
||||
|
|
|
@ -49,7 +49,7 @@ add_task(async function block_multiple_media() {
|
|||
info("- open new background tab -");
|
||||
let tab = BrowserTestUtils.addTab(window.gBrowser, "about:blank");
|
||||
let browser = tab.linkedBrowser;
|
||||
BrowserTestUtils.loadURI(browser, PAGE);
|
||||
BrowserTestUtils.loadURIString(browser, PAGE);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
info("- tab should be blocked -");
|
||||
|
|
|
@ -21,7 +21,7 @@ add_task(async function setup_test_preference() {
|
|||
add_task(async function unblock_icon_should_disapear_after_resume_tab() {
|
||||
info("- open new background tab -");
|
||||
let tab = BrowserTestUtils.addTab(window.gBrowser, "about:blank");
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, PAGE);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, PAGE);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
|
||||
info("- tab should display unblocking icon -");
|
||||
|
@ -43,7 +43,7 @@ add_task(async function unblock_icon_should_disapear_after_resume_tab() {
|
|||
add_task(async function should_not_show_sound_indicator_after_resume_tab() {
|
||||
info("- open new background tab -");
|
||||
let tab = BrowserTestUtils.addTab(window.gBrowser, "about:blank");
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, PAGE);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, PAGE);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
|
||||
info("- tab should display unblocking icon -");
|
||||
|
|
|
@ -22,7 +22,7 @@ add_task(async function setup_test_preference() {
|
|||
add_task(async function block_web_audio() {
|
||||
info("- open new background tab -");
|
||||
let tab = BrowserTestUtils.addTab(window.gBrowser, "about:blank");
|
||||
BrowserTestUtils.loadURI(tab.linkedBrowser, PAGE);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, PAGE);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
|
||||
info("- tab should be blocked -");
|
||||
|
|
|
@ -193,7 +193,7 @@ add_task(async function test_reinitialization_at_remoteness_change() {
|
|||
false,
|
||||
E10S_PARENT_TEST_PAGE_URI
|
||||
);
|
||||
BrowserTestUtils.loadURI(browser, E10S_PARENT_TEST_PAGE_URI);
|
||||
BrowserTestUtils.loadURIString(browser, E10S_PARENT_TEST_PAGE_URI);
|
||||
await docLoaded;
|
||||
ok(!browser.isRemoteBrowser, "Browser should not be remote any more.");
|
||||
browser.contentDocument.body.append("The letter s.");
|
||||
|
|
|
@ -38,13 +38,16 @@ add_task(async function() {
|
|||
is(browser.isSyntheticDocument, false, "Should not be synthetic");
|
||||
|
||||
let loadPromise = waitForPageShow(browser);
|
||||
BrowserTestUtils.loadURI(browser, "data:text/html;charset=utf-8,<html/>");
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
"data:text/html;charset=utf-8,<html/>"
|
||||
);
|
||||
await loadPromise;
|
||||
is(listener.wasSynthetic, false, "Should not be synthetic");
|
||||
is(browser.isSyntheticDocument, false, "Should not be synthetic");
|
||||
|
||||
loadPromise = waitForPageShow(browser);
|
||||
BrowserTestUtils.loadURI(browser, FILES + "empty.png");
|
||||
BrowserTestUtils.loadURIString(browser, FILES + "empty.png");
|
||||
await loadPromise;
|
||||
is(listener.wasSynthetic, true, "Should be synthetic");
|
||||
is(browser.isSyntheticDocument, true, "Should be synthetic");
|
||||
|
|
|
@ -32,7 +32,7 @@ add_task(async function test_remoteness_switch_listeners() {
|
|||
null,
|
||||
"https://example.com/"
|
||||
);
|
||||
BrowserTestUtils.loadURI(browser, "https://example.com/");
|
||||
BrowserTestUtils.loadURIString(browser, "https://example.com/");
|
||||
await Promise.all([loaded, navigated]);
|
||||
browser.removeProgressListener(wpl);
|
||||
});
|
||||
|
|
|
@ -114,7 +114,7 @@ add_task(async function resume_and_suspend_background_video_decoding() {
|
|||
|
||||
info("- before loading media, we shoudn't send the tab hover msg for tab -");
|
||||
await check_should_not_send_unselected_tab_hover_msg(browser);
|
||||
BrowserTestUtils.loadURI(browser, PAGE);
|
||||
BrowserTestUtils.loadURIString(browser, PAGE);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
info("- should suspend background video decoding -");
|
||||
|
|
|
@ -17,7 +17,7 @@ MockFilePicker.init(window);
|
|||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
BrowserTestUtils.loadURI(
|
||||
BrowserTestUtils.loadURIString(
|
||||
gBrowser,
|
||||
"http://mochi.test:8888/browser/toolkit/content/tests/browser/data/post_form_outer.sjs"
|
||||
);
|
||||
|
|
|
@ -49,7 +49,7 @@ add_task(async function test() {
|
|||
await test.setup(crD);
|
||||
}
|
||||
|
||||
BrowserTestUtils.loadURI(browser, "about:crashes");
|
||||
BrowserTestUtils.loadURIString(browser, "about:crashes");
|
||||
await BrowserTestUtils.browserLoaded(browser).then(() =>
|
||||
test.onload(browser)
|
||||
);
|
||||
|
|
|
@ -300,7 +300,7 @@ add_task(async function testHideOnLocationChange() {
|
|||
insertCalls: [0, 0],
|
||||
removeCalls: [1, 2],
|
||||
});
|
||||
BrowserTestUtils.loadURI(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
await promise;
|
||||
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
|
|
|
@ -182,7 +182,7 @@ add_task(async function test_navigate_between_webpage_and_aboutaddons() {
|
|||
ok(!gBrowser.canGoBack, "Should not be able to go back");
|
||||
ok(!gBrowser.canGoForward, "Should not be able to go forward");
|
||||
|
||||
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, "about:addons");
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, "about:addons");
|
||||
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
|
||||
|
||||
let manager = await wait_for_manager_load(
|
||||
|
@ -355,7 +355,7 @@ add_task(async function test_navigate_back_from_website() {
|
|||
info("Part 1");
|
||||
is_in_list(aManager, "addons://list/plugin", false, false);
|
||||
|
||||
BrowserTestUtils.loadURI(gBrowser, "http://example.com/");
|
||||
BrowserTestUtils.loadURIString(gBrowser, "http://example.com/");
|
||||
await wait_for_page_load(gBrowser.selectedBrowser);
|
||||
|
||||
info("Part 2");
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче