summaryrefslogtreecommitdiffstats
path: root/accessible/tests/browser/mac/browser_bounds.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /accessible/tests/browser/mac/browser_bounds.js
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz
firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'accessible/tests/browser/mac/browser_bounds.js')
-rw-r--r--accessible/tests/browser/mac/browser_bounds.js56
1 files changed, 32 insertions, 24 deletions
diff --git a/accessible/tests/browser/mac/browser_bounds.js b/accessible/tests/browser/mac/browser_bounds.js
index 09343d7c9d..bc7939cfe0 100644
--- a/accessible/tests/browser/mac/browser_bounds.js
+++ b/accessible/tests/browser/mac/browser_bounds.js
@@ -21,22 +21,26 @@ addAccessibleTask(
// test them here instead of calling AXFrame directly.
const [helloWidth, helloHeight] = hello.getAttributeValue("AXSize");
const [worldWidth, worldHeight] = world.getAttributeValue("AXSize");
- ok(helloWidth > 0, "Hello has a positive width");
- ok(helloHeight > 0, "Hello has a positive height");
- ok(worldWidth > 0, "World has a positive width");
- ok(worldHeight > 0, "World has a positive height");
- ok(helloHeight < worldHeight, "Hello has a smaller height than world");
- ok(helloWidth < worldWidth, "Hello has a smaller width than world");
+ Assert.greater(helloWidth, 0, "Hello has a positive width");
+ Assert.greater(helloHeight, 0, "Hello has a positive height");
+ Assert.greater(worldWidth, 0, "World has a positive width");
+ Assert.greater(worldHeight, 0, "World has a positive height");
+ Assert.less(
+ helloHeight,
+ worldHeight,
+ "Hello has a smaller height than world"
+ );
+ Assert.less(helloWidth, worldWidth, "Hello has a smaller width than world");
// Note: these are mac screen coords, so our origin is bottom left
const [helloX, helloY] = hello.getAttributeValue("AXPosition");
const [worldX, worldY] = world.getAttributeValue("AXPosition");
- ok(helloX > 0, "Hello has a positive X");
- ok(helloY > 0, "Hello has a positive Y");
- ok(worldX > 0, "World has a positive X");
- ok(worldY > 0, "World has a positive Y");
- ok(helloY > worldY, "Hello has a larger Y than world");
- ok(helloX == worldX, "Hello and world have the same X");
+ Assert.greater(helloX, 0, "Hello has a positive X");
+ Assert.greater(helloY, 0, "Hello has a positive Y");
+ Assert.greater(worldX, 0, "World has a positive X");
+ Assert.greater(worldY, 0, "World has a positive Y");
+ Assert.greater(helloY, worldY, "Hello has a larger Y than world");
+ Assert.equal(helloX, worldX, "Hello and world have the same X");
}
);
@@ -57,21 +61,25 @@ addAccessibleTask(
// test them here instead of calling AXFrame directly.
const [helloWidth, helloHeight] = hello.getAttributeValue("AXSize");
const [worldWidth, worldHeight] = world.getAttributeValue("AXSize");
- ok(helloWidth > 0, "Hello has a positive width");
- ok(helloHeight > 0, "Hello has a positive height");
- ok(worldWidth > 0, "World has a positive width");
- ok(worldHeight > 0, "World has a positive height");
- ok(helloHeight < worldHeight, "Hello has a smaller height than world");
- ok(helloWidth < worldWidth, "Hello has a smaller width than world");
+ Assert.greater(helloWidth, 0, "Hello has a positive width");
+ Assert.greater(helloHeight, 0, "Hello has a positive height");
+ Assert.greater(worldWidth, 0, "World has a positive width");
+ Assert.greater(worldHeight, 0, "World has a positive height");
+ Assert.less(
+ helloHeight,
+ worldHeight,
+ "Hello has a smaller height than world"
+ );
+ Assert.less(helloWidth, worldWidth, "Hello has a smaller width than world");
// Note: these are mac screen coords, so our origin is bottom left
const [helloX, helloY] = hello.getAttributeValue("AXPosition");
const [worldX, worldY] = world.getAttributeValue("AXPosition");
- ok(helloX < 0, "Hello has a negative X");
- ok(helloY > 0, "Hello has a positive Y");
- ok(worldX < 0, "World has a negative X");
- ok(worldY > 0, "World has a positive Y");
- ok(helloY > worldY, "Hello has a larger Y than world");
- ok(helloX == worldX, "Hello and world have the same X");
+ Assert.less(helloX, 0, "Hello has a negative X");
+ Assert.greater(helloY, 0, "Hello has a positive Y");
+ Assert.less(worldX, 0, "World has a negative X");
+ Assert.greater(worldY, 0, "World has a positive Y");
+ Assert.greater(helloY, worldY, "Hello has a larger Y than world");
+ Assert.equal(helloX, worldX, "Hello and world have the same X");
}
);