summaryrefslogtreecommitdiffstats
path: root/accessible/tests/browser/scroll
diff options
context:
space:
mode:
Diffstat (limited to 'accessible/tests/browser/scroll')
-rw-r--r--accessible/tests/browser/scroll/browser_test_scroll_bounds.js14
-rw-r--r--accessible/tests/browser/scroll/browser_test_scroll_substring.js5
2 files changed, 14 insertions, 5 deletions
diff --git a/accessible/tests/browser/scroll/browser_test_scroll_bounds.js b/accessible/tests/browser/scroll/browser_test_scroll_bounds.js
index 31de002cda..33a99266db 100644
--- a/accessible/tests/browser/scroll/browser_test_scroll_bounds.js
+++ b/accessible/tests/browser/scroll/browser_test_scroll_bounds.js
@@ -238,7 +238,11 @@ addAccessibleTask(
newTopBounds[0],
"x of non-fixed element remains accurate."
);
- ok(newTopBounds[1] < 0, "y coordinate shows item scrolled off page");
+ Assert.less(
+ newTopBounds[1],
+ 0,
+ "y coordinate shows item scrolled off page"
+ );
is(
origTopBounds[2],
newTopBounds[2],
@@ -254,7 +258,11 @@ addAccessibleTask(
newDBounds[0],
"x of non-fixed container element remains accurate."
);
- ok(newDBounds[1] < 0, "y coordinate shows container scrolled off page");
+ Assert.less(
+ newDBounds[1],
+ 0,
+ "y coordinate shows container scrolled off page"
+ );
// Removing the position styling on this acc causes it to be bound by
// its parent's bounding box, which alters its width as a block element.
// We don't particularly care about width in this test, so skip it.
@@ -481,7 +489,7 @@ addAccessibleTask(
newBounds[0],
`x coord of non-sticky element remains accurate.`
);
- ok(newBounds[1] < 0, "y coordinate shows item scrolled off page");
+ Assert.less(newBounds[1], 0, "y coordinate shows item scrolled off page");
// Removing the position styling on this acc causes it to be bound by
// its parent's bounding box, which alters its width as a block element.
diff --git a/accessible/tests/browser/scroll/browser_test_scroll_substring.js b/accessible/tests/browser/scroll/browser_test_scroll_substring.js
index e8426d00ca..031b8a5124 100644
--- a/accessible/tests/browser/scroll/browser_test_scroll_substring.js
+++ b/accessible/tests/browser/scroll/browser_test_scroll_substring.js
@@ -45,8 +45,9 @@ The only thing I found in the fridge was a dead dove in a bag.
text.getCharacterExtents(7, {}, objY, {}, {}, COORDTYPE_SCREEN_RELATIVE);
return objY.value;
};
- ok(
- containerHeight < getCharY(),
+ Assert.less(
+ containerHeight,
+ getCharY(),
"Character is outside of container bounds"
);
text.scrollSubstringTo(7, 8, SCROLL_TYPE_TOP_EDGE);