Skip to content

Commit

Permalink
Backed out 9 changesets (bug 1596918) for causing mochitest permafail…
Browse files Browse the repository at this point in the history
…ures in toolkit/content/tests/chrome/test_findbar_events.xhtml CLOSED TREE

Backed out changeset 45a1c42118f2 (bug 1596918)
Backed out changeset db09910ffa56 (bug 1596918)
Backed out changeset 5c9d9f141c10 (bug 1596918)
Backed out changeset 6a135670d603 (bug 1596918)
Backed out changeset 3a0184e0df72 (bug 1596918)
Backed out changeset 2f0036486823 (bug 1596918)
Backed out changeset a770c6d08d52 (bug 1596918)
Backed out changeset ef062eb7a6ee (bug 1596918)
Backed out changeset a6ea596e98db (bug 1596918)
  • Loading branch information
shindli committed Dec 11, 2019
1 parent 8036845 commit a53e458
Show file tree
Hide file tree
Showing 966 changed files with 4,486 additions and 5,495 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ add_task(async function checkWrongSystemTimeWarning() {
info("Loading and waiting for the cert error");
await certErrorLoaded;

return SpecialPowers.spawn(browser, [], async function() {
return ContentTask.spawn(browser, null, async function() {
let doc = content.document;
let div = doc.getElementById("errorShortDescText");
let systemDateDiv = doc.getElementById("wrongSystemTime_systemDate1");
Expand Down
20 changes: 10 additions & 10 deletions browser/base/content/test/about/browser_aboutCertError_exception.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ add_task(async function checkExceptionDialogButton() {
let browser = tab.linkedBrowser;
let loaded = BrowserTestUtils.browserLoaded(browser, false, BAD_CERT);
info("Clicking the exceptionDialogButton in advanced panel");
await SpecialPowers.spawn(browser, [], async function() {
await ContentTask.spawn(browser, null, async function() {
let doc = content.document;
let exceptionButton = doc.getElementById("exceptionDialogButton");
exceptionButton.click();
Expand All @@ -25,7 +25,7 @@ add_task(async function checkExceptionDialogButton() {
info("Loading the url after adding exception");
await loaded;

await SpecialPowers.spawn(browser, [], async function() {
await ContentTask.spawn(browser, null, async function() {
let doc = content.document;
ok(
!doc.documentURI.startsWith("about:certerror"),
Expand All @@ -52,9 +52,9 @@ add_task(async function checkPermanentExceptionPref() {
let browser = tab.linkedBrowser;
let loaded = BrowserTestUtils.browserLoaded(browser, false, BAD_CERT);
info("Clicking the exceptionDialogButton in advanced panel");
let securityInfoAsString = await SpecialPowers.spawn(
let securityInfoAsString = await ContentTask.spawn(
browser,
[],
null,
async function() {
let doc = content.document;
let exceptionButton = doc.getElementById("exceptionDialogButton");
Expand All @@ -72,7 +72,7 @@ add_task(async function checkPermanentExceptionPref() {
info("Loading the url after adding exception");
await loaded;

await SpecialPowers.spawn(browser, [], async function() {
await ContentTask.spawn(browser, null, async function() {
let doc = content.document;
ok(
!doc.documentURI.startsWith("about:certerror"),
Expand Down Expand Up @@ -116,7 +116,7 @@ add_task(async function checkBadStsCert() {
let tab = await openErrorPage(BAD_STS_CERT, useFrame);
let browser = tab.linkedBrowser;

await SpecialPowers.spawn(browser, [{ frame: useFrame }], async function({
await ContentTask.spawn(browser, { frame: useFrame }, async function({
frame,
}) {
let doc = frame
Expand All @@ -129,9 +129,9 @@ add_task(async function checkBadStsCert() {
);
});

let message = await SpecialPowers.spawn(
let message = await ContentTask.spawn(
browser,
[{ frame: useFrame }],
{ frame: useFrame },
async function({ frame }) {
let doc = frame
? content.document.querySelector("iframe").contentDocument
Expand Down Expand Up @@ -172,7 +172,7 @@ add_task(async function checkhideAddExceptionButtonViaPref() {
let tab = await openErrorPage(BAD_CERT, useFrame);
let browser = tab.linkedBrowser;

await SpecialPowers.spawn(browser, [{ frame: useFrame }], async function({
await ContentTask.spawn(browser, { frame: useFrame }, async function({
frame,
}) {
let doc = frame
Expand All @@ -199,7 +199,7 @@ add_task(async function checkhideAddExceptionButtonInFrames() {
let tab = await openErrorPage(BAD_CERT, true);
let browser = tab.linkedBrowser;

await SpecialPowers.spawn(browser, [], async function() {
await ContentTask.spawn(browser, null, async function() {
let doc = content.document.querySelector("iframe").contentDocument;
let exceptionButton = doc.getElementById("exceptionDialogButton");
ok(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ add_task(async function checkMitmPriming() {
// The page will reload after the initial canary request, so we'll just
// wait until we're seeing the dedicated MitM page.
await TestUtils.waitForCondition(function() {
return SpecialPowers.spawn(browser, [], () => {
return ContentTask.spawn(browser, {}, () => {
return (
content.document.body.getAttribute("code") ==
"MOZILLA_PKIX_ERROR_MITM_DETECTED"
Expand All @@ -54,7 +54,7 @@ add_task(async function checkMitmPriming() {
"Stored the correct issuer"
);

await SpecialPowers.spawn(browser, [], () => {
await ContentTask.spawn(browser, {}, () => {
let mitmName1 = content.document.querySelector(
"#errorShortDescText .mitm-name"
);
Expand Down Expand Up @@ -113,7 +113,7 @@ add_task(async function checkMitmAutoEnableEnterpriseRoots() {
// The page will reload after the initial canary request, so we'll just
// wait until we're seeing the dedicated MitM page.
await TestUtils.waitForCondition(function() {
return SpecialPowers.spawn(browser, [], () => {
return ContentTask.spawn(browser, {}, () => {
return (
content.document.body.getAttribute("code") ==
"MOZILLA_PKIX_ERROR_MITM_DETECTED"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ add_task(async function checkUntrustedCertError() {
let tab = await openErrorPage(UNKNOWN_ISSUER);
let browser = tab.linkedBrowser;
info("Clicking the exceptionDialogButton in advanced panel");
let badCertTechnicalInfoText = await SpecialPowers.spawn(
let badCertTechnicalInfoText = await ContentTask.spawn(
browser,
[],
null,
checkAdvancedAndGetTechnicalInfoText
);
checkCorrectMessages(badCertTechnicalInfoText, browser);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ add_task(async function() {
Services.search.setDefault(engine),
]);
let promise = BrowserTestUtils.browserLoaded(browser);
await SpecialPowers.spawn(browser, [{ needle }], async function(args) {
await ContentTask.spawn(browser, { needle }, async function(args) {
let doc = content.document;
let el = doc.querySelector(["#searchText", "#newtab-search-text"]);
el.value = args.needle;
Expand All @@ -51,7 +51,7 @@ add_task(async function() {
await promise;

// When the search results load, check them for correctness.
await SpecialPowers.spawn(browser, [{ needle }], async function(args) {
await ContentTask.spawn(browser, { needle }, async function(args) {
let loadedText = content.document.body.textContent;
ok(loadedText, "search page loaded");
is(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ add_task(async function() {
);
});

await SpecialPowers.spawn(browser, [], async function() {
await ContentTask.spawn(browser, null, async function() {
// Start composition and type "x"
let input = content.document.querySelector([
"#searchText",
Expand All @@ -46,7 +46,7 @@ add_task(async function() {
});

info("Setting up the mutation observer before synthesizing composition");
let mutationPromise = SpecialPowers.spawn(browser, [], async function() {
let mutationPromise = ContentTask.spawn(browser, null, async function() {
let searchController = content.wrappedJSObject.gContentSearchController;

// Wait for the search suggestions to become visible.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ add_task(async function() {
Services.search.setDefault(engine),
]);

await SpecialPowers.spawn(browser, [], async function() {
await ContentTask.spawn(browser, null, async function() {
// Type an X in the search input.
let input = content.document.querySelector([
"#searchText",
Expand All @@ -30,7 +30,7 @@ add_task(async function() {

await BrowserTestUtils.synthesizeKey("x", {}, browser);

await SpecialPowers.spawn(browser, [], async function() {
await ContentTask.spawn(browser, null, async function() {
// Wait for the search suggestions to become visible.
let table = content.document.getElementById("searchSuggestionTable");
let input = content.document.querySelector([
Expand All @@ -57,7 +57,7 @@ add_task(async function() {
await BrowserTestUtils.synthesizeKey("a", { accelKey: true }, browser);
await BrowserTestUtils.synthesizeKey("VK_DELETE", {}, browser);

await SpecialPowers.spawn(browser, [], async function() {
await ContentTask.spawn(browser, null, async function() {
let table = content.document.getElementById("searchSuggestionTable");
await ContentTaskUtils.waitForCondition(
() => table.hidden,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ add_task(async function() {
Services.search.setDefault(engine),
]);

await SpecialPowers.spawn(
await ContentTask.spawn(
browser,
[{ expectedName: engine.name }],
{ expectedName: engine.name },
async function(args) {
let engineName =
content.wrappedJSObject.gContentSearchController.defaultEngine.name;
Expand Down Expand Up @@ -65,7 +65,7 @@ add_task(async function() {
);

// Perform a search to increase the SEARCH_COUNT histogram.
await SpecialPowers.spawn(browser, [{ searchStr }], async function(args) {
await ContentTask.spawn(browser, { searchStr }, async function(args) {
let doc = content.document;
info("Perform a search.");
let el = doc.querySelector(["#searchText", "#newtab-search-text"]);
Expand Down
8 changes: 4 additions & 4 deletions browser/base/content/test/about/browser_aboutNetError.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ add_task(async function resetToDefaultConfig() {
TLS12_PAGE
);

await SpecialPowers.spawn(browser, [], async function() {
await ContentTask.spawn(browser, null, async function() {
const doc = content.document;
ok(
doc.documentURI.startsWith("about:neterror"),
Expand Down Expand Up @@ -124,7 +124,7 @@ add_task(async function checkLearnMoreLink() {

const baseURL = Services.urlFormatter.formatURLPref("app.support.baseURL");

await SpecialPowers.spawn(browser, [baseURL], function(_baseURL) {
await ContentTask.spawn(browser, baseURL, function(_baseURL) {
const doc = content.document;
ok(
doc.documentURI.startsWith("about:neterror"),
Expand Down Expand Up @@ -176,7 +176,7 @@ add_task(async function checkEnable10() {
TLS10_PAGE
);

await SpecialPowers.spawn(browser, [], async function() {
await ContentTask.spawn(browser, null, async function() {
const doc = content.document;
ok(
doc.documentURI.startsWith("about:neterror"),
Expand Down Expand Up @@ -227,7 +227,7 @@ add_task(async function dontOffer10WhenAlreadyEnabled() {
info("Loading and waiting for the net error");
await pageLoaded;

await SpecialPowers.spawn(browser, [], async function() {
await ContentTask.spawn(browser, null, async function() {
const doc = content.document;
ok(
doc.documentURI.startsWith("about:neterror"),
Expand Down
12 changes: 6 additions & 6 deletions browser/base/content/test/about/browser_aboutSupport.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ add_task(async function() {
await BrowserTestUtils.withNewTab(
{ gBrowser, url: "about:support" },
async function(browser) {
let keyLocationServiceGoogleStatus = await SpecialPowers.spawn(
let keyLocationServiceGoogleStatus = await ContentTask.spawn(
browser,
[],
null,
async function() {
let textBox = content.document.getElementById(
"key-location-service-google-box"
Expand All @@ -26,9 +26,9 @@ add_task(async function() {
"Google location service API key status shown"
);

let keySafebrowsingGoogleStatus = await SpecialPowers.spawn(
let keySafebrowsingGoogleStatus = await ContentTask.spawn(
browser,
[],
null,
async function() {
let textBox = content.document.getElementById(
"key-safebrowsing-google-box"
Expand All @@ -45,9 +45,9 @@ add_task(async function() {
"Google Safebrowsing API key status shown"
);

let keyMozillaStatus = await SpecialPowers.spawn(
let keyMozillaStatus = await ContentTask.spawn(
browser,
[],
null,
async function() {
let textBox = content.document.getElementById("key-mozilla-box");
await ContentTaskUtils.waitForCondition(
Expand Down
2 changes: 1 addition & 1 deletion browser/base/content/test/about/browser_bug435325.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ add_task(async function checkSwitchPageToOnlineMode() {
);

// Click on the 'Try again' button.
await SpecialPowers.spawn(browser, [], async function() {
await ContentTask.spawn(browser, null, async function() {
ok(
content.document.documentURI.startsWith("about:neterror?e=netOffline"),
"Should be showing error page"
Expand Down
2 changes: 1 addition & 1 deletion browser/base/content/test/about/browser_bug633691.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ add_task(async function test() {
await BrowserTestUtils.withNewTab({ gBrowser, url: URL }, async function(
browser
) {
let context = await SpecialPowers.spawn(browser, [], function() {
let context = await ContentTask.spawn(browser, null, function() {
let iframe = content.document.querySelector("iframe");
iframe.src = "https://expired.example.com/";
return BrowsingContext.getFromWindow(iframe.contentWindow);
Expand Down
3 changes: 0 additions & 3 deletions browser/base/content/test/about/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,6 @@ function promiseTabLoadEvent(tab, url) {
* Wait for the search engine to change.
*/
function promiseContentSearchChange(browser, newEngineName) {
// Callers of this depend on very specific, very racy timing, and fail
// if we introduce the trip through SpecialPowersParent that
// SpecialPowers.spawn requires.
return ContentTask.spawn(browser, { newEngineName }, async function(args) {
return new Promise(resolve => {
content.addEventListener("ContentSearchService", function listener(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ add_task(async function test_notificationReplace() {
url: notificationURL,
},
async function dummyTabTask(aBrowser) {
await SpecialPowers.spawn(aBrowser, [], async function() {
await ContentTask.spawn(aBrowser, {}, async function() {
let win = content.window.wrappedJSObject;
let notification = win.showNotification1();
let promiseCloseEvent = ContentTaskUtils.waitForEvent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ add_task(async function test_notificationPreventDefaultAndSwitchTabs() {

// First, show a notification that will be have the tab-switching prevented.
function promiseNotificationEvent(evt) {
return SpecialPowers.spawn(aBrowser, [evt], async function(contentEvt) {
return ContentTask.spawn(aBrowser, evt, async function(contentEvt) {
return new Promise(resolve => {
let contentNotification = content.wrappedJSObject._notification;
contentNotification.addEventListener(
Expand Down
4 changes: 2 additions & 2 deletions browser/base/content/test/alerts/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function promiseWindowClosed(window) {
*/
function openNotification(aBrowser, fn, timeout) {
info(`openNotification: ${fn}`);
return SpecialPowers.spawn(aBrowser, [[fn, timeout]], async function([
return ContentTask.spawn(aBrowser, [fn, timeout], async function([
contentFn,
contentTimeout,
]) {
Expand All @@ -60,7 +60,7 @@ function openNotification(aBrowser, fn, timeout) {
}

function closeNotification(aBrowser) {
return SpecialPowers.spawn(aBrowser, [], function() {
return ContentTask.spawn(aBrowser, null, function() {
content.wrappedJSObject._notification.close();
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ add_task(async function checkCaptivePortalCertErrorUI() {
CANONICAL_URL
);

await SpecialPowers.spawn(browser, [], () => {
await ContentTask.spawn(browser, null, () => {
let doc = content.document;
ok(
doc.body.classList.contains("captiveportal"),
Expand Down Expand Up @@ -84,7 +84,7 @@ add_task(async function checkCaptivePortalCertErrorUI() {
// Passing an empty function to BrowserTestUtils.switchTab lets us wait for an arbitrary
// tab switch.
portalTabPromise = BrowserTestUtils.switchTab(gBrowser, () => {});
await SpecialPowers.spawn(browser, [], () => {
await ContentTask.spawn(browser, null, () => {
info("Clicking the Open Login Page button.");
content.document.getElementById("openPortalLoginPageButton").click();
});
Expand All @@ -102,7 +102,7 @@ add_task(async function checkCaptivePortalCertErrorUI() {
"Waiting for error tab to be reloaded after the captive portal was freed."
);
await errorTabReloaded;
await SpecialPowers.spawn(browser, [], () => {
await ContentTask.spawn(browser, null, () => {
let doc = content.document;
ok(
!doc.body.classList.contains("captiveportal"),
Expand Down
Loading

0 comments on commit a53e458

Please sign in to comment.