mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Bug 591718. Fix mobile browser test to handle getBoundingClientRect including a transform. r=mfinkle
This commit is contained in:
parent
46858a7a66
commit
5b7bd01d72
@ -65,7 +65,9 @@ function checkScrollbarsPosition(aX) {
|
||||
|
||||
let verticalRect = verticalScrollbar.getBoundingClientRect();
|
||||
let margin = parseInt(verticalScrollbar.getAttribute("end"));
|
||||
let expectedPosition = window.innerWidth - aX - margin;
|
||||
let matches = verticalScrollbar.style.MozTransform.match(/^translate\(([-0-9]+)px/);
|
||||
let translateX = matches ? parseInt(matches[1]) : 0;
|
||||
let expectedPosition = window.innerWidth - aX - margin + translateX;
|
||||
is(verticalRect.right, expectedPosition, "The vertical scrollbar should be position to " + expectedPosition + " (got " + verticalRect.right + ")");
|
||||
|
||||
EventUtils.synthesizeMouse(browser, width / 2, height * 3 / 4, { type: "mouseup" });
|
||||
|
@ -65,7 +65,9 @@ function checkScrollbarsPosition(aX) {
|
||||
|
||||
let verticalRect = verticalScrollbar.getBoundingClientRect();
|
||||
let margin = parseInt(verticalScrollbar.getAttribute("end"));
|
||||
let expectedPosition = window.innerWidth - aX - margin;
|
||||
let matches = verticalScrollbar.style.MozTransform.match(/^translate\(([-0-9]+)px/);
|
||||
let translateX = matches ? parseInt(matches[1]) : 0;
|
||||
let expectedPosition = window.innerWidth - aX - margin + translateX;
|
||||
is(verticalRect.right, expectedPosition, "The vertical scrollbar should be position to " + expectedPosition + " (got " + verticalRect.right + ")");
|
||||
|
||||
EventUtils.synthesizeMouse(browser, width / 2, height * 3 / 4, { type: "mouseup" });
|
||||
|
Loading…
Reference in New Issue
Block a user