Bug 1546423 - Update browser_ext_themes_autocomplete_popup.js for QuantumBar. r=Standard8
authorDão Gottwald <dao@mozilla.com>
Wed, 24 Apr 2019 12:55:42 +0000
changeset 530024 bae1f74ffaa3ae350e31c91ceb234a201d681cfe
parent 530023 d128c93735ff7f0654895ab0a4d987552efee242
child 530025 3fa69313f15951fef2c5f285b9301345432f511d
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs1546423
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1546423 - Update browser_ext_themes_autocomplete_popup.js for QuantumBar. r=Standard8 Differential Revision: https://phabricator.services.mozilla.com/D28621
toolkit/components/extensions/test/browser/browser_ext_themes_autocomplete_popup.js
--- a/toolkit/components/extensions/test/browser/browser_ext_themes_autocomplete_popup.js
+++ b/toolkit/components/extensions/test/browser/browser_ext_themes_autocomplete_popup.js
@@ -1,14 +1,15 @@
 "use strict";
 
 // This test checks whether applied WebExtension themes that attempt to change
 // popup properties are applied correctly to the autocomplete bar.
 const POPUP_COLOR = "#85A400";
 const POPUP_BORDER_COLOR = "#220300";
+const CHROME_CONTENT_SEPARATOR_COLOR = "#220301";
 const POPUP_TEXT_COLOR_DARK = "#000000";
 const POPUP_TEXT_COLOR_BRIGHT = "#ffffff";
 const POPUP_SELECTED_COLOR = "#9400ff";
 const POPUP_SELECTED_TEXT_COLOR = "#09b9a6";
 
 const POPUP_URL_COLOR_DARK = "#1c78d4";
 const POPUP_ACTION_COLOR_DARK = "#008f8a";
 const POPUP_URL_COLOR_BRIGHT = "#45a1ff";
@@ -51,16 +52,17 @@ add_task(async function test_popup_url()
         "images": {
           "theme_frame": "image1.png",
         },
         "colors": {
           "frame": ACCENT_COLOR,
           "tab_background_text": TEXT_COLOR,
           "popup": POPUP_COLOR,
           "popup_border": POPUP_BORDER_COLOR,
+          "toolbar_bottom_separator": CHROME_CONTENT_SEPARATOR_COLOR,
           "popup_text": POPUP_TEXT_COLOR_DARK,
           "popup_highlight": POPUP_SELECTED_COLOR,
           "popup_highlight_text": POPUP_SELECTED_TEXT_COLOR,
         },
       },
     },
     files: {
       "image1.png": BACKGROUND,
@@ -97,17 +99,23 @@ add_task(async function test_popup_url()
 
   let popup = UrlbarTestUtils.getPanel(window);
   let popupCS = window.getComputedStyle(popup);
 
   Assert.equal(popupCS.backgroundColor,
                `rgb(${hexToRGB(POPUP_COLOR).join(", ")})`,
                `Popup background color should be set to ${POPUP_COLOR}`);
 
-  testBorderColor(popup, POPUP_BORDER_COLOR);
+  if (quantumbar) {
+    Assert.equal(popupCS.borderBottomColor,
+                 `rgb(${hexToRGB(CHROME_CONTENT_SEPARATOR_COLOR).join(", ")})`,
+                 `Popup bottom color should be set to ${CHROME_CONTENT_SEPARATOR_COLOR}`);
+  } else {
+    testBorderColor(popup, POPUP_BORDER_COLOR);
+  }
 
   Assert.equal(popupCS.color,
                `rgb(${hexToRGB(POPUP_TEXT_COLOR_DARK).join(", ")})`,
                `Popup color should be set to ${POPUP_TEXT_COLOR_DARK}`);
 
   // Set the selected attribute to true to test the highlight popup properties
   UrlbarTestUtils.setSelectedIndex(window, 1);
   let actionResult = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);