Bug 716464 - Typing about:Addons into the url bar loads the add-ons manager but doesn't hide the address bar (the test is case sensitive). r=bmcbride
authorOwen Carpenter <owenccarpenter@gmail.com>; Devan Sayles <devan.sayles@gmail.com>; Joe Chen <joejoevictor@gmail.com>; Jon Rietveld <jonrietveld@gmail.com>
Wed, 25 Jan 2012 17:19:14 -0800
changeset 86615 dca6fb65e46b4501e60ebce82b9cb6a34af9caff
parent 86614 74b125f29e23d0739f5e88ef3d454ad74847f73f
child 86616 402b394b66238c926edef76a349cdc633120d058
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbmcbride
bugs716464
milestone12.0a1
Bug 716464 - Typing about:Addons into the url bar loads the add-ons manager but doesn't hide the address bar (the test is case sensitive). r=bmcbride
browser/base/content/browser.js
browser/base/content/test/browser_disablechrome.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4788,16 +4788,17 @@ var XULBrowserWindow = {
       this.asyncUpdateUI();
   },
 
   asyncUpdateUI: function () {
     FeedHandler.updateFeeds();
   },
 
   hideChromeForLocation: function(aLocation) {
+    aLocation = aLocation.toLowerCase();
     return this.inContentWhitelist.some(function(aSpec) {
       return aSpec == aLocation;
     });
   },
 
   onStatusChange: function (aWebProgress, aRequest, aStatus, aMessage) {
     this.status = aMessage;
     this.updateStatusField();
--- a/browser/base/content/test/browser_disablechrome.js
+++ b/browser/base/content/test/browser_disablechrome.js
@@ -99,17 +99,16 @@ function test() {
 
 function end_test() {
   gBrowser.removeTab(gNewTab);
   finish();
 }
 
 function test_url(aURL, aCanHide, aNextTest) {
   is_chrome_visible();
-
   info("Page load");
   load_page(aURL, aCanHide, function() {
     info("Switch away");
     gBrowser.selectedTab = gOldTab;
     is_chrome_visible();
 
     info("Switch back");
     gBrowser.selectedTab = gNewTab;
@@ -158,10 +157,35 @@ function run_chrome_about_test() {
 function run_http_test_2() {
   info("HTTP tests");
   test_url(HTTPSRC + "disablechrome.html", false, run_chrome_about_test_2);
 }
 
 // Should not hide the chrome
 function run_chrome_about_test_2() {
   info("Chrome about: tests");
-  test_url("about:addons", true, end_test);
+  test_url("about:addons", true, run_http_test3);
+}
+
+function run_http_test3() {
+  info("HTTP tests");
+  test_url(HTTPSRC + "disablechrome.html", false, run_chrome_about_test_3);
 }
+
+// Should not hide the chrome
+function run_chrome_about_test_3() {
+  info("Chrome about: tests");
+  test_url("about:Addons", true, function(){
+    info("Tabs on top");
+    TabsOnTop.enabled = true;
+    run_http_test4();
+  });
+}
+
+function run_http_test4() {
+  info("HTTP tests");
+  test_url(HTTPSRC + "disablechrome.html", false, run_chrome_about_test_4);
+}
+
+function run_chrome_about_test_4() {
+  info("Chrome about: tests");
+  test_url("about:Addons", true, end_test);
+}