Bug 1165533 - When testing DOMRect.top for getBoundingClientRect(), test only for +0, not for -0. r=Ms2ger

This commit is contained in:
Jeff Walden 2015-07-02 21:19:10 -07:00
parent 17c6c6cb3b
commit 46d87fd534

View File

@ -62,7 +62,10 @@ function execTests() {
}
function testScrollCommand(cmd, expectTop) {
is(root.getBoundingClientRect().top, -expectTop, cmd);
// http://dev.w3.org/csswg/cssom-view/#dom-element-getboundingclientrect
// doesn't explicitly rule out -0 here, but for now assume that only
// positive zeroes are permitted.
is(root.getBoundingClientRect().top, -expectTop + 0, cmd);
}
function testMoveCommand(cmd, expectNode, expectOffset) {