summaryrefslogtreecommitdiffstats
path: root/layout/xul/test/test_windowminmaxsize.xhtml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /layout/xul/test/test_windowminmaxsize.xhtml
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/xul/test/test_windowminmaxsize.xhtml')
-rw-r--r--layout/xul/test/test_windowminmaxsize.xhtml62
1 files changed, 16 insertions, 46 deletions
diff --git a/layout/xul/test/test_windowminmaxsize.xhtml b/layout/xul/test/test_windowminmaxsize.xhtml
index 187732dd3d..20f2109c80 100644
--- a/layout/xul/test/test_windowminmaxsize.xhtml
+++ b/layout/xul/test/test_windowminmaxsize.xhtml
@@ -125,59 +125,29 @@ function doPanelTest(panel)
function nextPopupTest(panel)
{
if (++gTestId >= popupTests.length) {
- // Next, check a panel that has a titlebar to ensure that it is accounted for
- // properly in the size.
- var titledPanelWindow = window.browsingContext.topChromeWindow.open("titledpanelwindow.xhtml", "_blank", "chrome,resizable=yes");
- SimpleTest.waitForFocus(titledPanelWindowOpened, titledPanelWindow);
+ SimpleTest.finish();
+ return;
}
- else {
- function setStyle(attr) {
- if (attr in popupTests[gTestId])
- panel.style[attr] = popupTests[gTestId][attr] + "px";
- else
- panel.style[attr] = "";
- }
- setStyle("minWidth");
- setStyle("minHeight");
- setStyle("maxWidth");
- setStyle("maxHeight");
-
- // Prevent event loop starvation as a result of popup events being
- // synchronous. See bug 1131576.
- SimpleTest.executeSoon(() => {
- // Non-chrome shells require focus to open a popup.
- SimpleTest.waitForFocus(() => { panel.openPopup() });
- });
+
+ function setStyle(attr) {
+ if (attr in popupTests[gTestId])
+ panel.style[attr] = popupTests[gTestId][attr] + "px";
+ else
+ panel.style[attr] = "";
}
-}
+ setStyle("minWidth");
+ setStyle("minHeight");
+ setStyle("maxWidth");
+ setStyle("maxHeight");
-function titledPanelWindowOpened(panelwindow)
-{
- info("titledPanelWindowOpened");
- var panel = panelwindow.document.documentElement.firstChild;
- panel.addEventListener("popupshown", () => doTitledPanelTest(panel));
- panel.addEventListener("popuphidden", () => done(panelwindow));
- // See above as for why.
+ // Prevent event loop starvation as a result of popup events being
+ // synchronous. See bug 1131576.
SimpleTest.executeSoon(() => {
- SimpleTest.waitForFocus(() => { panel.openPopup() }, panelwindow);
+ // Non-chrome shells require focus to open a popup.
+ SimpleTest.waitForFocus(() => { panel.openPopup() });
});
}
-function doTitledPanelTest(panel)
-{
- info("doTitledPanelTest");
- var rect = panel.getBoundingClientRect();
- is(rect.width, 120, "panel with titlebar width");
- is(rect.height, 140, "panel with titlebar height");
- panel.hidePopup();
-}
-
-function done(panelwindow)
-{
- panelwindow.close();
- SimpleTest.finish();
-}
-
]]>
</script>