mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 528796 - fix the test so that it measures correctly
This commit is contained in:
parent
1a03348ab2
commit
285cb9af3d
@ -52,8 +52,9 @@ function setScale(win, scale)
|
||||
function shown()
|
||||
{
|
||||
if (screenTest) {
|
||||
is($("popup").boxObject.screenX, screenx, "screen left position");
|
||||
is($("popup").boxObject.screenY, screeny, "screen top position");
|
||||
var box = $("popup").boxObject;
|
||||
is(box.screenX, screenx, "screen left position");
|
||||
is(box.screenY, screeny, "screen top position");
|
||||
}
|
||||
else {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
@ -78,9 +79,12 @@ function nextTest()
|
||||
else {
|
||||
screenTest = true;
|
||||
setScale(window, 2);
|
||||
screenx = document.documentElement.boxObject.screenX + 120;
|
||||
screeny = document.documentElement.boxObject.screenY + 50;
|
||||
$("popup").openPopupAtScreen(screenx, screeny);
|
||||
var box = document.documentElement.boxObject;
|
||||
|
||||
// the iframe is at 4×, but out here css pixels are only 2× device pixels
|
||||
screenx = (x = box.screenX + 120)/2;
|
||||
screeny = (y = box.screenY + 50)/2;
|
||||
$("popup").openPopupAtScreen(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user