mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 489506. Fix test so it can pass when the screen height is an odd number. r=enndeakin
--HG-- extra : rebase_source : 50f3fd53ab54185ed6f05525dcae070ca6bf9d6e
This commit is contained in:
parent
0cc4169245
commit
0e278f42c6
@ -92,7 +92,9 @@ function popupShown()
|
||||
|
||||
if (gTestIndex == 0) {
|
||||
// the popup should be in the center of the screen
|
||||
is(Math.round(rect.top) + gScreenY, screen.height / 2,
|
||||
// note that if the height is odd, the y-offset will have been rounded
|
||||
// down when we pass the fractional value to openPopupAtScreen above.
|
||||
is(Math.round(rect.top) + gScreenY, Math.floor(screen.height / 2),
|
||||
gTests[gTestIndex] + " top");
|
||||
ok(Math.round(rect.bottom) + gScreenY < screen.height,
|
||||
gTests[gTestIndex] + " bottom");
|
||||
@ -120,7 +122,9 @@ function popupShown()
|
||||
expectedScrollPos = 40;
|
||||
}
|
||||
else if (gTestIndex == 4) {
|
||||
is(Math.round(rect.top) + gScreenY, screen.height / 2,
|
||||
// note that if the height is odd, the y-offset will have been rounded
|
||||
// down when we pass the fractional value to openPopupAtScreen above.
|
||||
is(Math.round(rect.top) + gScreenY, Math.floor(screen.height / 2),
|
||||
gTests[gTestIndex] + " top");
|
||||
ok(Math.round(rect.bottom) + gScreenY < screen.height,
|
||||
gTests[gTestIndex] + " bottom");
|
||||
|
Loading…
Reference in New Issue
Block a user