mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1059767 - browser_markupview_events-overflow.js: Fix precision error in alignment r=me
This commit is contained in:
parent
ac7e0ee10e
commit
f68455324e
@ -67,16 +67,19 @@ let test = asyncTest(function*() {
|
|||||||
|
|
||||||
info("Event handler expanded.");
|
info("Event handler expanded.");
|
||||||
|
|
||||||
|
// Wait for any scrolling to finish.
|
||||||
|
yield promiseNextTick();
|
||||||
|
|
||||||
if (data.alignTop) {
|
if (data.alignTop) {
|
||||||
let headerRect = header.getBoundingClientRect();
|
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.");
|
"Clicked header is aligned with the container top.");
|
||||||
|
|
||||||
} else if (data.alignBottom) {
|
} else if (data.alignBottom) {
|
||||||
let editorRect = header.nextElementSibling.getBoundingClientRect();
|
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.");
|
"Clicked event handler code is aligned with the container bottom.");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user