Backed out changeset 0fab45288998 (bug 1901826) for causing bc perma failures @ browser_fullscreen_tab_preview.js

This commit is contained in:
Sandor Molnar 2024-09-19 00:18:45 +03:00
parent ee98e7fb84
commit 6ba6c8cdf3
3 changed files with 1 additions and 84 deletions

View File

@ -798,7 +798,7 @@ var FullScreen = {
// e.g. we wouldn't want the autoscroll icon firing this event, so when the user
// toggles chrome when moving mouse to the top, it doesn't go away again.
let target = aEvent.originalTarget;
if (target.localName == "tooltip" || target.id == "tab-preview-panel") {
if (target.localName == "tooltip") {
return;
}
if (

View File

@ -49,8 +49,6 @@ skip-if = [
["browser_fullscreen_newwindow.js"]
["browser_fullscreen_tab_preview.js"]
["browser_fullscreen_permissions_prompt.js"]
["browser_fullscreen_warning.js"]

View File

@ -1,81 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// This test ensures dismissing a tab preview does not hide the nav toolbox
// when browser.fullscreen.autohide is true.
add_setup(async () => {
await SpecialPowers.pushPrefEnv({
set: [
["browser.fullscreen.autohide", true],
["browser.tabs.hoverPreview.enabled", true],
["ui.tooltip.delay_ms", 0],
],
});
});
add_task(async function testTabPreview() {
await waitForBrowserWindowActive(window);
let tab = BrowserTestUtils.addTab(gBrowser, "about:blank");
let onFullscreen = Promise.all([
BrowserTestUtils.waitForEvent(window, "fullscreen"),
BrowserTestUtils.waitForEvent(
window,
"sizemodechange",
false,
() => window.fullScreen
),
]);
document.getElementById("View:FullScreen").doCommand();
await onFullscreen;
// make sure the toolbox is visible if it's autohidden
FullScreen.showNavToolbox();
let tabPreviewPanel = document.getElementById("tab-preview-panel");
// open tab preview
const previewShown = BrowserTestUtils.waitForPopupEvent(
tabPreviewPanel,
"shown"
);
EventUtils.synthesizeMouse(
tab,
1,
1,
{
type: "mouseover",
},
window
);
await previewShown;
// close tab preview
const previewHidden = BrowserTestUtils.waitForPopupEvent(
tabPreviewPanel,
"hidden"
);
EventUtils.synthesizeMouse(
document.getElementById("tabs-newtab-button"),
1,
1,
{ type: "mouseover" }
);
await previewHidden;
// navtoolbox should still be visible
Assert.ok(
!FullScreen._isChromeCollapsed,
"Toolbar remains visible after tab preview is hidden"
);
BrowserTestUtils.removeTab(tab);
let onExitFullscreen = Promise.all([
BrowserTestUtils.waitForEvent(window, "fullscreen"),
BrowserTestUtils.waitForEvent(
window,
"sizemodechange",
false,
() => !window.fullScreen
),
]);
document.getElementById("View:FullScreen").doCommand();
await onExitFullscreen;
});