diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /remote/cdp/test/browser/page | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'remote/cdp/test/browser/page')
3 files changed, 28 insertions, 19 deletions
diff --git a/remote/cdp/test/browser/page/browser_captureScreenshot.js b/remote/cdp/test/browser/page/browser_captureScreenshot.js index ecd688fd14..1ccd54bc36 100644 --- a/remote/cdp/test/browser/page/browser_captureScreenshot.js +++ b/remote/cdp/test/browser/page/browser_captureScreenshot.js @@ -135,12 +135,14 @@ add_task(async function asJPEGFormatAndQuality({ client }) { is(info10.height, (viewport.height - viewport.y) * scale); // Images of different quality result in different content sizes - ok( - info100.length > infoDefault.length, + Assert.greater( + info100.length, + infoDefault.length, "Size of quality 100 is larger than default" ); - ok( - info10.length < infoDefault.length, + Assert.less( + info10.length, + infoDefault.length, "Size of quality 10 is smaller than default" ); }); diff --git a/remote/cdp/test/browser/page/browser_getLayoutMetrics.js b/remote/cdp/test/browser/page/browser_getLayoutMetrics.js index db8b3e8f3c..ad17e97aec 100644 --- a/remote/cdp/test/browser/page/browser_getLayoutMetrics.js +++ b/remote/cdp/test/browser/page/browser_getLayoutMetrics.js @@ -21,12 +21,14 @@ add_task(async function documentSmallerThanViewport({ client }) { layoutViewport.pageY, "Y position of content is equal to layout viewport" ); - ok( - contentSize.width <= layoutViewport.clientWidth, + Assert.lessOrEqual( + contentSize.width, + layoutViewport.clientWidth, "Width of content is smaller than the layout viewport" ); - ok( - contentSize.height <= layoutViewport.clientHeight, + Assert.lessOrEqual( + contentSize.height, + layoutViewport.clientHeight, "Height of content is smaller than the layout viewport" ); }); @@ -49,12 +51,14 @@ add_task(async function documentLargerThanViewport({ client }) { layoutViewport.pageY, "Y position of content is equal to layout viewport" ); - ok( - contentSize.width > layoutViewport.clientWidth, + Assert.greater( + contentSize.width, + layoutViewport.clientWidth, "Width of content is larger than the layout viewport" ); - ok( - contentSize.height > layoutViewport.clientHeight, + Assert.greater( + contentSize.height, + layoutViewport.clientHeight, "Height of content is larger than the layout viewport" ); }); @@ -81,12 +85,14 @@ add_task(async function documentLargerThanViewportScrolledXY({ client }) { contentSize.y + 100, "Y position of content is equal to layout viewport" ); - ok( - contentSize.width > layoutViewport.clientWidth, + Assert.greater( + contentSize.width, + layoutViewport.clientWidth, "Width of content is larger than the layout viewport" ); - ok( - contentSize.height > layoutViewport.clientHeight, + Assert.greater( + contentSize.height, + layoutViewport.clientHeight, "Height of content is larger than the layout viewport" ); }); diff --git a/remote/cdp/test/browser/page/browser_lifecycleEvent.js b/remote/cdp/test/browser/page/browser_lifecycleEvent.js index da5f5da9e8..eecf18f310 100644 --- a/remote/cdp/test/browser/page/browser_lifecycleEvent.js +++ b/remote/cdp/test/browser/page/browser_lifecycleEvent.js @@ -178,9 +178,10 @@ async function runPageLifecycleTest(client, expectedEventSets, callback) { // Check data as exposed by each of these events let lastTimestamp = frameEvents[0].payload.timestamp; - frameEvents.forEach(({ payload }, index) => { - ok( - payload.timestamp >= lastTimestamp, + frameEvents.forEach(({ payload }) => { + Assert.greaterOrEqual( + payload.timestamp, + lastTimestamp, "timestamp succeeds the one from the former event" ); lastTimestamp = payload.timestamp; |