diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /widget/tests/browser/browser_test_scrollbar_colors.js | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/tests/browser/browser_test_scrollbar_colors.js')
-rw-r--r-- | widget/tests/browser/browser_test_scrollbar_colors.js | 45 |
1 files changed, 10 insertions, 35 deletions
diff --git a/widget/tests/browser/browser_test_scrollbar_colors.js b/widget/tests/browser/browser_test_scrollbar_colors.js index 2152412071..458cadd84e 100644 --- a/widget/tests/browser/browser_test_scrollbar_colors.js +++ b/widget/tests/browser/browser_test_scrollbar_colors.js @@ -27,15 +27,6 @@ add_task(async () => { // == Native theme == - const WIN_REFERENCES = [ - // Yellow background - ["255,255,0", 6889], - // Blue scrollbar face - ["0,0,255", 540], - // Cyan scrollbar track - ["0,255,255", 2487], - ]; - const MAC_REFERENCES = [ // Yellow background ["255,255,0", 7225], @@ -45,19 +36,9 @@ add_task(async () => { ["0,255,255", 1760], ]; - // Values have been updated from 8100, 720, 1180 for linux1804 - const LINUX_REFERENCES = [ - // Yellow background - ["255,255,0", 7744], - // Blue scrollbar face - ["0,0,255", 1104], - // Cyan scrollbar track - ["0,255,255", 1152], - ]; - // == Non-native theme == - const WIN10_NNT_REFERENCES = [ + const WIN10_REFERENCES = [ // Yellow background ["255,255,0", 6889], // Blue scrollbar face @@ -66,7 +47,7 @@ add_task(async () => { ["0,255,255", 2355], ]; - const WIN11_NNT_REFERENCES = [ + const WIN11_REFERENCES = [ // Yellow background ["255,255,0", 6889], // Blue scrollbar face @@ -75,9 +56,7 @@ add_task(async () => { ["0,255,255", 2787], ]; - const MAC_NNT_REFERENCES = MAC_REFERENCES; - - const LINUX_NNT_REFERENCES = [ + const LINUX_REFERENCES = [ // Yellow background ["255,255,0", 7744], // Blue scrollbar face @@ -116,23 +95,19 @@ add_task(async () => { let canvas = snapshotRect(content.window, outerRect); let stats = countPixels(canvas); - let isNNT = SpecialPowers.getBoolPref("widget.non-native-theme.enabled"); - let references; if (content.navigator.platform.startsWith("Win")) { - if (!isNNT) { - references = WIN_REFERENCES; - } else if (WindowsVersionInfo.get().buildNumber >= 22000) { - // Windows 11 NNT - references = WIN11_NNT_REFERENCES; + if (WindowsVersionInfo.get().buildNumber >= 22000) { + // Windows 11 + references = WIN11_REFERENCES; } else { - // Windows 10 NNT - references = WIN10_NNT_REFERENCES; + // Windows 10 + references = WIN10_REFERENCES; } } else if (content.navigator.platform.startsWith("Mac")) { - references = isNNT ? MAC_NNT_REFERENCES : MAC_REFERENCES; + references = MAC_REFERENCES; } else if (content.navigator.platform.startsWith("Linux")) { - references = isNNT ? LINUX_NNT_REFERENCES : LINUX_REFERENCES; + references = LINUX_REFERENCES; } else { ok(false, "Unsupported platform"); } |