diff options
Diffstat (limited to 'toolkit/components/extensions/test/browser/browser_ext_themes_alpha_accentcolor.js')
-rw-r--r-- | toolkit/components/extensions/test/browser/browser_ext_themes_alpha_accentcolor.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_alpha_accentcolor.js b/toolkit/components/extensions/test/browser/browser_ext_themes_alpha_accentcolor.js new file mode 100644 index 0000000000..2799d37551 --- /dev/null +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_alpha_accentcolor.js @@ -0,0 +1,39 @@ +"use strict"; + +add_task(async function test_alpha_frame_color() { + let extension = ExtensionTestUtils.loadExtension({ + manifest: { + theme: { + images: { + theme_frame: "image1.png", + }, + colors: { + frame: "rgba(230, 128, 0, 0.1)", + tab_background_text: TEXT_COLOR, + }, + }, + }, + files: { + "image1.png": BACKGROUND, + }, + }); + + await extension.startup(); + + let computedStyle; + if (backgroundColorSetOnRoot()) { + let docEl = window.document.documentElement; + computedStyle = window.getComputedStyle(docEl); + } else { + let toolbox = document.querySelector("#navigator-toolbox"); + computedStyle = window.getComputedStyle(toolbox); + } + + Assert.equal( + computedStyle.backgroundColor, + "rgb(230, 128, 0)", + "Window background color should be opaque" + ); + + await extension.unload(); +}); |