Bug 1719427: Fix scrollbar tests. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D130672
This commit is contained in:
Stephen A Pohl 2021-11-15 12:39:40 +00:00
parent 73c5f21015
commit 32cf07db0b
2 changed files with 3 additions and 2 deletions

View File

@ -27,7 +27,8 @@ function init()
downButton = SpecialPowers.unwrap(
SpecialPowers.InspectorUtils.getChildrenForNode(scrollbar, true)[4]);
if (!downButton) {
ok(navigator.userAgent.indexOf("Linux") !== -1, "Theme doesn't support scrollbar buttons");
ok(navigator.userAgent.indexOf("Linux") !== -1 ||
navigator.userAgent.indexOf("Mac") !== -1, "Theme doesn't support scrollbar buttons");
SimpleTest.finish();
return;
}

View File

@ -54,7 +54,7 @@ function runTest() {
["", "Small"].forEach(function (size) {
var elem = document.getElementById(orient + size);
var thumbRect = SpecialPowers.unwrap(
SpecialPowers.InspectorUtils.getChildrenForNode(elem, true)[2])
SpecialPowers.InspectorUtils.getChildrenForNode(elem, true)[0])
.childNodes[0].getBoundingClientRect();
var sizeToCheck = orient == "horizontal" ? "width" : "height";
// var expectedSize = size == "Small" ? 19 : 26;