Bug 1390359 - Replace faded out (i) icon with a search icon when the location bar is empty or modified. r?adw draft
authorDão Gottwald <dao@mozilla.com>
Thu, 24 Aug 2017 09:30:39 +0200
changeset 651932 0ccdc6fa2fe1c7aa421b2a589a91939d4a708044
parent 651826 d1c70c20e7b52f7295411343e4dc5db8ee7c92b9
child 727925 3c7a82cafe99b91fd2e10a67bd6c6e64a2b6b10d
push id75879
push userdgottwald@mozilla.com
push dateThu, 24 Aug 2017 07:31:09 +0000
reviewersadw
bugs1390359
milestone57.0a1
Bug 1390359 - Replace faded out (i) icon with a search icon when the location bar is empty or modified. r?adw MozReview-Commit-ID: 8Q6MeB1XuyD
browser/components/extensions/test/browser/browser_ext_identity_indication.js
browser/themes/shared/identity-block/identity-block.inc.css
testing/marionette/harness/marionette_harness/tests/unit/test_chrome_element_css.py
--- a/browser/components/extensions/test/browser/browser_ext_identity_indication.js
+++ b/browser/components/extensions/test/browser/browser_ext_identity_indication.js
@@ -1,15 +1,15 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
 function confirmDefaults() {
   let identityIconURL = getComputedStyle(document.getElementById("identity-icon")).listStyleImage;
-  is(identityIconURL, "url(\"chrome://browser/skin/identity-icon.svg\")", "Identity icon should be the default identity icon");
+  is(identityIconURL, "url(\"chrome://global/skin/icons/autocomplete-search.svg\")", "Identity icon should be the search icon");
 
   let connectionIconURL = getComputedStyle(document.getElementById("connection-icon")).listStyleImage;
   is(connectionIconURL, "none", "Connection icon should not be displayed");
 
   let extensionIconURL = getComputedStyle(document.getElementById("extension-icon")).listStyleImage;
   is(extensionIconURL, "none", "Extension icon should not be displayed");
 
   let label = document.getElementById("identity-icon-label").value;
--- a/browser/themes/shared/identity-block/identity-block.inc.css
+++ b/browser/themes/shared/identity-block/identity-block.inc.css
@@ -93,25 +93,24 @@
 #identity-icon {
   margin-inline-start: 0;
   list-style-image: url(chrome://browser/skin/identity-icon.svg);
 }
 
 #identity-box.grantedPermissions > #identity-icon {
   list-style-image: url(chrome://browser/skin/identity-icon-notice.svg);
 }
+
 #urlbar[pageproxystate="valid"] > #identity-box.chromeUI > #identity-icon {
   list-style-image: url(chrome://branding/content/identity-icons-brand.svg);
 }
+
 #urlbar[pageproxystate="invalid"] > #identity-box > #identity-icon {
-  fill-opacity: .3;
-}
-
-#urlbar[actiontype="searchengine"] > #identity-box > #identity-icon {
   list-style-image: url(chrome://global/skin/icons/autocomplete-search.svg);
+  fill-opacity: .4;
 }
 
 #urlbar[actiontype="extension"] > #identity-box > #identity-icon {
   list-style-image: url(chrome://mozapps/skin/extensions/extensionGeneric-16.svg);
 }
 
 /* SHARING ICON */
 
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_chrome_element_css.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_chrome_element_css.py
@@ -16,14 +16,14 @@ class TestChromeElementCSS(MarionetteTes
             return elStyle[prop];""",
             script_args=(element, property),
             sandbox=None)
 
     def test_we_can_get_css_value_on_chrome_element(self):
         with self.marionette.using_context("chrome"):
             identity_icon = self.marionette.find_element(By.ID, "identity-icon")
             favicon_image = identity_icon.value_of_css_property("list-style-image")
-            self.assertIn("identity-icon.svg", favicon_image)
+            self.assertIn("chrome://", favicon_image)
             identity_box = self.marionette.find_element(By.ID, "identity-box")
             expected_bg_colour = self.get_element_computed_style(
                 identity_box, "backgroundColor")
             actual_bg_colour = identity_box.value_of_css_property("background-color")
             self.assertEqual(expected_bg_colour, actual_bg_colour)