From f08967fc9144ac71db7004e86fd5f8fdf91a817a Mon Sep 17 00:00:00 2001 From: "Owen Carpenter ext:(%3B%20Devan%20Sayles%20%3Cdevan.sayles%40gmail.com%3E%3B%20Joe%20Chen%20%3Cjoejoevictor%40gmail.com%3E%3B%20Jon%20Rietveld%20%3Cjonrietveld%40gmail.com%3E)" Date: Wed, 25 Jan 2012 17:19:14 -0800 Subject: [PATCH] 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 | 1 + .../content/test/browser_disablechrome.js | 28 +++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 060a2ba4c290..4ce9bedf0dfa 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -4793,6 +4793,7 @@ var XULBrowserWindow = { }, hideChromeForLocation: function(aLocation) { + aLocation = aLocation.toLowerCase(); return this.inContentWhitelist.some(function(aSpec) { return aSpec == aLocation; }); diff --git a/browser/base/content/test/browser_disablechrome.js b/browser/base/content/test/browser_disablechrome.js index f29793582588..98471b2bf2be 100644 --- a/browser/base/content/test/browser_disablechrome.js +++ b/browser/base/content/test/browser_disablechrome.js @@ -104,7 +104,6 @@ function end_test() { function test_url(aURL, aCanHide, aNextTest) { is_chrome_visible(); - info("Page load"); load_page(aURL, aCanHide, function() { info("Switch away"); @@ -163,5 +162,30 @@ function run_http_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); }