From 93075fc62476c798c775c6de271a5e231a0edbc5 Mon Sep 17 00:00:00 2001 From: Luca Greco Date: Mon, 26 Nov 2018 16:10:36 +0000 Subject: [PATCH] Bug 1472740 - Avoid LWT aliases in theme API tests that are not specifically about LWT aliases. r=ntim,jaws This patch replace the LWT aliases with their related non-deprecated alias in all the theme API tests that don't seem to be specifically testing the LWT aliases (e.g. browser_ext_themes_lwtsupport.js is leaved unmodified for this reason). The main reason to replace them in the "not stricly LWT-related" tests before their final removal (currently planned for Firefox 69) is that the deprecation warnings will make these tests more noisy (and so they may be making harder to investigate failures, without any actual gain in terms of coverage). Depends on D12297 Differential Revision: https://phabricator.services.mozilla.com/D12783 --HG-- extra : moz-landing-system : lando --- .../browser_ext_browserAction_theme_icons.js | 14 ++++---- .../browser/browser_ext_management_themes.js | 2 +- ...themes_additional_backgrounds_alignment.js | 20 +++++------ .../browser_ext_themes_alpha_accentcolor.js | 8 ++--- .../browser/browser_ext_themes_arrowpanels.js | 6 ++-- .../browser_ext_themes_autocomplete_popup.js | 12 +++---- .../browser_ext_themes_dynamic_getCurrent.js | 36 +++++++++---------- .../browser_ext_themes_dynamic_onUpdated.js | 36 +++++++++---------- .../browser_ext_themes_dynamic_updates.js | 26 +++++++------- .../browser/browser_ext_themes_findbar.js | 14 ++++---- ...wser_ext_themes_getCurrent_differentExt.js | 18 +++++----- ...browser_ext_themes_multiple_backgrounds.js | 6 ++-- .../browser/browser_ext_themes_ntp_colors.js | 8 ++--- ...browser_ext_themes_ntp_colors_perwindow.js | 8 ++--- .../browser/browser_ext_themes_persistence.js | 6 ++-- .../browser_ext_themes_sanitization.js | 30 ++++++++-------- .../browser/browser_ext_themes_separators.js | 6 ++-- .../browser_ext_themes_static_onUpdated.js | 18 +++++----- .../browser/browser_ext_themes_tab_line.js | 4 +-- .../browser/browser_ext_themes_tab_loading.js | 6 ++-- .../browser_ext_themes_tab_selected.js | 4 +-- .../browser_ext_themes_tab_separators.js | 4 +-- .../browser/browser_ext_themes_tab_text.js | 12 +++---- .../browser_ext_themes_theme_transition.js | 4 +-- .../browser_ext_themes_toolbar_fields.js | 14 ++++---- ...browser_ext_themes_toolbar_fields_focus.js | 4 +-- ...browser_ext_themes_toolbarbutton_colors.js | 6 ++-- .../browser_ext_themes_toolbarbutton_icons.js | 12 +++---- .../browser/browser_ext_themes_toolbars.js | 6 ++-- 29 files changed, 177 insertions(+), 173 deletions(-) diff --git a/browser/components/extensions/test/browser/browser_ext_browserAction_theme_icons.js b/browser/components/extensions/test/browser/browser_ext_browserAction_theme_icons.js index 63cf8762dbb6..9af790499a81 100644 --- a/browser/components/extensions/test/browser/browser_ext_browserAction_theme_icons.js +++ b/browser/components/extensions/test/browser/browser_ext_browserAction_theme_icons.js @@ -3,13 +3,13 @@ "use strict"; const LIGHT_THEME_COLORS = { - "accentcolor": "#FFF", - "textcolor": "#000", + "frame": "#FFF", + "tab_background_text": "#000", }; const DARK_THEME_COLORS = { - "accentcolor": "#000", - "textcolor": "#FFF", + "frame": "#000", + "tab_background_text": "#FFF", }; const TOOLBAR_MAPPING = { @@ -142,10 +142,10 @@ add_task(async function browseraction_theme_icons_dark_theme() { add_task(async function browseraction_theme_icons_different_toolbars() { let themeData = { - "accentcolor": "#000", - "textcolor": "#fff", + "frame": "#000", + "tab_background_text": "#fff", "toolbar": "#fff", - "toolbar_text": "#000", + "bookmark_text": "#000", }; await testStaticTheme({ themeData, diff --git a/toolkit/components/extensions/test/browser/browser_ext_management_themes.js b/toolkit/components/extensions/test/browser/browser_ext_management_themes.js index 4d81dc89eab7..62e72e15e92d 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_management_themes.js +++ b/toolkit/components/extensions/test/browser/browser_ext_management_themes.js @@ -17,7 +17,7 @@ add_task(async function test_management_themes() { "description": "test theme", "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, }, }, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_additional_backgrounds_alignment.js b/toolkit/components/extensions/test/browser/browser_ext_themes_additional_backgrounds_alignment.js index 43018a60a352..a1e9b24d53fd 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_additional_backgrounds_alignment.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_additional_backgrounds_alignment.js @@ -2,7 +2,7 @@ /* globals InspectorUtils */ -// Case 1 - When there is a headerURL image and additional_backgrounds_alignment is not specified. +// Case 1 - When there is a theme_frame image and additional_backgrounds_alignment is not specified. // So background-position should default to "right top" add_task(async function test_default_additional_backgrounds_alignment() { const RIGHT_TOP = "100% 0%"; @@ -11,12 +11,12 @@ add_task(async function test_default_additional_backgrounds_alignment() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", "additional_backgrounds": ["image1.png", "image1.png"], }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, }, }, }, @@ -34,7 +34,7 @@ add_task(async function test_default_additional_backgrounds_alignment() { Assert.equal( rootCS.getPropertyValue("background-position"), RIGHT_TOP, - "root only contains headerURL alignment property" + "root only contains theme_frame alignment property" ); @@ -51,7 +51,7 @@ add_task(async function test_default_additional_backgrounds_alignment() { }); -// Case 2 - When there is a headerURL image and additional_backgrounds_alignment is specified. +// Case 2 - When there is a theme_frame image and additional_backgrounds_alignment is specified. add_task(async function test_additional_backgrounds_alignment() { const LEFT_BOTTOM = "0% 100%"; const CENTER_CENTER = "50% 50%"; @@ -61,12 +61,12 @@ add_task(async function test_additional_backgrounds_alignment() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", "additional_backgrounds": ["image1.png", "image1.png", "image1.png"], }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, }, "properties": { additional_backgrounds_alignment: ["left bottom", "center center", "right top"], @@ -87,7 +87,7 @@ add_task(async function test_additional_backgrounds_alignment() { Assert.equal( rootCS.getPropertyValue("background-position"), RIGHT_TOP, - "root only contains headerURL alignment property" + "root only contains theme_frame alignment property" ); 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 index 8a48e44cbf14..ed0a0ce7b660 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_alpha_accentcolor.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_alpha_accentcolor.js @@ -1,15 +1,15 @@ "use strict"; -add_task(async function test_alpha_accentcolor() { +add_task(async function test_alpha_frame_color() { let extension = ExtensionTestUtils.loadExtension({ manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": "rgba(230, 128, 0, 0.1)", - "textcolor": TEXT_COLOR, + "frame": "rgba(230, 128, 0, 0.1)", + "tab_background_text": TEXT_COLOR, }, }, }, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_arrowpanels.js b/toolkit/components/extensions/test/browser/browser_ext_themes_arrowpanels.js index 67a154df0038..aacb9268f2bb 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_arrowpanels.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_arrowpanels.js @@ -24,11 +24,11 @@ add_task(async function test_popup_styling(browser, accDoc) { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "popup": POPUP_BACKGROUND_COLOR, "popup_text": POPUP_TEXT_COLOR, "popup_border": POPUP_BORDER_COLOR, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_autocomplete_popup.js b/toolkit/components/extensions/test/browser/browser_ext_themes_autocomplete_popup.js index a8d37fc18c57..dd2263feaf35 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_autocomplete_popup.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_autocomplete_popup.js @@ -80,11 +80,11 @@ add_task(async function test_popup_url() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "popup": POPUP_COLOR, "popup_border": POPUP_BORDER_COLOR, "popup_text": POPUP_TEXT_COLOR_DARK, @@ -179,11 +179,11 @@ add_task(async function test_popup_url() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "popup": POPUP_COLOR, "popup_text": POPUP_TEXT_COLOR_BRIGHT, "popup_highlight": POPUP_SELECTED_COLOR, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_getCurrent.js b/toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_getCurrent.js index 3b798c34518a..2c482279a412 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_getCurrent.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_getCurrent.js @@ -19,21 +19,21 @@ add_task(async function test_get_current() { const theme1 = { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR_1, - "textcolor": TEXT_COLOR_1, + "frame": ACCENT_COLOR_1, + "tab_background_text": TEXT_COLOR_1, }, }; const theme2 = { "images": { - "headerURL": "image2.png", + "theme_frame": "image2.png", }, "colors": { - "accentcolor": ACCENT_COLOR_2, - "textcolor": TEXT_COLOR_2, + "frame": ACCENT_COLOR_2, + "tab_background_text": TEXT_COLOR_2, }, }; @@ -61,26 +61,26 @@ add_task(async function test_get_current() { function testTheme1(returnedTheme) { browser.test.assertTrue( - returnedTheme.images.headerURL.includes("image1.png"), - "Theme 1 header URL should be applied"); + returnedTheme.images.theme_frame.includes("image1.png"), + "Theme 1 theme_frame image should be applied"); browser.test.assertEq( - ACCENT_COLOR_1, returnedTheme.colors.accentcolor, - "Theme 1 accent color should be applied"); + ACCENT_COLOR_1, returnedTheme.colors.frame, + "Theme 1 frame color should be applied"); browser.test.assertEq( - TEXT_COLOR_1, returnedTheme.colors.textcolor, - "Theme 1 text color should be applied"); + TEXT_COLOR_1, returnedTheme.colors.tab_background_text, + "Theme 1 tab_background_text color should be applied"); } function testTheme2(returnedTheme) { browser.test.assertTrue( - returnedTheme.images.headerURL.includes("image2.png"), - "Theme 2 header URL should be applied"); + returnedTheme.images.theme_frame.includes("image2.png"), + "Theme 2 theme_frame image should be applied"); browser.test.assertEq( - ACCENT_COLOR_2, returnedTheme.colors.accentcolor, - "Theme 2 accent color should be applied"); + ACCENT_COLOR_2, returnedTheme.colors.frame, + "Theme 2 frame color should be applied"); browser.test.assertEq( - TEXT_COLOR_2, returnedTheme.colors.textcolor, - "Theme 2 text color should be applied"); + TEXT_COLOR_2, returnedTheme.colors.tab_background_text, + "Theme 2 tab_background_text color should be applied"); } function testEmptyTheme(returnedTheme) { diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_onUpdated.js b/toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_onUpdated.js index f7748a8a2f8d..ab8ea5a15c22 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_onUpdated.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_onUpdated.js @@ -19,46 +19,46 @@ add_task(async function test_on_updated() { const theme1 = { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR_1, - "textcolor": TEXT_COLOR_1, + "frame": ACCENT_COLOR_1, + "tab_background_text": TEXT_COLOR_1, }, }; const theme2 = { "images": { - "headerURL": "image2.png", + "theme_frame": "image2.png", }, "colors": { - "accentcolor": ACCENT_COLOR_2, - "textcolor": TEXT_COLOR_2, + "frame": ACCENT_COLOR_2, + "tab_background_text": TEXT_COLOR_2, }, }; function testTheme1(returnedTheme) { browser.test.assertTrue( - returnedTheme.images.headerURL.includes("image1.png"), - "Theme 1 header URL should be applied"); + returnedTheme.images.theme_frame.includes("image1.png"), + "Theme 1 theme_frame image should be applied"); browser.test.assertEq( - ACCENT_COLOR_1, returnedTheme.colors.accentcolor, - "Theme 1 accent color should be applied"); + ACCENT_COLOR_1, returnedTheme.colors.frame, + "Theme 1 frame color should be applied"); browser.test.assertEq( - TEXT_COLOR_1, returnedTheme.colors.textcolor, - "Theme 1 text color should be applied"); + TEXT_COLOR_1, returnedTheme.colors.tab_background_text, + "Theme 1 tab_background_text color should be applied"); } function testTheme2(returnedTheme) { browser.test.assertTrue( - returnedTheme.images.headerURL.includes("image2.png"), - "Theme 2 header URL should be applied"); + returnedTheme.images.theme_frame.includes("image2.png"), + "Theme 2 theme_frame image should be applied"); browser.test.assertEq( - ACCENT_COLOR_2, returnedTheme.colors.accentcolor, - "Theme 2 accent color should be applied"); + ACCENT_COLOR_2, returnedTheme.colors.frame, + "Theme 2 frame color should be applied"); browser.test.assertEq( - TEXT_COLOR_2, returnedTheme.colors.textcolor, - "Theme 2 text color should be applied"); + TEXT_COLOR_2, returnedTheme.colors.tab_background_text, + "Theme 2 tab_background_text color should be applied"); } const firstWin = await browser.windows.getCurrent(); diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_updates.js b/toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_updates.js index d0038f950ab1..47bfe9f532dd 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_updates.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_updates.js @@ -65,11 +65,11 @@ add_task(async function test_dynamic_theme_updates() { extension.sendMessage("update-theme", { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR_1, - "textcolor": TEXT_COLOR_1, + "frame": ACCENT_COLOR_1, + "tab_background_text": TEXT_COLOR_1, }, }); @@ -77,13 +77,15 @@ add_task(async function test_dynamic_theme_updates() { validateTheme("image1.png", ACCENT_COLOR_1, TEXT_COLOR_1, true); + // Check with the LWT aliases (to update on Firefox 69, because the + // LWT aliases are going to be removed). extension.sendMessage("update-theme", { "images": { - "headerURL": "image2.png", + "theme_frame": "image2.png", }, "colors": { - "accentcolor": ACCENT_COLOR_2, - "textcolor": TEXT_COLOR_2, + "frame": ACCENT_COLOR_2, + "tab_background_text": TEXT_COLOR_2, }, }); @@ -129,11 +131,11 @@ add_task(async function test_dynamic_theme_updates_with_data_url() { extension.sendMessage("update-theme", { "images": { - "headerURL": BACKGROUND_1, + "theme_frame": BACKGROUND_1, }, "colors": { - "accentcolor": ACCENT_COLOR_1, - "textcolor": TEXT_COLOR_1, + "frame": ACCENT_COLOR_1, + "tab_background_text": TEXT_COLOR_1, }, }); @@ -143,11 +145,11 @@ add_task(async function test_dynamic_theme_updates_with_data_url() { extension.sendMessage("update-theme", { "images": { - "headerURL": BACKGROUND_2, + "theme_frame": BACKGROUND_2, }, "colors": { - "accentcolor": ACCENT_COLOR_2, - "textcolor": TEXT_COLOR_2, + "frame": ACCENT_COLOR_2, + "tab_background_text": TEXT_COLOR_2, }, }); diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_findbar.js b/toolkit/components/extensions/test/browser/browser_ext_themes_findbar.js index a93726852cd2..eb6f41587b59 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_findbar.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_findbar.js @@ -10,13 +10,13 @@ add_task(async function test_support_toolbar_properties_on_findbar() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "toolbar": TOOLBAR_COLOR, - "toolbar_text": TOOLBAR_TEXT_COLOR, + "bookmark_text": TOOLBAR_TEXT_COLOR, }, }, }, @@ -54,11 +54,11 @@ add_task(async function test_support_toolbar_field_properties_on_findbar() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "toolbar_field": TOOLBAR_FIELD_COLOR, "toolbar_field_text": TOOLBAR_FIELD_TEXT_COLOR, "toolbar_field_border": TOOLBAR_FIELD_BORDER_COLOR, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_getCurrent_differentExt.js b/toolkit/components/extensions/test/browser/browser_ext_themes_getCurrent_differentExt.js index d83cd33cbf25..e93aa872780b 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_getCurrent_differentExt.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_getCurrent_differentExt.js @@ -8,11 +8,11 @@ add_task(async function test_getcurrent() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, }, }, }, @@ -37,12 +37,12 @@ add_task(async function test_getcurrent() { let updatedPromise = extension.awaitMessage("theme-updated"); await theme.startup(); let receivedTheme = await updatedPromise; - Assert.ok(receivedTheme.images.headerURL.includes("image1.png"), - "getCurrent returns correct headerURL"); - Assert.equal(receivedTheme.colors.accentcolor, ACCENT_COLOR, - "getCurrent returns correct accentcolor"); - Assert.equal(receivedTheme.colors.textcolor, TEXT_COLOR, - "getCurrent returns correct textcolor"); + Assert.ok(receivedTheme.images.theme_frame.includes("image1.png"), + "getCurrent returns correct theme_frame image"); + Assert.equal(receivedTheme.colors.frame, ACCENT_COLOR, + "getCurrent returns correct frame color"); + Assert.equal(receivedTheme.colors.tab_background_text, TEXT_COLOR, + "getCurrent returns correct tab_background_text color"); info("Testing getCurrent after static theme unload"); updatedPromise = extension.awaitMessage("theme-updated"); diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_multiple_backgrounds.js b/toolkit/components/extensions/test/browser/browser_ext_themes_multiple_backgrounds.js index a466fb97f479..783486089cc2 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_multiple_backgrounds.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_multiple_backgrounds.js @@ -5,12 +5,12 @@ add_task(async function test_support_backgrounds_position() { manifest: { "theme": { "images": { - "headerURL": "face1.png", + "theme_frame": "face1.png", "additional_backgrounds": ["face2.png", "face2.png", "face2.png"], }, "colors": { - "accentcolor": `rgb(${FRAME_COLOR.join(",")})`, - "textcolor": `rgb(${TAB_BACKGROUND_TEXT_COLOR.join(",")})`, + "frame": `rgb(${FRAME_COLOR.join(",")})`, + "tab_background_text": `rgb(${TAB_BACKGROUND_TEXT_COLOR.join(",")})`, }, "properties": { "additional_backgrounds_alignment": ["left top", "center top", "right bottom"], diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors.js b/toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors.js index 387466a25837..d44027d6c9cd 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors.js @@ -87,8 +87,8 @@ add_task(async function test_support_ntp_colors() { await BrowserTestUtils.withNewTab({gBrowser, url}, async browser => { await test_ntp_theme({ colors: { - accentcolor: ACCENT_COLOR, - textcolor: TEXT_COLOR, + frame: ACCENT_COLOR, + tab_background_text: TEXT_COLOR, ntp_background: "#add8e6", ntp_text: "#00008b", }, @@ -96,8 +96,8 @@ add_task(async function test_support_ntp_colors() { await test_ntp_theme({ colors: { - accentcolor: ACCENT_COLOR, - textcolor: TEXT_COLOR, + frame: ACCENT_COLOR, + tab_background_text: TEXT_COLOR, ntp_background: "#00008b", ntp_text: "#add8e6", }, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors_perwindow.js b/toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors_perwindow.js index cf8785093807..319265d5fe55 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors_perwindow.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors_perwindow.js @@ -103,8 +103,8 @@ add_task(async function test_per_window_ntp_theme() { const darkTextTheme = { colors: { - accentcolor: "#add8e6", - textcolor: "#000", + frame: "#add8e6", + tab_background_text: "#000", ntp_background: "#add8e6", ntp_text: "#000", }, @@ -112,8 +112,8 @@ add_task(async function test_per_window_ntp_theme() { const brightTextTheme = { colors: { - accentcolor: "#00008b", - textcolor: "#add8e6", + frame: "#00008b", + tab_background_text: "#add8e6", ntp_background: "#00008b", ntp_text: "#add8e6", }, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_persistence.js b/toolkit/components/extensions/test/browser/browser_ext_themes_persistence.js index 1cf823a983ff..3a427e34f338 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_persistence.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_persistence.js @@ -8,11 +8,11 @@ add_task(async function test_multiple_windows() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, }, }, }, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_sanitization.js b/toolkit/components/extensions/test/browser/browser_ext_themes_sanitization.js index b664c06ba65e..505bdd4e4be3 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_sanitization.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_sanitization.js @@ -8,9 +8,9 @@ add_task(async function test_sanitization_invalid() { manifest: { "theme": { "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, - "toolbar_text": "ntimsfavoriteblue", + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, + "bookmark_text": "ntimsfavoriteblue", }, }, }, @@ -34,9 +34,9 @@ add_task(async function test_sanitization_css_variables() { manifest: { "theme": { "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, - "toolbar_text": "var(--arrowpanel-dimmed)", + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, + "bookmark_text": "var(--arrowpanel-dimmed)", }, }, }, @@ -60,8 +60,8 @@ add_task(async function test_sanitization_transparent() { manifest: { "theme": { "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "toolbar_top_separator": "transparent", }, }, @@ -79,14 +79,14 @@ add_task(async function test_sanitization_transparent() { await extension.unload(); }); -add_task(async function test_sanitization_transparent_accentcolor() { - // This test checks whether transparent accentcolor falls back to white. +add_task(async function test_sanitization_transparent_frame_color() { + // This test checks whether transparent frame color falls back to white. let extension = ExtensionTestUtils.loadExtension({ manifest: { "theme": { "colors": { - "accentcolor": "transparent", - "textcolor": TEXT_COLOR, + "frame": "transparent", + "tab_background_text": TEXT_COLOR, }, }, }, @@ -104,14 +104,14 @@ add_task(async function test_sanitization_transparent_accentcolor() { await extension.unload(); }); -add_task(async function test_sanitization_transparent_textcolor() { +add_task(async function test_sanitization_transparent_tab_background_text_color() { // This test checks whether transparent textcolor falls back to black. let extension = ExtensionTestUtils.loadExtension({ manifest: { "theme": { "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": "transparent", + "frame": ACCENT_COLOR, + "tab_background_text": "transparent", }, }, }, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_separators.js b/toolkit/components/extensions/test/browser/browser_ext_themes_separators.js index 1d417ba638b9..ab61ca1f23d8 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_separators.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_separators.js @@ -13,11 +13,11 @@ add_task(async function test_support_separator_properties() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "toolbar_top_separator": SEPARATOR_TOP_COLOR, "toolbar_vertical_separator": SEPARATOR_VERTICAL_COLOR, "toolbar_field_separator": SEPARATOR_FIELD_COLOR, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_static_onUpdated.js b/toolkit/components/extensions/test/browser/browser_ext_themes_static_onUpdated.js index c2dab27b4446..d0bddb2b94bd 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_static_onUpdated.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_static_onUpdated.js @@ -8,11 +8,11 @@ add_task(async function test_on_updated() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, }, }, }, @@ -36,12 +36,12 @@ add_task(async function test_on_updated() { await theme.startup(); const {theme: receivedTheme, windowId} = await updatedPromise; Assert.ok(!windowId, "No window id in static theme update event"); - Assert.ok(receivedTheme.images.headerURL.includes("image1.png"), - "Theme header URL should be applied"); - Assert.equal(receivedTheme.colors.accentcolor, ACCENT_COLOR, - "Theme accent color should be applied"); - Assert.equal(receivedTheme.colors.textcolor, TEXT_COLOR, - "Theme text color should be applied"); + Assert.ok(receivedTheme.images.theme_frame.includes("image1.png"), + "Theme theme_frame image should be applied"); + Assert.equal(receivedTheme.colors.frame, ACCENT_COLOR, + "Theme frame color should be applied"); + Assert.equal(receivedTheme.colors.tab_background_text, TEXT_COLOR, + "Theme tab_background_text color should be applied"); info("Testing update event on static theme unload"); updatedPromise = extension.awaitMessage("theme-updated"); diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_tab_line.js b/toolkit/components/extensions/test/browser/browser_ext_themes_tab_line.js index aea837c12b0a..432773043450 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_tab_line.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_tab_line.js @@ -9,8 +9,8 @@ add_task(async function test_support_tab_line() { manifest: { "theme": { "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "tab_line": TAB_LINE_COLOR, }, }, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_tab_loading.js b/toolkit/components/extensions/test/browser/browser_ext_themes_tab_loading.js index 6864cc28e5ad..a094aa70a47f 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_tab_loading.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_tab_loading.js @@ -8,12 +8,12 @@ add_task(async function test_support_tab_loading_filling() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": "#000", + "frame": "#000", "toolbar": "#124455", - "textcolor": TAB_TEXT_COLOR, + "tab_background_text": TAB_TEXT_COLOR, "tab_loading": TAB_LOADING_COLOR, }, }, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_tab_selected.js b/toolkit/components/extensions/test/browser/browser_ext_themes_tab_selected.js index fa0b4c88d199..cf89fa834e4e 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_tab_selected.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_tab_selected.js @@ -9,8 +9,8 @@ add_task(async function test_tab_background_color_property() { manifest: { "theme": { "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "tab_selected": TAB_BACKGROUND_COLOR, }, }, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_tab_separators.js b/toolkit/components/extensions/test/browser/browser_ext_themes_tab_separators.js index cbe2eb0744aa..5fb628f8151b 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_tab_separators.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_tab_separators.js @@ -7,8 +7,8 @@ add_task(async function test_support_tab_separators() { manifest: { "theme": { "colors": { - "accentcolor": "#000", - "textcolor": "#9400ff", + "frame": "#000", + "tab_background_text": "#9400ff", "tab_background_separator": TAB_SEPARATOR_COLOR, }, }, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_tab_text.js b/toolkit/components/extensions/test/browser/browser_ext_themes_tab_text.js index bd1591775861..356b653599ee 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_tab_text.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_tab_text.js @@ -9,11 +9,11 @@ add_task(async function test_support_tab_text_property_css_color() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "tab_text": TAB_TEXT_COLOR, }, }, @@ -40,11 +40,11 @@ add_task(async function test_support_tab_text_chrome_array() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": FRAME_COLOR, - "textcolor": TAB_BACKGROUND_TEXT_COLOR, + "frame": FRAME_COLOR, + "tab_background_text": TAB_BACKGROUND_TEXT_COLOR, "tab_text": TAB_TEXT_COLOR, }, }, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_theme_transition.js b/toolkit/components/extensions/test/browser/browser_ext_themes_theme_transition.js index 92f1df6ab4ab..f47d5edd65d0 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_theme_transition.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_theme_transition.js @@ -12,9 +12,9 @@ add_task(async function test_theme_transition_effects() { manifest: { "theme": { "colors": { - "textcolor": TEXT_COLOR, + "tab_background_text": TEXT_COLOR, "toolbar": TOOLBAR, - "toolbar_text": TEXT_COLOR, + "bookmark_text": TEXT_COLOR, }, }, }, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_toolbar_fields.js b/toolkit/components/extensions/test/browser/browser_ext_themes_toolbar_fields.js index 2fa61c8ab485..2a076bab4cb8 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_toolbar_fields.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_toolbar_fields.js @@ -23,11 +23,11 @@ add_task(async function test_support_toolbar_field_properties() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "toolbar_field": TOOLBAR_FIELD_BACKGROUND, "toolbar_field_text": TOOLBAR_FIELD_COLOR, "toolbar_field_border": TOOLBAR_FIELD_BORDER, @@ -88,8 +88,8 @@ add_task(async function test_support_toolbar_field_brighttext() { manifest: { "theme": { "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "toolbar_field": "#fff", "toolbar_field_text": "#000", }, @@ -110,8 +110,8 @@ add_task(async function test_support_toolbar_field_brighttext() { manifest: { "theme": { "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "toolbar_field": "#000", "toolbar_field_text": "#fff", }, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_toolbar_fields_focus.js b/toolkit/components/extensions/test/browser/browser_ext_themes_toolbar_fields_focus.js index f6c76c0d2a96..f777a25e6380 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_toolbar_fields_focus.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_toolbar_fields_focus.js @@ -11,8 +11,8 @@ add_task(async function test_toolbar_field_hover() { manifest: { "theme": { "colors": { - "accentcolor": "#FF0000", - "textcolor": "#ffffff", + "frame": "#FF0000", + "tab_background_color": "#ffffff", "toolbar_field": TOOLBAR_FIELD_BACKGROUND, "toolbar_field_text": TOOLBAR_FIELD_COLOR, "toolbar_field_focus": TOOLBAR_FOCUS_BACKGROUND, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_toolbarbutton_colors.js b/toolkit/components/extensions/test/browser/browser_ext_themes_toolbarbutton_colors.js index 949bb960a764..a599cc8ec701 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_toolbarbutton_colors.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_toolbarbutton_colors.js @@ -13,11 +13,11 @@ add_task(async function test_button_background_properties() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "button_background_active": BUTTON_BACKGROUND_ACTIVE, "button_background_hover": BUTTON_BACKGROUND_HOVER, }, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_toolbarbutton_icons.js b/toolkit/components/extensions/test/browser/browser_ext_themes_toolbarbutton_icons.js index f0ee84735f5e..250a19445128 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_toolbarbutton_icons.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_toolbarbutton_icons.js @@ -11,11 +11,11 @@ add_task(async function test_icons_properties() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "icons": ICONS_COLOR, "icons_attention": ICONS_ATTENTION_COLOR, }, @@ -60,11 +60,11 @@ add_task(async function test_no_icons_properties() { manifest: { "theme": { "images": { - "headerURL": "image1.png", + "theme_frame": "image1.png", }, "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, }, }, }, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_toolbars.js b/toolkit/components/extensions/test/browser/browser_ext_themes_toolbars.js index e307c5dcadda..ee2392a9c573 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_toolbars.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_toolbars.js @@ -10,9 +10,11 @@ add_task(async function test_support_toolbar_property() { manifest: { "theme": { "colors": { - "accentcolor": ACCENT_COLOR, - "textcolor": TEXT_COLOR, + "frame": ACCENT_COLOR, + "tab_background_text": TEXT_COLOR, "toolbar": TOOLBAR_COLOR, + // NOTE: this property is going to be removed on Firefox 69 + // (and bookmark_text is going to replace it). "toolbar_text": TOOLBAR_TEXT_COLOR, }, },