summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/performance/browser_tabswitch.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /browser/base/content/test/performance/browser_tabswitch.js
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/base/content/test/performance/browser_tabswitch.js')
-rw-r--r--browser/base/content/test/performance/browser_tabswitch.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/browser/base/content/test/performance/browser_tabswitch.js b/browser/base/content/test/performance/browser_tabswitch.js
index bbbbac3a21..ba29efa662 100644
--- a/browser/base/content/test/performance/browser_tabswitch.js
+++ b/browser/base/content/test/performance/browser_tabswitch.js
@@ -59,6 +59,14 @@ add_task(async function () {
getComputedStyle(gBrowser.selectedTab).paddingInlineStart
);
let minTabWidth = firstTabRect.width - 2 * tabPaddingStart;
+ if (AppConstants.platform == "macosx") {
+ // On macOS, after bug 1886729, gecko screenshots like the ones for this
+ // test can't screenshot the native titlebar. That, plus the fact that
+ // there's no border or shadow (see bug 1702653) means that we only end up
+ // with the tab text color changing, which is smaller than the tab
+ // background size.
+ minTabWidth = 0;
+ }
let maxTabWidth = firstTabRect.width;
let inRange = (val, min, max) => min <= val && val <= max;
@@ -84,11 +92,7 @@ add_task(async function () {
// The tab selection changes between 2 adjacent tabs, so we expect
// both to change color at once: this should be a single rect of the
// width of 2 tabs.
- inRange(
- r.w,
- minTabWidth - 1, // -1 for the border on Win7
- maxTabWidth * 2
- )
+ inRange(r.w, minTabWidth, maxTabWidth * 2)
)
)
),