Bug 388112, fix test by adding offset properly, r=mano

This commit is contained in:
enndeakin%sympatico.ca 2007-08-15 23:48:31 +00:00
Родитель 9c24b8c226
Коммит f723368d7b
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -78,15 +78,15 @@ function popupShown()
// the popup was supposed to open 100 pixels from the bottom, but that
// would put it off screen so it should be flipped to have its bottom
// edge 100 pixels from the bottom
ok(Math.round(rect.top) >= screen.top, gTests[gTestIndex] + " top");
ok(Math.round(rect.top) + gScreenY >= screen.top, gTests[gTestIndex] + " top");
is(Math.round(rect.bottom) + gScreenY, screen.height - 100,
gTests[gTestIndex] + " bottom");
ok(!gOverflowed && !gUnderflowed, gTests[gTestIndex] + " overflow")
}
else if (gTestIndex == 2) {
// the popup is too large so ensure that it is on screen
window.opener.wrappedJSObject.SimpleTest.todo(Math.round(rect.top) >= screen.top, gTests[gTestIndex] + " top");
ok(Math.round(rect.bottom) < screen.height, gTests[gTestIndex] + " bottom");
ok(Math.round(rect.top) + gScreenY >= screen.top, gTests[gTestIndex] + " top");
ok(Math.round(rect.bottom) + gScreenY < screen.height, gTests[gTestIndex] + " bottom");
ok(gOverflowed && !gUnderflowed, gTests[gTestIndex] + " overflow")
}
else if (gTestIndex == 3) {