mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
Bug 1300784 - Follow-up: update browser_selectpopup.js to handle floating point values for bounding client rects. r=jaws
MozReview-Commit-ID: 5O2lmNOZHZD --HG-- extra : rebase_source : 1a442500cce744c55768bdf7c2f53fb74c4404a0
This commit is contained in:
parent
7fde7078aa
commit
b3c9f9342d
@ -447,9 +447,14 @@ function* performLargePopupTests(win) {
|
||||
let cs = win.getComputedStyle(selectPopup);
|
||||
let bpBottom = parseFloat(cs.paddingBottom) + parseFloat(cs.borderBottomWidth);
|
||||
|
||||
is(selectPopup.childNodes[60].getBoundingClientRect().bottom,
|
||||
selectPopup.getBoundingClientRect().bottom - bpBottom,
|
||||
"Popup scroll at correct position " + bpBottom);
|
||||
// Some of the styles applied to the menuitems are percentages, meaning
|
||||
// that the final layout calculations returned by getBoundingClientRect()
|
||||
// might return floating point values. We don't care about sub-pixel
|
||||
// accuracy, and only care about the final pixel value, so we add a
|
||||
// fuzz-factor of 1.
|
||||
SimpleTest.isfuzzy(selectPopup.childNodes[60].getBoundingClientRect().bottom,
|
||||
selectPopup.getBoundingClientRect().bottom - bpBottom,
|
||||
1, "Popup scroll at correct position " + bpBottom);
|
||||
}
|
||||
|
||||
yield hideSelectPopup(selectPopup, "enter", win);
|
||||
|
Loading…
Reference in New Issue
Block a user