summaryrefslogtreecommitdiffstats
path: root/toolkit/content/tests/chrome/window_largemenu.xhtml
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/content/tests/chrome/window_largemenu.xhtml')
-rw-r--r--toolkit/content/tests/chrome/window_largemenu.xhtml15
1 files changed, 12 insertions, 3 deletions
diff --git a/toolkit/content/tests/chrome/window_largemenu.xhtml b/toolkit/content/tests/chrome/window_largemenu.xhtml
index 8e6b6718b4..413ab248bc 100644
--- a/toolkit/content/tests/chrome/window_largemenu.xhtml
+++ b/toolkit/content/tests/chrome/window_largemenu.xhtml
@@ -336,14 +336,18 @@ function testPopupMovement()
var marginTop = parseFloat(getComputedStyle(popup).marginTop);
var panelIsTop = SpecialPowers.getBoolPref("ui.panel.default_level_parent");
- var overlapOSChrome = !platformIsMac() && (!isPanelTest || panelIsTop);
+ var overlapOSChrome = canOverlapOSChrome() && (!isPanelTest || panelIsTop);
popup.moveTo(1, 1);
[screenX, screenY] = getScreenXY(popup);
var expectedx = 1, expectedy = 1;
if (!overlapOSChrome) {
- if (screen.availLeft >= 1) expectedx = screen.availLeft;
- if (screen.availTop >= 1) expectedy = screen.availTop;
+ if (screen.availLeft >= 1) {
+ expectedx = screen.availLeft + marginLeft;
+ }
+ if (screen.availTop >= 1) {
+ expectedy = screen.availTop + marginTop;
+ }
}
is(screenX, expectedx, gTests[gTestIndex] + " (1, 1) x");
is(screenY, expectedy, gTests[gTestIndex] + " (1, 1) y");
@@ -398,6 +402,11 @@ function platformIsMac()
return navigator.platform.indexOf("Mac") > -1;
}
+function canOverlapOSChrome()
+{
+ return navigator.platform.startsWith("Win");
+}
+
window.arguments[0].SimpleTest.waitForFocus(runTests, window);
]]>