mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 18:04:46 +00:00
Backed out 3 changesets (bug 1852963) for causing remote failures on remote/shared/messagehandler/test/browser/browser_session_data.js CLOSED TREE
Backed out changeset 98de7bc404c3 (bug 1852963) Backed out changeset edf1527c9a99 (bug 1852963) Backed out changeset 34357750f69c (bug 1852963)
This commit is contained in:
parent
4bd577fefa
commit
950a3c620d
@ -43,7 +43,7 @@ async function runTests(browser, accDoc) {
|
||||
],
|
||||
});
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
`data:text/html;charset=utf-8,
|
||||
<html><body id="body2">
|
||||
@ -59,7 +59,7 @@ async function runTests(browser, accDoc) {
|
||||
[EVENT_REORDER, getAccessible(browser)],
|
||||
]);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(browser, "about:about");
|
||||
BrowserTestUtils.loadURIString(browser, "about:about");
|
||||
|
||||
await onLoadEvents;
|
||||
|
||||
@ -79,7 +79,7 @@ async function runTests(browser, accDoc) {
|
||||
[EVENT_REORDER, getAccessible(browser)],
|
||||
]);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(browser, "about:mozilla");
|
||||
BrowserTestUtils.loadURIString(browser, "about:mozilla");
|
||||
|
||||
await onLoadEvents;
|
||||
|
||||
@ -100,11 +100,8 @@ async function runTests(browser, accDoc) {
|
||||
[EVENT_REORDER, getAccessible(browser)],
|
||||
]);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
browser,
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
"http://www.wronguri.wronguri/"
|
||||
);
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
BrowserTestUtils.loadURIString(browser, "http://www.wronguri.wronguri/");
|
||||
|
||||
await onLoadEvents;
|
||||
|
||||
@ -114,10 +111,7 @@ async function runTests(browser, accDoc) {
|
||||
[EVENT_REORDER, getAccessible(browser)],
|
||||
]);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
browser,
|
||||
"https://nocert.example.com:443/"
|
||||
);
|
||||
BrowserTestUtils.loadURIString(browser, "https://nocert.example.com:443/");
|
||||
|
||||
await onLoadEvents;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ function caretMoveChecker(target, caretOffset) {
|
||||
async function checkURLBarCaretEvents() {
|
||||
const kURL = "about:mozilla";
|
||||
let newWin = await BrowserTestUtils.openNewBrowserWindow();
|
||||
BrowserTestUtils.startLoadingURIString(newWin.gBrowser.selectedBrowser, kURL);
|
||||
BrowserTestUtils.loadURIString(newWin.gBrowser.selectedBrowser, kURL);
|
||||
newWin.gBrowser.selectedBrowser.focus();
|
||||
|
||||
await waitForEvent(EVENT_DOCUMENT_LOAD_COMPLETE, event => {
|
||||
|
@ -34,7 +34,7 @@
|
||||
let docLoaded = waitForEvent(EVENT_DOCUMENT_LOAD_COMPLETE, event =>
|
||||
event.accessible.QueryInterface(nsIAccessibleDocument).URL === ABOUT_LICENSE_URL,
|
||||
`Loaded tab: ${ABOUT_LICENSE_URL}`);
|
||||
BrowserTestUtils.startLoadingURIString(win.gBrowser.selectedBrowser,
|
||||
BrowserTestUtils.loadURIString(win.gBrowser.selectedBrowser,
|
||||
"about:license");
|
||||
await loaded;
|
||||
await docLoaded;
|
||||
|
@ -84,7 +84,7 @@ add_task(async function checkReturnToPreviousPage() {
|
||||
tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, GOOD_PAGE);
|
||||
browser = tab.linkedBrowser;
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(browser, GOOD_PAGE_2);
|
||||
BrowserTestUtils.loadURIString(browser, GOOD_PAGE_2);
|
||||
await BrowserTestUtils.browserLoaded(browser, false, GOOD_PAGE_2);
|
||||
await injectErrorPageFrame(tab, BAD_CERT);
|
||||
} else {
|
||||
@ -93,7 +93,7 @@ add_task(async function checkReturnToPreviousPage() {
|
||||
|
||||
info("Loading and waiting for the cert error");
|
||||
let certErrorLoaded = BrowserTestUtils.waitForErrorPage(browser);
|
||||
BrowserTestUtils.startLoadingURIString(browser, BAD_CERT);
|
||||
BrowserTestUtils.loadURIString(browser, BAD_CERT);
|
||||
await certErrorLoaded;
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@ add_task(async function onlyAllow3DESWithDeprecatedTLS() {
|
||||
await BrowserTestUtils.withNewTab(
|
||||
{ gBrowser, url: "about:blank" },
|
||||
async browser => {
|
||||
BrowserTestUtils.startLoadingURIString(browser, TRIPLEDES_PAGE);
|
||||
BrowserTestUtils.loadURIString(browser, TRIPLEDES_PAGE);
|
||||
await BrowserTestUtils.waitForErrorPage(browser);
|
||||
}
|
||||
);
|
||||
@ -223,7 +223,7 @@ add_task(async function onlyAllow3DESWithDeprecatedTLS() {
|
||||
await BrowserTestUtils.withNewTab(
|
||||
{ gBrowser, url: "about:blank" },
|
||||
async browser => {
|
||||
BrowserTestUtils.startLoadingURIString(browser, TRIPLEDES_PAGE);
|
||||
BrowserTestUtils.loadURIString(browser, TRIPLEDES_PAGE);
|
||||
await BrowserTestUtils.browserLoaded(browser, false, TRIPLEDES_PAGE);
|
||||
}
|
||||
);
|
||||
@ -236,7 +236,7 @@ add_task(async function onlyAllow3DESWithDeprecatedTLS() {
|
||||
await BrowserTestUtils.withNewTab(
|
||||
{ gBrowser, url: "about:blank" },
|
||||
async browser => {
|
||||
BrowserTestUtils.startLoadingURIString(browser, TRIPLEDES_PAGE);
|
||||
BrowserTestUtils.loadURIString(browser, TRIPLEDES_PAGE);
|
||||
await BrowserTestUtils.waitForErrorPage(browser);
|
||||
}
|
||||
);
|
||||
|
@ -80,7 +80,7 @@ async function setupPage(htmlPageName, blockedPage) {
|
||||
true
|
||||
);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(browser, iFramePage);
|
||||
BrowserTestUtils.loadURIString(browser, iFramePage);
|
||||
await browserLoaded;
|
||||
info("The error page has loaded!");
|
||||
|
||||
|
@ -80,7 +80,7 @@ async function setupPage(htmlPageName, blockedPage) {
|
||||
true
|
||||
);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(browser, iFramePage);
|
||||
BrowserTestUtils.loadURIString(browser, iFramePage);
|
||||
await browserLoaded;
|
||||
info("The error page has loaded!");
|
||||
|
||||
|
@ -18,10 +18,7 @@ add_task(async function bookmarks_toolbar_shown_on_newtab() {
|
||||
ok(isBookmarksToolbarVisible(), "Toolbar should be visible on newtab");
|
||||
|
||||
// 2: Test that the toolbar is hidden when the browser is navigated away from newtab
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
newtab.linkedBrowser,
|
||||
"https://example.com"
|
||||
);
|
||||
BrowserTestUtils.loadURIString(newtab.linkedBrowser, "https://example.com");
|
||||
await BrowserTestUtils.browserLoaded(newtab.linkedBrowser);
|
||||
await waitForBookmarksToolbarVisibility({
|
||||
visible: false,
|
||||
@ -34,7 +31,7 @@ add_task(async function bookmarks_toolbar_shown_on_newtab() {
|
||||
);
|
||||
|
||||
// 3: Re-load about:newtab in the browser for the following tests and confirm toolbar reappears
|
||||
BrowserTestUtils.startLoadingURIString(newtab.linkedBrowser, "about:newtab");
|
||||
BrowserTestUtils.loadURIString(newtab.linkedBrowser, "about:newtab");
|
||||
await BrowserTestUtils.browserLoaded(newtab.linkedBrowser);
|
||||
await waitForBookmarksToolbarVisibility({
|
||||
visible: true,
|
||||
@ -68,7 +65,7 @@ add_task(async function bookmarks_toolbar_shown_on_newtab() {
|
||||
});
|
||||
|
||||
// 7: Similar to #3 above, loading about:newtab in example should show toolbar
|
||||
BrowserTestUtils.startLoadingURIString(example.linkedBrowser, "about:newtab");
|
||||
BrowserTestUtils.loadURIString(example.linkedBrowser, "about:newtab");
|
||||
await BrowserTestUtils.browserLoaded(example.linkedBrowser);
|
||||
await waitForBookmarksToolbarVisibility({
|
||||
visible: true,
|
||||
@ -91,10 +88,7 @@ add_task(async function bookmarks_toolbar_shown_on_newtab() {
|
||||
await BrowserTestUtils.switchTab(gBrowser, newtab);
|
||||
await waitForBookmarksToolbarVisibility({ visible: false });
|
||||
ok(!isBookmarksToolbarVisible(), "Toolbar should hide with custom newtab");
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
example.linkedBrowser,
|
||||
AboutNewTab.newTabURL
|
||||
);
|
||||
BrowserTestUtils.loadURIString(example.linkedBrowser, AboutNewTab.newTabURL);
|
||||
await BrowserTestUtils.browserLoaded(example.linkedBrowser);
|
||||
await BrowserTestUtils.switchTab(gBrowser, example);
|
||||
await waitForBookmarksToolbarVisibility({ visible: true });
|
||||
|
@ -57,7 +57,7 @@ add_task(async function checkDontShowStopFromLocalURI() {
|
||||
stopReloadContainerObserver.observe(stopReloadContainer, {
|
||||
attributeFilter: ["animate"],
|
||||
});
|
||||
BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, "about:mozilla");
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, "about:mozilla");
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
|
||||
Assert.ok(
|
||||
@ -82,7 +82,7 @@ add_task(async function checkDontShowStopFromNonLocalURI() {
|
||||
stopReloadContainerObserver.observe(stopReloadContainer, {
|
||||
attributeFilter: ["animate"],
|
||||
});
|
||||
BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, "about:mozilla");
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, "about:mozilla");
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
|
||||
Assert.ok(
|
||||
@ -132,10 +132,7 @@ add_task(async function checkAnimateStopOnTabAfterTabFinishesOpening() {
|
||||
return !gBrowser.tabAnimationsInProgress;
|
||||
});
|
||||
let animatePromise = getAnimatePromise(stopReloadContainer);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
tab.linkedBrowser,
|
||||
"https://example.com"
|
||||
);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, "https://example.com");
|
||||
await animatePromise;
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
|
||||
@ -161,10 +158,7 @@ add_task(async function checkDoShowStopFromLocalURI() {
|
||||
return !gBrowser.tabAnimationsInProgress;
|
||||
});
|
||||
let animatePromise = getAnimatePromise(stopReloadContainer);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
tab.linkedBrowser,
|
||||
"https://example.com"
|
||||
);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, "https://example.com");
|
||||
await animatePromise;
|
||||
await waitForNoAnimation(stopReloadContainer);
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
|
@ -22,7 +22,7 @@ add_task(async function checkSwitchPageToOnlineMode() {
|
||||
let netErrorLoaded = BrowserTestUtils.waitForErrorPage(browser);
|
||||
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
BrowserTestUtils.startLoadingURIString(browser, "http://example.com/");
|
||||
BrowserTestUtils.loadURIString(browser, "http://example.com/");
|
||||
await netErrorLoaded;
|
||||
|
||||
// Re-enable the proxy so example.com is resolved to localhost, rather than
|
||||
|
@ -142,7 +142,7 @@ function promiseTabLoadEvent(tab, url) {
|
||||
let loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, handle);
|
||||
|
||||
if (url) {
|
||||
BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, url);
|
||||
}
|
||||
|
||||
return loaded;
|
||||
|
@ -19,7 +19,7 @@ let testcases = [
|
||||
false,
|
||||
CANONICAL_URL_REDIRECTED
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(browser, CANONICAL_URL_REDIRECTED);
|
||||
BrowserTestUtils.loadURIString(browser, CANONICAL_URL_REDIRECTED);
|
||||
await loadPromise;
|
||||
await freePortal(true);
|
||||
ensurePortalTab(win);
|
||||
|
@ -36,7 +36,7 @@ async function openTestPage() {
|
||||
},
|
||||
true /* maybeErrorPage */
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(browser, testPage);
|
||||
BrowserTestUtils.loadURIString(browser, testPage);
|
||||
await pageAndIframesLoaded;
|
||||
|
||||
// Make sure both the top-level document and the iframe documents have
|
||||
|
@ -20,10 +20,7 @@ async function rightClickOpenInNewTabAndReturnContent(selector) {
|
||||
false,
|
||||
RESOURCE_LINK
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
gBrowser.selectedBrowser,
|
||||
RESOURCE_LINK
|
||||
);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, RESOURCE_LINK);
|
||||
await loaded;
|
||||
|
||||
const generatedBlobURL = await ContentTask.spawn(
|
||||
@ -100,10 +97,7 @@ async function openInNewTabAndReturnContent(selector) {
|
||||
false,
|
||||
RESOURCE_LINK
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
gBrowser.selectedBrowser,
|
||||
RESOURCE_LINK
|
||||
);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, RESOURCE_LINK);
|
||||
await loaded;
|
||||
|
||||
const generatedBlobURL = await ContentTask.spawn(
|
||||
|
@ -185,7 +185,7 @@ add_task(async function test_text_input_spellcheck_deadactor() {
|
||||
contextMenu.hidePopup();
|
||||
|
||||
// Now go back to the input testcase:
|
||||
BrowserTestUtils.startLoadingURIString(gBrowser.selectedBrowser, MAIN_URL);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, MAIN_URL);
|
||||
await BrowserTestUtils.browserLoaded(
|
||||
gBrowser.selectedBrowser,
|
||||
false,
|
||||
@ -206,7 +206,7 @@ add_task(async function test_text_input_spellcheck_deadactor() {
|
||||
wgp = gBrowser.selectedBrowser.browsingContext.currentWindowGlobal;
|
||||
|
||||
const NEW_URL = MAIN_URL.replace(".com", ".org");
|
||||
BrowserTestUtils.startLoadingURIString(gBrowser.selectedBrowser, NEW_URL);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, NEW_URL);
|
||||
await BrowserTestUtils.browserLoaded(
|
||||
gBrowser.selectedBrowser,
|
||||
false,
|
||||
@ -229,7 +229,7 @@ add_task(async function test_text_input_spellcheck_deadactor() {
|
||||
// again; now the context menu stuff should be destroyed by the menu
|
||||
// hiding, nothing else.
|
||||
wgp = gBrowser.selectedBrowser.browsingContext.currentWindowGlobal;
|
||||
BrowserTestUtils.startLoadingURIString(gBrowser.selectedBrowser, NEW_URL);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, NEW_URL);
|
||||
await BrowserTestUtils.browserLoaded(
|
||||
gBrowser.selectedBrowser,
|
||||
false,
|
||||
|
@ -63,7 +63,7 @@ add_task(async function test_back_forward_button_contextmenu_touch() {
|
||||
() => !backbutton.hasAttribute("disabled")
|
||||
);
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
BrowserTestUtils.startLoadingURIString(browser, "http://example.org");
|
||||
BrowserTestUtils.loadURIString(browser, "http://example.org");
|
||||
await notDisabled;
|
||||
await openAndCheckContextMenu(contextMenu, backbutton);
|
||||
|
||||
|
@ -8,7 +8,7 @@ add_task(async function test() {
|
||||
const expectedIcon = testPath + "file_generic_favicon.ico";
|
||||
let faviconPromise = waitForLinkAvailable(tabBrowser);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(tabBrowser, URI);
|
||||
BrowserTestUtils.loadURIString(tabBrowser, URI);
|
||||
|
||||
let iconURI = await faviconPromise;
|
||||
is(iconURI, expectedIcon, "Correct icon before pushState.");
|
||||
|
@ -8,7 +8,7 @@ add_task(async function test() {
|
||||
const expectedIcon = testPath + "file_generic_favicon.ico";
|
||||
let faviconPromise = waitForLinkAvailable(tabBrowser);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(tabBrowser, URI);
|
||||
BrowserTestUtils.loadURIString(tabBrowser, URI);
|
||||
|
||||
let iconURI = await faviconPromise;
|
||||
is(iconURI, expectedIcon, "Correct icon before pushState.");
|
||||
|
@ -12,7 +12,7 @@ add_task(async () => {
|
||||
async browser => {
|
||||
let faviconPromise = waitForFaviconMessage(true, `${ROOT}accept.sjs`);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(browser, ROOT + "accept.html");
|
||||
BrowserTestUtils.loadURIString(browser, ROOT + "accept.html");
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
try {
|
||||
|
@ -12,7 +12,7 @@ add_task(async () => {
|
||||
async browser => {
|
||||
let faviconPromise = waitForFaviconMessage(true, `${ROOT}auth_test.png`);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(browser, `${ROOT}auth_test.html`);
|
||||
BrowserTestUtils.loadURIString(browser, `${ROOT}auth_test.html`);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
await Assert.rejects(
|
||||
|
@ -27,7 +27,7 @@ add_task(async () => {
|
||||
ok(seenCookie, "Should have seen the cookie.");
|
||||
|
||||
faviconPromise = waitForLinkAvailable(browser);
|
||||
BrowserTestUtils.startLoadingURIString(browser, testPath);
|
||||
BrowserTestUtils.loadURIString(browser, testPath);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
await faviconPromise;
|
||||
cookies = Services.cookies.getCookiesFromHost(
|
||||
|
@ -14,7 +14,7 @@ add_task(async function () {
|
||||
TEST_ROOT + "file_bug970276_favicon1.ico"
|
||||
);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(extraTab.linkedBrowser, TEST_URL);
|
||||
BrowserTestUtils.loadURIString(extraTab.linkedBrowser, TEST_URL);
|
||||
await BrowserTestUtils.browserLoaded(extraTab.linkedBrowser);
|
||||
await haveChanged;
|
||||
|
||||
|
@ -39,7 +39,7 @@ add_task(async function () {
|
||||
let expectedFavicon = TEST_ROOT + "file_generic_favicon.ico";
|
||||
let faviconPromise = waitForFavicon(extraTab.linkedBrowser, expectedFavicon);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(extraTab.linkedBrowser, TEST_URL);
|
||||
BrowserTestUtils.loadURIString(extraTab.linkedBrowser, TEST_URL);
|
||||
await BrowserTestUtils.browserLoaded(extraTab.linkedBrowser);
|
||||
|
||||
await faviconPromise;
|
||||
|
@ -32,7 +32,7 @@ function run_test(url, shouldHaveCookies, description) {
|
||||
async browser => {
|
||||
const faviconPromise = waitForFaviconMessage(true, FAVICON_URL);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
await faviconPromise;
|
||||
|
@ -27,10 +27,7 @@ function run_test(root, shouldSucceed, description) {
|
||||
async browser => {
|
||||
const faviconPromise = waitForFaviconMessage(true, FAVICON_URL);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
browser,
|
||||
`${root}crossorigin.html`
|
||||
);
|
||||
BrowserTestUtils.loadURIString(browser, `${root}crossorigin.html`);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
if (shouldSucceed) {
|
||||
|
@ -20,10 +20,7 @@ add_task(async function test_check_referrer_for_discovered_favicon() {
|
||||
}
|
||||
).then(([chan]) => chan.getRequestHeader("Referer"));
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
browser,
|
||||
`${FOLDER}discovery.html`
|
||||
);
|
||||
BrowserTestUtils.loadURIString(browser, `${FOLDER}discovery.html`);
|
||||
|
||||
let referrer = await referrerPromise;
|
||||
is(
|
||||
@ -48,7 +45,7 @@ add_task(
|
||||
}
|
||||
).then(([chan]) => chan.getRequestHeader("Referer"));
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
`${FOLDER}file_favicon_no_referrer.html`
|
||||
);
|
||||
|
@ -12,7 +12,7 @@ add_task(async () => {
|
||||
{ gBrowser, url: "about:blank" },
|
||||
async browser => {
|
||||
let faviconPromise = waitForLinkAvailable(browser);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
testPath + "file_invalid_href.html"
|
||||
);
|
||||
|
@ -13,7 +13,7 @@ add_task(async () => {
|
||||
const expectedIcon = testPath + "file_generic_favicon.ico";
|
||||
let faviconPromise = waitForLinkAvailable(browser);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
testPath + "file_with_favicon.html"
|
||||
);
|
||||
@ -22,7 +22,7 @@ add_task(async () => {
|
||||
let iconURI = await faviconPromise;
|
||||
is(iconURI, expectedIcon, "Got correct icon.");
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(browser, testPath + "blank.html");
|
||||
BrowserTestUtils.loadURIString(browser, testPath + "blank.html");
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
is(browser.mIconURL, null, "Should have blanked the icon.");
|
||||
|
@ -10,10 +10,7 @@ add_task(async () => {
|
||||
async browser => {
|
||||
let faviconPromise = waitForFaviconMessage(true, `${ROOT}large.png`);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
browser,
|
||||
ROOT + "large_favicon.html"
|
||||
);
|
||||
BrowserTestUtils.loadURIString(browser, ROOT + "large_favicon.html");
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
await Assert.rejects(
|
||||
|
@ -15,7 +15,7 @@ add_task(async () => {
|
||||
is(iconURI, expectedIcon, "Got correct initial icon.");
|
||||
|
||||
faviconPromise = waitForLinkAvailable(browser);
|
||||
BrowserTestUtils.startLoadingURIString(browser, testPath);
|
||||
BrowserTestUtils.loadURIString(browser, testPath);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
iconURI = await faviconPromise;
|
||||
is(iconURI, expectedIcon, "Got correct icon on second load.");
|
||||
|
@ -38,7 +38,7 @@ add_task(async () => {
|
||||
{ gBrowser, url: "about:blank" },
|
||||
async browser => {
|
||||
let tab = gBrowser.getTabForBrowser(browser);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
TEST_PATH + "file_with_slow_favicon.html"
|
||||
);
|
||||
@ -147,7 +147,7 @@ add_task(async () => {
|
||||
gBrowser.pinTab(tab);
|
||||
|
||||
let bounds = tab.getBoundingClientRect();
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
TEST_PATH + "file_with_slow_favicon.html"
|
||||
);
|
||||
|
@ -322,10 +322,7 @@ add_task(async function test_large_popup_in_small_window() {
|
||||
let browserLoadedPromise = BrowserTestUtils.browserLoaded(
|
||||
newWin.gBrowser.selectedBrowser
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
newWin.gBrowser.selectedBrowser,
|
||||
pageUrl
|
||||
);
|
||||
BrowserTestUtils.loadURIString(newWin.gBrowser.selectedBrowser, pageUrl);
|
||||
await browserLoadedPromise;
|
||||
|
||||
newWin.gBrowser.selectedBrowser.focus();
|
||||
|
@ -14,7 +14,7 @@ add_task(async function test_identityPopupCausesFSExit() {
|
||||
|
||||
await BrowserTestUtils.withNewTab("about:blank", async browser => {
|
||||
let loaded = BrowserTestUtils.browserLoaded(browser, false, url);
|
||||
BrowserTestUtils.startLoadingURIString(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
await loaded;
|
||||
|
||||
let identityPermissionBox = document.getElementById(
|
||||
|
@ -198,8 +198,8 @@ async function test() {
|
||||
BrowserTestUtils.browserStopped(gBackgroundBrowser, kBasePage),
|
||||
BrowserTestUtils.browserStopped(gForegroundBrowser, kBasePage),
|
||||
];
|
||||
BrowserTestUtils.startLoadingURIString(gBackgroundBrowser, kBasePage);
|
||||
BrowserTestUtils.startLoadingURIString(gForegroundBrowser, kBasePage);
|
||||
BrowserTestUtils.loadURIString(gBackgroundBrowser, kBasePage);
|
||||
BrowserTestUtils.loadURIString(gForegroundBrowser, kBasePage);
|
||||
await Promise.all(promises);
|
||||
// If we process switched, the tabbrowser may still be processing the state_stop
|
||||
// notification here because of how microtasks work. Ensure that that has
|
||||
@ -214,7 +214,7 @@ function runTest(browser, url, next) {
|
||||
gAllNotificationsPos = 0;
|
||||
gNextTest = next;
|
||||
gTestBrowser = browser;
|
||||
BrowserTestUtils.startLoadingURIString(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
}
|
||||
|
||||
function startTest1() {
|
||||
|
@ -5,7 +5,7 @@ add_task(async function () {
|
||||
);
|
||||
const htmlContent =
|
||||
"data:text/html, <iframe src='data:text/html,text text'></iframe>";
|
||||
BrowserTestUtils.startLoadingURIString(gBrowser, htmlContent);
|
||||
BrowserTestUtils.loadURIString(gBrowser, htmlContent);
|
||||
await loadedPromise;
|
||||
|
||||
await SpecialPowers.spawn(gBrowser.selectedBrowser, [], async function (arg) {
|
||||
|
@ -6,10 +6,7 @@ add_task(async function () {
|
||||
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
|
||||
|
||||
let promise = BrowserTestUtils.waitForErrorPage(gBrowser.selectedBrowser);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
gBrowser,
|
||||
"https://nocert.example.com/"
|
||||
);
|
||||
BrowserTestUtils.loadURIString(gBrowser, "https://nocert.example.com/");
|
||||
await promise;
|
||||
|
||||
await remote(() => {
|
||||
|
@ -13,7 +13,7 @@ const URIS = [
|
||||
add_task(async function () {
|
||||
for (let uri of URIS) {
|
||||
let tab = BrowserTestUtils.addTab(gBrowser);
|
||||
BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, uri);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, uri);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
let isRemote = tab.linkedBrowser.isRemoteBrowser;
|
||||
|
||||
|
@ -3,7 +3,7 @@ function test() {
|
||||
gBrowser.addProgressListener(progressListener1);
|
||||
gBrowser.addProgressListener(progressListener2);
|
||||
gBrowser.addProgressListener(progressListener3);
|
||||
BrowserTestUtils.startLoadingURIString(gBrowser, "data:text/plain,bug519216");
|
||||
BrowserTestUtils.loadURIString(gBrowser, "data:text/plain,bug519216");
|
||||
}
|
||||
|
||||
var calledListener1 = false;
|
||||
|
@ -27,7 +27,7 @@ add_task(async function test_remove_bookmark_with_tag_via_edit_bookmark() {
|
||||
"the test url is bookmarked"
|
||||
);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(gBrowser, testURL);
|
||||
BrowserTestUtils.loadURIString(gBrowser, testURL);
|
||||
|
||||
await TestUtils.waitForCondition(
|
||||
() => BookmarkingUI.status == BookmarkingUI.STATUS_STARRED,
|
||||
|
@ -2,13 +2,13 @@ add_task(async function test() {
|
||||
await BrowserTestUtils.withNewTab(
|
||||
"data:text/plain;charset=utf-8,1",
|
||||
async function (browser) {
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
"data:text/plain;charset=utf-8,2"
|
||||
);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
"data:text/plain;charset=utf-8,3"
|
||||
);
|
||||
|
@ -41,7 +41,7 @@ function test() {
|
||||
}
|
||||
});
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
tab.linkedBrowser,
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
"http://example.com/browser/browser/base/content/test/general/dummy_page.html"
|
||||
|
@ -10,7 +10,7 @@ add_task(async function test_blank() {
|
||||
{ gBrowser, url: "about:blank" },
|
||||
async function (browser) {
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
BrowserTestUtils.startLoadingURIString(browser, "http://example.com");
|
||||
BrowserTestUtils.loadURIString(browser, "http://example.com");
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
ok(!gBrowser.canGoBack, "about:blank wasn't added to session history");
|
||||
}
|
||||
@ -23,13 +23,13 @@ add_task(async function test_newtab() {
|
||||
async function (browser) {
|
||||
// Can't load it directly because that'll use a preloaded tab if present.
|
||||
let stopped = BrowserTestUtils.browserStopped(browser, "about:newtab");
|
||||
BrowserTestUtils.startLoadingURIString(browser, "about:newtab");
|
||||
BrowserTestUtils.loadURIString(browser, "about:newtab");
|
||||
await stopped;
|
||||
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
stopped = BrowserTestUtils.browserStopped(browser, "http://example.com/");
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
BrowserTestUtils.startLoadingURIString(browser, "http://example.com/");
|
||||
BrowserTestUtils.loadURIString(browser, "http://example.com/");
|
||||
await stopped;
|
||||
|
||||
// This makes sure the parent process has the most up-to-date notion
|
||||
|
@ -124,7 +124,7 @@ add_task(async function () {
|
||||
let loadedPromise = BrowserTestUtils.browserLoaded(
|
||||
gBrowser.selectedBrowser
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(gBrowser, test.url);
|
||||
BrowserTestUtils.loadURIString(gBrowser, test.url);
|
||||
await loadedPromise;
|
||||
|
||||
info("Run subtest " + test.name);
|
||||
|
@ -121,7 +121,7 @@ add_task(async function () {
|
||||
false,
|
||||
testPage1
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(gBrowser.selectedBrowser, testPage1);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, testPage1);
|
||||
await page1Promise;
|
||||
|
||||
// When the urlbar is focused, pressing F6 should focus the root of the content page.
|
||||
|
@ -18,7 +18,7 @@ add_task(async function findbar_test() {
|
||||
false,
|
||||
url
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(newTab.linkedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(newTab.linkedBrowser, url);
|
||||
await promise;
|
||||
|
||||
await gFindBarPromise;
|
||||
|
@ -111,7 +111,7 @@ async function testRealRefresh(refreshPage, delay) {
|
||||
async function (browser) {
|
||||
await pushPrefs(["accessibility.blockautorefresh", true]);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
refreshPage + "?p=" + TARGET_PAGE + "&d=" + delay
|
||||
);
|
||||
@ -177,7 +177,7 @@ add_task(async function test_can_update_notification() {
|
||||
await pushPrefs(["accessibility.blockautorefresh", true]);
|
||||
|
||||
// First, attempt a redirect
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
META_PAGE + "?d=0&p=" + TARGET_PAGE
|
||||
);
|
||||
|
@ -42,7 +42,7 @@ add_task(async function navigate() {
|
||||
isAppTab = isBrowserAppTab(browser);
|
||||
ok(isAppTab, "Docshell should think it is an app tab");
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(gBrowser, DUMMY);
|
||||
BrowserTestUtils.loadURIString(gBrowser, DUMMY);
|
||||
await BrowserTestUtils.browserStopped(gBrowser);
|
||||
isAppTab = isBrowserAppTab(browser);
|
||||
ok(isAppTab, "Docshell should think it is an app tab");
|
||||
@ -55,7 +55,7 @@ add_task(async function navigate() {
|
||||
isAppTab = isBrowserAppTab(browser);
|
||||
ok(isAppTab, "Docshell should think it is an app tab");
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(gBrowser, "about:robots");
|
||||
BrowserTestUtils.loadURIString(gBrowser, "about:robots");
|
||||
await BrowserTestUtils.browserStopped(gBrowser);
|
||||
isAppTab = isBrowserAppTab(browser);
|
||||
ok(isAppTab, "Docshell should think it is an app tab");
|
||||
|
@ -15,7 +15,7 @@ function triggerSave(aWindow, aCallback) {
|
||||
// This page sets a cookie if and only if a cookie does not exist yet
|
||||
let testURI =
|
||||
"http://mochi.test:8888/browser/browser/base/content/test/general/bug792517-2.html";
|
||||
BrowserTestUtils.startLoadingURIString(testBrowser, testURI);
|
||||
BrowserTestUtils.loadURIString(testBrowser, testURI);
|
||||
BrowserTestUtils.browserLoaded(testBrowser, false, testURI).then(() => {
|
||||
waitForFocus(function () {
|
||||
info("register to handle popupshown");
|
||||
|
@ -43,7 +43,7 @@ function triggerSave(aWindow, aCallback) {
|
||||
windowObserver.setCallback(onUCTDialog);
|
||||
}
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(testBrowser, testURI);
|
||||
BrowserTestUtils.loadURIString(testBrowser, testURI);
|
||||
|
||||
// Create the folder the link will be saved into.
|
||||
var destDir = createTemporarySaveDirectory();
|
||||
|
@ -12,7 +12,7 @@ add_task(async function () {
|
||||
var fileName;
|
||||
|
||||
let loadPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
gBrowser,
|
||||
"http://mochi.test:8888/browser/browser/base/content/test/general/web_video.html"
|
||||
);
|
||||
|
@ -82,6 +82,6 @@ function promiseTabLoadEvent(aTab, aURL, aFinalURL) {
|
||||
}
|
||||
|
||||
info("Wait for load tab event");
|
||||
BrowserTestUtils.startLoadingURIString(aTab.linkedBrowser, aURL);
|
||||
BrowserTestUtils.loadURIString(aTab.linkedBrowser, aURL);
|
||||
return BrowserTestUtils.browserLoaded(aTab.linkedBrowser, false, aFinalURL);
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ add_task(async function () {
|
||||
}
|
||||
|
||||
let tab = BrowserTestUtils.addTab(gBrowser);
|
||||
BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, uri);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, uri);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, uri);
|
||||
await TabStateFlusher.flush(tab.linkedBrowser);
|
||||
|
||||
|
@ -55,7 +55,7 @@ var clickTest = async function (tab) {
|
||||
};
|
||||
|
||||
function loadURI(tab, url) {
|
||||
BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, url);
|
||||
return BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ function insertAndClickAnchor(browser) {
|
||||
* Promise that resolves when the browser is no longer remote.
|
||||
*/
|
||||
function prepareNonRemoteBrowser(aWindow, browser) {
|
||||
BrowserTestUtils.startLoadingURIString(browser, NON_REMOTE_PAGE);
|
||||
BrowserTestUtils.loadURIString(browser, NON_REMOTE_PAGE);
|
||||
return BrowserTestUtils.browserLoaded(browser);
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ add_task(async function () {
|
||||
// Calls focus event on the TabContextMenu early in the test.
|
||||
testWindow.gBrowser.selectedTab.focus();
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
testWindow.gBrowser,
|
||||
"data:text/html,<h1>A Page</h1>"
|
||||
);
|
||||
|
@ -48,7 +48,7 @@ add_task(async function unknownContentType_title_with_pref_enabled() {
|
||||
|
||||
is(gBrowser.contentTitle, "Test Page", "Should have the right title.");
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(browser, unknown_url);
|
||||
BrowserTestUtils.loadURIString(browser, unknown_url);
|
||||
let win = await waitForNewWindow();
|
||||
is(
|
||||
win.location.href,
|
||||
@ -73,7 +73,7 @@ add_task(async function unknownContentType_title_with_pref_disabled() {
|
||||
|
||||
is(gBrowser.contentTitle, "Test Page", "Should have the right title.");
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(browser, unknown_url);
|
||||
BrowserTestUtils.loadURIString(browser, unknown_url);
|
||||
// If the pref is disabled, then the downloads panel should open right away
|
||||
// since there is no UCT window prompt to block it.
|
||||
let waitForPanelShown = BrowserTestUtils.waitForCondition(() => {
|
||||
|
@ -238,7 +238,7 @@ function promiseTabLoadEvent(tab, url) {
|
||||
let loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, handle);
|
||||
|
||||
if (url) {
|
||||
BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, url);
|
||||
}
|
||||
|
||||
return loaded;
|
||||
@ -329,7 +329,7 @@ function promiseOnBookmarkItemAdded(aExpectedURI) {
|
||||
|
||||
async function loadBadCertPage(url) {
|
||||
let loaded = BrowserTestUtils.waitForErrorPage(gBrowser.selectedBrowser);
|
||||
BrowserTestUtils.startLoadingURIString(gBrowser.selectedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, url);
|
||||
await loaded;
|
||||
|
||||
await SpecialPowers.spawn(gBrowser.selectedBrowser, [], async function () {
|
||||
|
@ -72,7 +72,7 @@ add_task(async () => {
|
||||
);
|
||||
});
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
newWindow.gBrowser.selectedBrowser,
|
||||
"about:mozilla"
|
||||
);
|
||||
@ -81,7 +81,7 @@ add_task(async () => {
|
||||
false,
|
||||
"about:mozilla"
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
newWindow.gBrowser.selectedBrowser,
|
||||
"about:about"
|
||||
);
|
||||
@ -179,7 +179,7 @@ add_task(async () => {
|
||||
);
|
||||
});
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
newWindow.gBrowser.selectedBrowser,
|
||||
"about:mozilla"
|
||||
);
|
||||
@ -188,7 +188,7 @@ add_task(async () => {
|
||||
false,
|
||||
"about:mozilla"
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
newWindow.gBrowser.selectedBrowser,
|
||||
"about:about"
|
||||
);
|
||||
|
@ -139,7 +139,7 @@ add_task(async function testBackForwardButtonPress() {
|
||||
await BrowserTestUtils.withNewTab(
|
||||
"https://example.com/1",
|
||||
async function (aBrowser) {
|
||||
BrowserTestUtils.startLoadingURIString(aBrowser, "https://example.com/2");
|
||||
BrowserTestUtils.loadURIString(aBrowser, "https://example.com/2");
|
||||
|
||||
await BrowserTestUtils.browserLoaded(aBrowser);
|
||||
let backButton = document.getElementById("back-button");
|
||||
|
@ -315,7 +315,7 @@ add_task(async function testArrowsDisabledButtons() {
|
||||
"ArrowLeft on Reload button when prior buttons disabled does nothing"
|
||||
);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(aBrowser, "https://example.com/2");
|
||||
BrowserTestUtils.loadURIString(aBrowser, "https://example.com/2");
|
||||
await BrowserTestUtils.browserLoaded(aBrowser);
|
||||
await waitUntilReloadEnabled();
|
||||
startFromUrlBar();
|
||||
|
@ -10,7 +10,7 @@ add_setup(async () => {
|
||||
// makes it easier to be consistent with closing and opening
|
||||
// behaviours between the two kinds of migration wizards.
|
||||
let browser = gBrowser.selectedBrowser;
|
||||
BrowserTestUtils.startLoadingURIString(browser, "https://example.com");
|
||||
BrowserTestUtils.loadURIString(browser, "https://example.com");
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
});
|
||||
|
||||
|
@ -22,7 +22,7 @@ add_task(async function test() {
|
||||
let win = await BrowserTestUtils.openNewBrowserWindow();
|
||||
await SimpleTest.promiseFocus(win);
|
||||
Assert.greater(win.outerWidth, 700, "window is bigger than 700px");
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
win.gBrowser,
|
||||
"data:text/html,<h1>A Page</h1>"
|
||||
);
|
||||
@ -86,7 +86,7 @@ add_task(async function bookmark() {
|
||||
const url = "data:text/html,<h1>A Page</h1>";
|
||||
let win = await BrowserTestUtils.openNewBrowserWindow();
|
||||
await SimpleTest.promiseFocus(win);
|
||||
BrowserTestUtils.startLoadingURIString(win.gBrowser, url);
|
||||
BrowserTestUtils.loadURIString(win.gBrowser, url);
|
||||
await BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
|
||||
|
||||
// The pageAction implementation enables the button at the next animation
|
||||
|
@ -39,7 +39,7 @@ add_task(async function contextMenu_removeExtension_panel() {
|
||||
const url = "data:text/html,<h1>A Page</h1>";
|
||||
let win = await BrowserTestUtils.openNewBrowserWindow();
|
||||
await SimpleTest.promiseFocus(win);
|
||||
BrowserTestUtils.startLoadingURIString(win.gBrowser, url);
|
||||
BrowserTestUtils.loadURIString(win.gBrowser, url);
|
||||
await BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
|
||||
|
||||
info("Shrink the window if necessary, check the meatball menu is visible");
|
||||
@ -243,7 +243,7 @@ add_task(async function contextMenu_removeExtension_disabled_in_panel() {
|
||||
const url = "data:text/html,<h1>A Page</h1>";
|
||||
let win = await BrowserTestUtils.openNewBrowserWindow();
|
||||
await SimpleTest.promiseFocus(win);
|
||||
BrowserTestUtils.startLoadingURIString(win.gBrowser, url);
|
||||
BrowserTestUtils.loadURIString(win.gBrowser, url);
|
||||
await BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
|
||||
|
||||
info("Shrink the window if necessary, check the meatball menu is visible");
|
||||
|
@ -34,10 +34,7 @@ add_task(async function test_menu() {
|
||||
false
|
||||
);
|
||||
let browser = tab.linkedBrowser;
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
browser,
|
||||
WEB_ROOT + "page_style_sample.html"
|
||||
);
|
||||
BrowserTestUtils.loadURIString(browser, WEB_ROOT + "page_style_sample.html");
|
||||
await promiseStylesheetsLoaded(browser, kStyleSheetsInPageStyleSample);
|
||||
|
||||
let menuitems = fillPopupAndGetItems();
|
||||
|
@ -16,7 +16,7 @@ add_task(async function () {
|
||||
false
|
||||
);
|
||||
let browser = tab.linkedBrowser;
|
||||
BrowserTestUtils.startLoadingURIString(browser, PAGE);
|
||||
BrowserTestUtils.loadURIString(browser, PAGE);
|
||||
await promiseStylesheetsLoaded(browser, 18);
|
||||
|
||||
let menupopup = document.getElementById("pageStyleMenu").menupopup;
|
||||
|
@ -70,7 +70,7 @@ async function test() {
|
||||
false,
|
||||
url
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(gBrowser.selectedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, url);
|
||||
await loadPromise;
|
||||
|
||||
// Pass a dummy imageElement, if there isn't an imageElement, pageInfo.js
|
||||
|
@ -4,7 +4,7 @@ const URI =
|
||||
add_task(async function () {
|
||||
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(gBrowser.selectedBrowser, URI);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, URI);
|
||||
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, URI);
|
||||
|
||||
const pageInfo = BrowserPageInfo(
|
||||
|
@ -21,7 +21,7 @@ add_task(async function test_hidden_sidebar() {
|
||||
let panel = gBrowser.getPanel(mainBrowser);
|
||||
panel.append(b);
|
||||
let loaded = BrowserTestUtils.browserLoaded(b);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
b,
|
||||
`data:text/html,<!doctype html><style>
|
||||
@keyframes fade-in {
|
||||
|
@ -271,7 +271,7 @@ add_task(async function navigate_around() {
|
||||
for (let i = 0; i < 50; i++) {
|
||||
let url = urls[i % urls.length];
|
||||
info(`Navigating to ${url}...`);
|
||||
BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, url);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, url);
|
||||
info(`Loaded ${url}.`);
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ add_task(async function testBFCache() {
|
||||
Services.prefs.setIntPref(AUTOPLAY_PREF, Ci.nsIAutoplay.BLOCKED);
|
||||
|
||||
await BrowserTestUtils.withNewTab("about:home", async function (browser) {
|
||||
BrowserTestUtils.startLoadingURIString(browser, AUTOPLAY_PAGE);
|
||||
BrowserTestUtils.loadURIString(browser, AUTOPLAY_PAGE);
|
||||
await blockedIconShown();
|
||||
|
||||
gBrowser.goBack();
|
||||
@ -250,7 +250,7 @@ add_task(async function testChangingBlockingSettingDuringNavigation() {
|
||||
|
||||
await BrowserTestUtils.withNewTab("about:home", async function (browser) {
|
||||
await blockedIconHidden();
|
||||
BrowserTestUtils.startLoadingURIString(browser, AUTOPLAY_PAGE);
|
||||
BrowserTestUtils.loadURIString(browser, AUTOPLAY_PAGE);
|
||||
await blockedIconShown();
|
||||
Services.prefs.setIntPref(AUTOPLAY_PREF, Ci.nsIAutoplay.ALLOWED);
|
||||
|
||||
@ -303,7 +303,7 @@ add_task(async function testBlockedAll() {
|
||||
|
||||
await BrowserTestUtils.withNewTab("about:home", async function (browser) {
|
||||
await blockedIconHidden();
|
||||
BrowserTestUtils.startLoadingURIString(browser, MUTED_AUTOPLAY_PAGE);
|
||||
BrowserTestUtils.loadURIString(browser, MUTED_AUTOPLAY_PAGE);
|
||||
await blockedIconShown();
|
||||
|
||||
await openPermissionPopup();
|
||||
@ -343,7 +343,7 @@ add_task(async function testMultiplePlayNotificationsFromJS() {
|
||||
|
||||
await blockedIconHidden();
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(browser, AUTOPLAY_JS_PAGE);
|
||||
BrowserTestUtils.loadURIString(browser, AUTOPLAY_JS_PAGE);
|
||||
|
||||
await blockedIconShown();
|
||||
|
||||
|
@ -230,7 +230,7 @@ add_task(async function testPermissionHints() {
|
||||
|
||||
await closePermissionPopup();
|
||||
let loaded = BrowserTestUtils.browserLoaded(browser);
|
||||
BrowserTestUtils.startLoadingURIString(browser, PERMISSIONS_PAGE);
|
||||
BrowserTestUtils.loadURIString(browser, PERMISSIONS_PAGE);
|
||||
await loaded;
|
||||
await openPermissionPopup();
|
||||
|
||||
|
@ -54,7 +54,7 @@ function promiseTabLoadEvent(tab, url) {
|
||||
let loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, handle);
|
||||
|
||||
if (url) {
|
||||
BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, url);
|
||||
}
|
||||
|
||||
return loaded;
|
||||
|
@ -35,7 +35,7 @@ function promiseTabLoadEvent(tab, url) {
|
||||
let browser = tab.linkedBrowser;
|
||||
|
||||
if (url) {
|
||||
BrowserTestUtils.startLoadingURIString(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
}
|
||||
|
||||
return BrowserTestUtils.browserLoaded(browser, false, url);
|
||||
|
@ -172,7 +172,7 @@ function promiseTabLoadEvent(tab, url) {
|
||||
let loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, handle);
|
||||
|
||||
if (url) {
|
||||
BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, url);
|
||||
}
|
||||
|
||||
return loaded;
|
||||
|
@ -34,7 +34,7 @@ add_task(async function test() {
|
||||
|
||||
// Mixed Script Test
|
||||
var url = HTTPS_TEST_ROOT + "file_bug822367_1.html";
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
await BrowserTestUtils.browserLoaded(gTestBrowser, false, url);
|
||||
});
|
||||
|
||||
@ -63,7 +63,7 @@ add_task(async function MixedTest1B() {
|
||||
// Mixed Display Test - Doorhanger should not appear
|
||||
add_task(async function MixedTest2() {
|
||||
var url = HTTPS_TEST_ROOT_2 + "file_bug822367_2.html";
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
await BrowserTestUtils.browserLoaded(gTestBrowser, false, url);
|
||||
|
||||
await assertMixedContentBlockingState(gTestBrowser, {
|
||||
@ -76,7 +76,7 @@ add_task(async function MixedTest2() {
|
||||
// Mixed Script and Display Test - User Override should cause both the script and the image to load.
|
||||
add_task(async function MixedTest3() {
|
||||
var url = HTTPS_TEST_ROOT + "file_bug822367_3.html";
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
await BrowserTestUtils.browserLoaded(gTestBrowser, false, url);
|
||||
});
|
||||
|
||||
@ -115,7 +115,7 @@ add_task(async function MixedTest3B() {
|
||||
// Location change - User override on one page doesn't propagate to another page after location change.
|
||||
add_task(async function MixedTest4() {
|
||||
var url = HTTPS_TEST_ROOT_2 + "file_bug822367_4.html";
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
await BrowserTestUtils.browserLoaded(gTestBrowser, false, url);
|
||||
});
|
||||
|
||||
@ -164,7 +164,7 @@ add_task(async function MixedTest4C() {
|
||||
// Mixed script attempts to load in a document.open()
|
||||
add_task(async function MixedTest5() {
|
||||
var url = HTTPS_TEST_ROOT + "file_bug822367_5.html";
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
await BrowserTestUtils.browserLoaded(gTestBrowser, false, url);
|
||||
});
|
||||
|
||||
@ -192,7 +192,7 @@ add_task(async function MixedTest5B() {
|
||||
// Mixed script attempts to load in a document.open() that is within an iframe.
|
||||
add_task(async function MixedTest6() {
|
||||
var url = HTTPS_TEST_ROOT_2 + "file_bug822367_6.html";
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
await BrowserTestUtils.browserLoaded(gTestBrowser, false, url);
|
||||
});
|
||||
|
||||
|
@ -73,7 +73,7 @@ add_task(async function test1() {
|
||||
// page and see if our decision is persistent
|
||||
url = HTTPS_TEST_ROOT_1 + "file_bug902156_2.html";
|
||||
browserLoaded = BrowserTestUtils.browserLoaded(browser, false, url);
|
||||
BrowserTestUtils.startLoadingURIString(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
await browserLoaded;
|
||||
|
||||
// The Control Center button should appear but isMixedContentBlocked should be NOT true,
|
||||
|
@ -366,10 +366,7 @@ add_task(async function test_no_cert_error() {
|
||||
gBrowser.selectedTab = newTab;
|
||||
|
||||
let promise = BrowserTestUtils.waitForErrorPage(gBrowser.selectedBrowser);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
gBrowser,
|
||||
"https://nocert.example.com/"
|
||||
);
|
||||
BrowserTestUtils.loadURIString(gBrowser, "https://nocert.example.com/");
|
||||
await promise;
|
||||
is(
|
||||
getIdentityMode(),
|
||||
@ -410,11 +407,8 @@ add_task(async function test_https_only_error() {
|
||||
gBrowser.selectedTab = newTab;
|
||||
|
||||
let promise = BrowserTestUtils.waitForErrorPage(gBrowser.selectedBrowser);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
gBrowser,
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
"http://nocert.example.com/"
|
||||
);
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
BrowserTestUtils.loadURIString(gBrowser, "http://nocert.example.com/");
|
||||
await promise;
|
||||
is(
|
||||
getIdentityMode(),
|
||||
@ -582,7 +576,7 @@ add_task(async function test_about_blocked() {
|
||||
let newTab = BrowserTestUtils.addTab(gBrowser);
|
||||
gBrowser.selectedTab = newTab;
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(gBrowser.selectedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, url);
|
||||
|
||||
await BrowserTestUtils.browserLoaded(
|
||||
gBrowser.selectedBrowser,
|
||||
@ -611,10 +605,7 @@ add_task(async function test_no_cert_error_security_connection_bg() {
|
||||
let tab = BrowserTestUtils.addTab(gBrowser);
|
||||
gBrowser.selectedTab = tab;
|
||||
let promise = BrowserTestUtils.waitForErrorPage(gBrowser.selectedBrowser);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
gBrowser,
|
||||
"https://nocert.example.com/"
|
||||
);
|
||||
BrowserTestUtils.loadURIString(gBrowser, "https://nocert.example.com/");
|
||||
await promise;
|
||||
|
||||
is(
|
||||
|
@ -43,7 +43,7 @@ function runTests() {
|
||||
BrowserTestUtils.browserLoaded(gTestBrowser, false, url).then(
|
||||
verifyUInotDegraded
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------
|
||||
|
@ -46,7 +46,7 @@ add_task(async function () {
|
||||
|
||||
await BrowserTestUtils.withNewTab("about:blank", async function (browser) {
|
||||
// Try deprecated versions
|
||||
BrowserTestUtils.startLoadingURIString(browser, HTTPS_TLS1_0);
|
||||
BrowserTestUtils.loadURIString(browser, HTTPS_TLS1_0);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
isSecurityState(browser, "broken");
|
||||
is(
|
||||
@ -56,7 +56,7 @@ add_task(async function () {
|
||||
);
|
||||
await checkConnectionState("not-secure");
|
||||
|
||||
BrowserTestUtils.startLoadingURIString(browser, HTTPS_TLS1_1);
|
||||
BrowserTestUtils.loadURIString(browser, HTTPS_TLS1_1);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
isSecurityState(browser, "broken");
|
||||
is(
|
||||
@ -67,14 +67,14 @@ add_task(async function () {
|
||||
await checkConnectionState("not-secure");
|
||||
|
||||
// Transition to secure
|
||||
BrowserTestUtils.startLoadingURIString(browser, HTTPS_TLS1_2);
|
||||
BrowserTestUtils.loadURIString(browser, HTTPS_TLS1_2);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
isSecurityState(browser, "secure");
|
||||
is(getIdentityMode(), "verifiedDomain", "Identity should be verified");
|
||||
await checkConnectionState("secure");
|
||||
|
||||
// Transition back to broken
|
||||
BrowserTestUtils.startLoadingURIString(browser, HTTPS_TLS1_1);
|
||||
BrowserTestUtils.loadURIString(browser, HTTPS_TLS1_1);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
isSecurityState(browser, "broken");
|
||||
is(
|
||||
@ -85,7 +85,7 @@ add_task(async function () {
|
||||
await checkConnectionState("not-secure");
|
||||
|
||||
// TLS1.3 for completeness
|
||||
BrowserTestUtils.startLoadingURIString(browser, HTTPS_TLS1_3);
|
||||
BrowserTestUtils.loadURIString(browser, HTTPS_TLS1_3);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
isSecurityState(browser, "secure");
|
||||
is(getIdentityMode(), "verifiedDomain", "Identity should be verified");
|
||||
|
@ -7,23 +7,20 @@ const MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT = MOZILLA_PKIX_ERROR_BASE + 14;
|
||||
add_task(async function test() {
|
||||
await BrowserTestUtils.withNewTab("about:blank", async function (browser) {
|
||||
let loaded = BrowserTestUtils.waitForErrorPage(browser);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
browser,
|
||||
"https://self-signed.example.com"
|
||||
);
|
||||
BrowserTestUtils.loadURIString(browser, "https://self-signed.example.com");
|
||||
await loaded;
|
||||
let securityInfo = gBrowser.securityUI.secInfo;
|
||||
ok(!securityInfo, "Found no security info");
|
||||
|
||||
loaded = BrowserTestUtils.browserLoaded(browser);
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
BrowserTestUtils.startLoadingURIString(browser, "http://example.com");
|
||||
BrowserTestUtils.loadURIString(browser, "http://example.com");
|
||||
await loaded;
|
||||
securityInfo = gBrowser.securityUI.secInfo;
|
||||
ok(!securityInfo, "Found no security info");
|
||||
|
||||
loaded = BrowserTestUtils.browserLoaded(browser);
|
||||
BrowserTestUtils.startLoadingURIString(browser, "https://example.com");
|
||||
BrowserTestUtils.loadURIString(browser, "https://example.com");
|
||||
await loaded;
|
||||
securityInfo = gBrowser.securityUI.secInfo;
|
||||
ok(securityInfo, "Found some security info");
|
||||
|
@ -43,10 +43,7 @@ add_task(async function test() {
|
||||
false,
|
||||
"https://example.com/"
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
tab.linkedBrowser,
|
||||
"https://example.com"
|
||||
);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, "https://example.com");
|
||||
await loaded;
|
||||
|
||||
is(classChanges, 1, "Changed the className once");
|
||||
|
@ -122,7 +122,7 @@ async function runTest(i, forward) {
|
||||
false,
|
||||
currentTest.location
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
gBrowser.selectedBrowser,
|
||||
currentTest.location
|
||||
);
|
||||
|
@ -33,7 +33,7 @@ add_task(async function () {
|
||||
"chrome://mochitests/content",
|
||||
"https://example.com"
|
||||
) + "dummy_page.html";
|
||||
BrowserTestUtils.startLoadingURIString(browser, uri);
|
||||
BrowserTestUtils.loadURIString(browser, uri);
|
||||
await BrowserTestUtils.browserLoaded(browser, false, uri);
|
||||
is(onLocationChangeCount, 1, "should have 1 onLocationChange event");
|
||||
is(onSecurityChangeCount, 1, "should have 1 onSecurityChange event");
|
||||
|
@ -97,7 +97,7 @@ function testInsecure1() {
|
||||
BrowserTestUtils.browserLoaded(gTestBrowser, false, url).then(
|
||||
checkUIForTest1
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
}
|
||||
|
||||
async function checkUIForTest1() {
|
||||
@ -123,7 +123,7 @@ function test2() {
|
||||
BrowserTestUtils.browserLoaded(gTestBrowser, false, url).then(
|
||||
checkUIForTest2
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
}
|
||||
|
||||
async function checkUIForTest2() {
|
||||
@ -150,7 +150,7 @@ function test3() {
|
||||
BrowserTestUtils.browserLoaded(gTestBrowser, false, url).then(
|
||||
checkLoadEventForTest3
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
}
|
||||
|
||||
function checkLoadEventForTest3() {
|
||||
@ -171,7 +171,7 @@ function test4() {
|
||||
BrowserTestUtils.browserLoaded(gTestBrowser, false, url).then(
|
||||
checkLoadEventForTest4
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
}
|
||||
|
||||
function checkLoadEventForTest4() {
|
||||
@ -197,7 +197,7 @@ function test5() {
|
||||
BrowserTestUtils.browserLoaded(gTestBrowser, false, url).then(
|
||||
checkLoadEventForTest5
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
}
|
||||
|
||||
function checkLoadEventForTest5() {
|
||||
@ -227,7 +227,7 @@ function test6() {
|
||||
BrowserTestUtils.browserLoaded(gTestBrowser, false, url).then(
|
||||
checkLoadEventForTest6
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
}
|
||||
|
||||
function checkLoadEventForTest6() {
|
||||
@ -251,7 +251,7 @@ function test7() {
|
||||
BrowserTestUtils.browserLoaded(gTestBrowser, false, url).then(
|
||||
checkLoadEventForTest7
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
}
|
||||
|
||||
function checkLoadEventForTest7() {
|
||||
@ -276,7 +276,7 @@ function test8() {
|
||||
BrowserTestUtils.browserLoaded(gTestBrowser, false, url).then(
|
||||
checkLoadEventForTest8
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
}
|
||||
|
||||
function checkLoadEventForTest8() {
|
||||
@ -305,7 +305,7 @@ function test9() {
|
||||
BrowserTestUtils.browserLoaded(gTestBrowser, false, url).then(
|
||||
checkLoadEventForTest9
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
}
|
||||
|
||||
function checkLoadEventForTest9() {
|
||||
|
@ -40,7 +40,7 @@ add_task(async function () {
|
||||
// Navigation from an http page to a https page with no mixed content
|
||||
// The http page loads an http image on unload
|
||||
url = HTTPS_TEST_ROOT_1 + "file_mixedContentFromOnunload_test1.html";
|
||||
BrowserTestUtils.startLoadingURIString(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
// check security state. Since current url is https and doesn't have any
|
||||
// mixed content resources, we expect it to be secure.
|
||||
@ -53,10 +53,10 @@ add_task(async function () {
|
||||
// Navigation from an http page to a https page that has mixed display content
|
||||
// The https page loads an http image on unload
|
||||
url = HTTP_TEST_ROOT_2 + "file_mixedContentFromOnunload.html";
|
||||
BrowserTestUtils.startLoadingURIString(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
url = HTTPS_TEST_ROOT_2 + "file_mixedContentFromOnunload_test2.html";
|
||||
BrowserTestUtils.startLoadingURIString(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
isSecurityState(browser, "broken");
|
||||
await assertMixedContentBlockingState(browser, {
|
||||
|
@ -52,7 +52,7 @@ add_task(async function () {
|
||||
checkIdentityPopup("security-broken.svg");
|
||||
|
||||
// check that a warning is shown even without mixed content
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
BrowserTestUtils.loadURIString(
|
||||
gBrowser.selectedBrowser,
|
||||
"https://self-signed.example.com"
|
||||
);
|
||||
|
@ -49,7 +49,7 @@ async function run_testcase(testcase) {
|
||||
// seem to work with withNewTab.
|
||||
await BrowserTestUtils.withNewTab("about:blank", async browser => {
|
||||
// Navigate to the test URI.
|
||||
BrowserTestUtils.startLoadingURIString(browser, testcase.uri);
|
||||
BrowserTestUtils.loadURIString(browser, testcase.uri);
|
||||
if (!testcase.expectErrorPage) {
|
||||
await BrowserTestUtils.browserLoaded(browser, false, testcase.uri);
|
||||
} else {
|
||||
@ -62,7 +62,7 @@ async function run_testcase(testcase) {
|
||||
);
|
||||
|
||||
// Navigate to a URI that should be secure.
|
||||
BrowserTestUtils.startLoadingURIString(browser, kSecureURI);
|
||||
BrowserTestUtils.loadURIString(browser, kSecureURI);
|
||||
await BrowserTestUtils.browserLoaded(browser, false, kSecureURI);
|
||||
let secureIdentityMode =
|
||||
window.document.getElementById("identity-box").className;
|
||||
@ -91,7 +91,7 @@ async function run_testcase(testcase) {
|
||||
is(secureIdentityMode, "verifiedDomain", "identity should start as secure");
|
||||
|
||||
// Navigate to the test URI.
|
||||
BrowserTestUtils.startLoadingURIString(browser, testcase.uri);
|
||||
BrowserTestUtils.loadURIString(browser, testcase.uri);
|
||||
if (!testcase.expectErrorPage) {
|
||||
await BrowserTestUtils.browserLoaded(browser, false, testcase.uri);
|
||||
} else {
|
||||
|
@ -21,7 +21,7 @@ add_task(async function () {
|
||||
|
||||
const TLS_HANDSHAKE_FAILURE_URI = "https://ssl3.example.com/";
|
||||
// Try to connect to a server where the TLS handshake will fail.
|
||||
BrowserTestUtils.startLoadingURIString(browser, TLS_HANDSHAKE_FAILURE_URI);
|
||||
BrowserTestUtils.loadURIString(browser, TLS_HANDSHAKE_FAILURE_URI);
|
||||
await BrowserTestUtils.browserLoaded(
|
||||
browser,
|
||||
false,
|
||||
@ -46,7 +46,7 @@ add_task(async function () {
|
||||
|
||||
const BAD_ABOUT_PAGE_URI = "about:somethingthatdoesnotexist";
|
||||
// Try to load an about: page that doesn't exist
|
||||
BrowserTestUtils.startLoadingURIString(browser, BAD_ABOUT_PAGE_URI);
|
||||
BrowserTestUtils.loadURIString(browser, BAD_ABOUT_PAGE_URI);
|
||||
await BrowserTestUtils.browserLoaded(
|
||||
browser,
|
||||
false,
|
||||
@ -148,7 +148,7 @@ add_task(async function () {
|
||||
const TLS_HANDSHAKE_FAILURE_URI = `https://localhost:${server.port}/`;
|
||||
// Try to connect to a server where the TLS handshake will succeed, but then
|
||||
// the server closes the connection right after.
|
||||
BrowserTestUtils.startLoadingURIString(browser, TLS_HANDSHAKE_FAILURE_URI);
|
||||
BrowserTestUtils.loadURIString(browser, TLS_HANDSHAKE_FAILURE_URI);
|
||||
await BrowserTestUtils.browserLoaded(
|
||||
browser,
|
||||
false,
|
||||
|
@ -74,7 +74,7 @@ add_task(async function test1() {
|
||||
|
||||
// set up test 2
|
||||
let url = HTTP_TEST_ROOT + "test_no_mcb_on_http_site_font.html";
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
await BrowserTestUtils.browserLoaded(gTestBrowser);
|
||||
});
|
||||
|
||||
@ -100,7 +100,7 @@ add_task(async function test2() {
|
||||
|
||||
// set up test 3
|
||||
let url = HTTP_TEST_ROOT + "test_no_mcb_on_http_site_font2.html";
|
||||
BrowserTestUtils.startLoadingURIString(gTestBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gTestBrowser, url);
|
||||
await BrowserTestUtils.browserLoaded(gTestBrowser);
|
||||
});
|
||||
|
||||
|
@ -46,7 +46,7 @@ function promiseTabLoadEvent(tab, url) {
|
||||
let loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, handle);
|
||||
|
||||
if (url) {
|
||||
BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, url);
|
||||
}
|
||||
|
||||
return loaded;
|
||||
@ -397,7 +397,7 @@ async function assertMixedContentBlockingState(tabbrowser, states = {}) {
|
||||
|
||||
async function loadBadCertPage(url) {
|
||||
let loaded = BrowserTestUtils.waitForErrorPage(gBrowser.selectedBrowser);
|
||||
BrowserTestUtils.startLoadingURIString(gBrowser.selectedBrowser, url);
|
||||
BrowserTestUtils.loadURIString(gBrowser.selectedBrowser, url);
|
||||
await loaded;
|
||||
|
||||
await SpecialPowers.spawn(gBrowser.selectedBrowser, [], async function () {
|
||||
|
@ -16,7 +16,7 @@ function wait_for_event(browser, event) {
|
||||
async function test_on_browser(url, browser) {
|
||||
info(`run test for ${url}`);
|
||||
const startPromise = wait_for_event(browser, "DOMAudioPlaybackStarted");
|
||||
BrowserTestUtils.startLoadingURIString(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
await startPromise;
|
||||
await wait_for_event(browser, "DOMAudioPlaybackStopped");
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ function test_audio_in_browser() {
|
||||
}
|
||||
|
||||
async function test_on_browser(url, browser) {
|
||||
BrowserTestUtils.startLoadingURIString(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
await wait_for_event(browser, "DOMAudioPlaybackStarted");
|
||||
|
||||
var result = await SpecialPowers.spawn(browser, [], test_audio_in_browser);
|
||||
@ -55,7 +55,7 @@ async function test_on_browser(url, browser) {
|
||||
}
|
||||
|
||||
async function test_visibility(url, browser) {
|
||||
BrowserTestUtils.startLoadingURIString(browser, url);
|
||||
BrowserTestUtils.loadURIString(browser, url);
|
||||
await wait_for_event(browser, "DOMAudioPlaybackStarted");
|
||||
|
||||
var result = await SpecialPowers.spawn(browser, [], test_audio_in_browser);
|
||||
|
@ -62,7 +62,7 @@ add_task(async function testSoundIndicatorShouldDisappearAfterTabNavigation() {
|
||||
await waitForTabSoundIndicatorAppears(tab);
|
||||
|
||||
info(`sound indicator should disappear after navigating tab to blank page`);
|
||||
BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, "about:blank");
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, "about:blank");
|
||||
await waitForTabSoundIndicatorDisappears(tab);
|
||||
|
||||
info("remove tab");
|
||||
|
@ -42,7 +42,7 @@ add_task(async function mute_web_audio() {
|
||||
window.gBrowser,
|
||||
"about:blank"
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, PAGE);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, PAGE);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
|
||||
info("- tab should be audible -");
|
||||
|
@ -40,7 +40,7 @@ add_task(async function should_not_show_sound_indicator_for_silent_video() {
|
||||
await waitForTabSoundIndicatorDisappears(tab);
|
||||
|
||||
info("- loading autoplay silent video -");
|
||||
BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, SILENT_PAGE);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, SILENT_PAGE);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
await SpecialPowers.spawn(
|
||||
tab.linkedBrowser,
|
||||
@ -69,10 +69,7 @@ add_task(
|
||||
await waitForTabSoundIndicatorDisappears(tab);
|
||||
|
||||
info("- loading autoplay almost silent video -");
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
tab.linkedBrowser,
|
||||
ALMOST_SILENT_PAGE
|
||||
);
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, ALMOST_SILENT_PAGE);
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
await SpecialPowers.spawn(
|
||||
tab.linkedBrowser,
|
||||
|
@ -59,7 +59,7 @@ add_task(async function testSoundIndicatorShouldDisappearAfterTabNavigation() {
|
||||
|
||||
info(`sound indicator should disappear after navigating tab to blank page`);
|
||||
await Promise.all([
|
||||
BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, "about:blank"),
|
||||
BrowserTestUtils.loadURIString(tab.linkedBrowser, "about:blank"),
|
||||
waitForTabSoundIndicatorDisappears(tab),
|
||||
]);
|
||||
|
||||
|
@ -192,7 +192,7 @@ add_task(async function test_check_auth() {
|
||||
// Try a simple load:
|
||||
await checkDialog(
|
||||
"https://example.com/",
|
||||
browser => BrowserTestUtils.startLoadingURIString(browser, AUTH_URI),
|
||||
browser => BrowserTestUtils.loadURIString(browser, AUTH_URI),
|
||||
HOST,
|
||||
"chrome://global/skin/icons/defaultFavicon.svg",
|
||||
Ci.nsIPrompt.MODAL_TYPE_TAB
|
||||
|
@ -9,7 +9,7 @@ add_task(async function test_check_file_prompt() {
|
||||
await BrowserTestUtils.switchTab(gBrowser, initialTab);
|
||||
|
||||
let testHelper = async function (uri, expectedValue) {
|
||||
BrowserTestUtils.startLoadingURIString(browser, uri);
|
||||
BrowserTestUtils.loadURIString(browser, uri);
|
||||
await BrowserTestUtils.browserLoaded(browser, false, uri);
|
||||
let dialogFinishedShowing = TestUtils.topicObserved(
|
||||
"common-dialog-loaded"
|
||||
|
@ -45,10 +45,7 @@ add_task(async function test_multiple_dialog_navigation() {
|
||||
gBrowser,
|
||||
"https://example.org/gone"
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(
|
||||
browser,
|
||||
"https://example.org/gone"
|
||||
);
|
||||
BrowserTestUtils.loadURIString(browser, "https://example.org/gone");
|
||||
info("Waiting for the next page to load.");
|
||||
await loadedOtherPage;
|
||||
info(
|
||||
|
@ -22,7 +22,7 @@ add_task(async function test_subdialog_esc_does_not_cancel_load() {
|
||||
"http://example.com",
|
||||
async function (browser) {
|
||||
// Start loading a page
|
||||
let loadStartedPromise = BrowserTestUtils.startLoadingURIString(
|
||||
let loadStartedPromise = BrowserTestUtils.loadURIString(
|
||||
browser,
|
||||
TEST_LOAD_PAGE
|
||||
);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user