Backed out changeset b5330b68ce05 (bug 1674135) for perma failures on browser_siteData2.js and browser_pdf_printer_settings.js. CLOSED TREE

This commit is contained in:
Razvan Maries 2020-11-04 02:43:34 +02:00
Родитель 94ebd2d669
Коммит 848e6efc73
8 изменённых файлов: 21 добавлений и 49 удалений

Просмотреть файл

@ -1450,12 +1450,6 @@ toolbar[keyNav=true]:not([collapsed=true]):not([customizing=true]) toolbartabsto
z-index: 2;
}
.dialogStack.temporarilyHidden {
/* For some printing use cases we need to visually hide the dialog before
* actually closing it / make it disappear from the frame tree. */
visibility: hidden;
}
.dialogOverlay {
visibility: hidden;
}

Просмотреть файл

@ -133,10 +133,7 @@ add_task(async function test_tabdialogbox_hide() {
info("Waiting for dialogs to open.");
await Promise.all(dialogs.map(dialog => dialog._dialogReady));
ok(
!BrowserTestUtils.is_hidden(dialogBoxManager._dialogStack),
"Dialog stack is showing"
);
is(dialogBoxManager._dialogStack.hidden, false, "Dialog stack is showing");
dialogBoxManager.hideDialog(browser);
@ -146,10 +143,7 @@ add_task(async function test_tabdialogbox_hide() {
"Dialog manager still has two dialogs."
);
ok(
BrowserTestUtils.is_hidden(dialogBoxManager._dialogStack),
"Dialog stack is hidden"
);
is(dialogBoxManager._dialogStack.hidden, true, "Dialog stack is hidden");
// Navigate to a different page
BrowserTestUtils.loadURI(browser, "https://example.org");

Просмотреть файл

@ -110,10 +110,7 @@ add_task(async function test_tabdialogbox_tab_switch_hidden() {
// Hide the top dialog
dialogBoxManager.hideDialog(browser);
ok(
BrowserTestUtils.is_hidden(dialogBoxManager._dialogStack),
"Dialog stack is hidden"
);
is(dialogBoxManager._dialogStack.hidden, true, "Dialog stack is hidden");
// Switch to first tab
await BrowserTestUtils.switchTab(gBrowser, tabs[0]);

Просмотреть файл

@ -105,19 +105,13 @@ add_task(async function() {
mockUpdateManager.register();
// Test the dialog window opens
ok(
BrowserTestUtils.is_hidden(dialogOverlay),
"The dialog should be invisible"
);
is(dialogOverlay.style.visibility, "", "The dialog should be invisible");
let promiseSubDialogLoaded = promiseLoadSubDialog(
"chrome://mozapps/content/update/history.xhtml"
);
showBtn.doCommand();
await promiseSubDialogLoaded;
ok(
!BrowserTestUtils.is_hidden(dialogOverlay),
"The dialog should be visible"
);
is(dialogOverlay.style.visibility, "visible", "The dialog should be visible");
let dialogFrame = dialogOverlay.querySelector(".dialogFrame");
let frameDoc = dialogFrame.contentDocument;
@ -180,10 +174,7 @@ add_task(async function() {
// Test the dialog window closes
let closeBtn = dialogOverlay.querySelector(".dialogClose");
closeBtn.doCommand();
ok(
BrowserTestUtils.is_hidden(dialogOverlay),
"The dialog should be invisible"
);
is(dialogOverlay.style.visibility, "", "The dialog should be invisible");
mockUpdateManager.unregister();
gBrowser.removeCurrentTab();

Просмотреть файл

@ -11,7 +11,7 @@ add_task(async function() {
const win = await promiseSubDialogLoaded;
win.Preferences.forceEnableInstantApply();
dialogOverlay = content.gSubDialog._topDialog._overlay;
ok(!BrowserTestUtils.is_hidden(dialogOverlay), "The dialog is visible.");
is(dialogOverlay.style.visibility, "visible", "The dialog is visible.");
return win;
}
@ -20,14 +20,14 @@ add_task(async function() {
closeBtn.doCommand();
}
ok(BrowserTestUtils.is_hidden(dialogOverlay), "The dialog is invisible.");
is(dialogOverlay.style.visibility, "", "The dialog is invisible.");
let win = await languagesSubdialogOpened();
ok(
win.document.getElementById("spoofEnglish").hidden,
"The 'Request English' checkbox is hidden."
);
closeLanguagesSubdialog();
ok(BrowserTestUtils.is_hidden(dialogOverlay), "The dialog is invisible.");
is(dialogOverlay.style.visibility, "", "The dialog is invisible.");
await SpecialPowers.pushPrefEnv({
set: [

Просмотреть файл

@ -160,7 +160,11 @@ function openSiteDataSettingsDialog() {
dialogLoadPromise,
dialogInitPromise,
]).then(() => {
is_element_visible(dialogOverlay, "The Settings dialog should be visible");
is(
dialogOverlay.style.visibility,
"visible",
"The Settings dialog should be visible"
);
});
settingsBtn.doCommand();
return fullyLoadPromise;
@ -178,8 +182,9 @@ function promiseSettingsDialogClose() {
dialogWin.document.documentURI ===
"chrome://browser/content/preferences/dialogs/siteDataSettings.xhtml"
) {
ok(
is_element_hidden(dialogOverlay),
isnot(
dialogOverlay.style.visibility,
"visible",
"The Settings dialog should be hidden"
);
resolve();

Просмотреть файл

@ -140,10 +140,6 @@ class PrintHelper {
assertDialogHidden() {
is(this._dialogs.length, 1, "There is one print dialog");
ok(BrowserTestUtils.is_hidden(this.dialog._box), "The dialog is hidden");
ok(
this.dialog._box.getBoundingClientRect().width > 0,
"The dialog should still have boxes"
);
}
async assertPrintToFile(file, testFn) {

Просмотреть файл

@ -377,8 +377,7 @@ SubDialog.prototype = {
// XXX: Hack to make focus during the dialog's load functions work. Make the element visible
// sooner in DOMContentLoaded but mostly invisible instead of changing visibility just before
// the dialog's load event.
// Note that this needs to inherit so that hideDialog() works as expected.
this._overlay.style.visibility = "inherit";
this._overlay.style.visibility = "visible";
this._overlay.style.opacity = "0.01";
// Ensure the document gets an a11y role of dialog.
@ -451,7 +450,7 @@ SubDialog.prototype = {
detail: { dialog: this },
})
);
this._overlay.style.visibility = "inherit";
this._overlay.style.visibility = "visible";
this._overlay.style.opacity = ""; // XXX: focus hack continued from _onContentLoaded
if (this._box.getAttribute("resizable") == "true") {
@ -886,7 +885,6 @@ class SubDialogManager {
if (!this._dialogs.length) {
// When opening the first dialog, show the dialog stack.
this._dialogStack.hidden = false;
this._dialogStack.classList.remove("temporarilyHidden");
this._topLevelPrevActiveElement = doc.activeElement;
// Mark the top dialog according to the array insertion order.
@ -926,14 +924,12 @@ class SubDialogManager {
}
/**
* Hides the dialog stack for a specific browser, without actually destroying
* frames for stuff within it.
*
* Hides the dialog stack for a specific browser.
* @param aBrowser - The browser associated with the tab dialog.
*/
hideDialog(aBrowser) {
aBrowser.removeAttribute("tabDialogShowing");
this._dialogStack.classList.add("temporarilyHidden");
this._dialogStack.hidden = true;
}
/**
@ -1008,7 +1004,6 @@ class SubDialogManager {
this._topDialog._overlay.setAttribute("topmost", true);
this._topDialog._addDialogEventListeners(false);
this._dialogStack.hidden = false;
this._dialogStack.classList.remove("temporarilyHidden");
} else {
// We have closed the last dialog, do cleanup.
this._topLevelPrevActiveElement.focus();