Bug 1059767 - browser_markupview_events-overflow.js: Fix precision error in alignment r=me

This commit is contained in:
Michael Ratcliffe 2014-08-28 14:29:55 +01:00
parent ac7e0ee10e
commit f68455324e

View File

@ -67,16 +67,19 @@ let test = asyncTest(function*() {
info("Event handler expanded.");
// Wait for any scrolling to finish.
yield promiseNextTick();
if (data.alignTop) {
let headerRect = header.getBoundingClientRect();
is(headerRect.top, containerRect.top,
is(Math.round(headerRect.top), Math.round(containerRect.top),
"Clicked header is aligned with the container top.");
} else if (data.alignBottom) {
let editorRect = header.nextElementSibling.getBoundingClientRect();
is(editorRect.bottom, containerRect.bottom,
is(Math.round(editorRect.bottom), Math.round(containerRect.bottom),
"Clicked event handler code is aligned with the container bottom.");
} else {