diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-14 12:16:22 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-14 12:16:22 +0000 |
commit | 73aa4dbbd8e1075d42b286892a117d0421c027ab (patch) | |
tree | 841846648ef0fa03738389b9d8db9242442c20bf | |
parent | 961695e13deeb7e8a9cde6dec08e145cda98f2d0 (diff) | |
download | chromium_src-73aa4dbbd8e1075d42b286892a117d0421c027ab.zip chromium_src-73aa4dbbd8e1075d42b286892a117d0421c027ab.tar.gz chromium_src-73aa4dbbd8e1075d42b286892a117d0421c027ab.tar.bz2 |
Revert 101046 - Redirect chrome://extensions to the new chrome://settings/chromeExtensions.
The two modifications to the tests were needed because they were trying to
open chrome://extensions in incognito.
In one case, the test just needed any page (so I switched to about:blank)
and in the other we are testing for a condition that cannot happen anymore
because chrome://extensions could be loaded in incognito but chrome://settings
doesn't allow that -- it shunts the request to the non-incognito profile.
The test was testing that we don't crash in incognito, so I removed that test.
BUG=87377
TEST=Well... type in chrome://extensions and notice it redirects.
Review URL: http://codereview.chromium.org/7888010
TBR=finnur@chromium.org
Review URL: http://codereview.chromium.org/7890029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101064 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser_about_handler.cc | 15 | ||||
-rw-r--r-- | chrome/browser/extensions/browser_action_apitest.cc | 3 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_management_browsertest.cc | 14 |
3 files changed, 19 insertions, 13 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index 8bde79e..a76bf59 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -1495,29 +1495,20 @@ bool WillHandleBrowserAboutURL(GURL* url, return false; std::string host(url->host()); - std::string path; // Replace about with chrome-urls. if (host == chrome::kChromeUIAboutHost) host = chrome::kChromeUIChromeURLsHost; // Replace cache with view-http-cache. - if (host == chrome::kChromeUICacheHost) { + if (host == chrome::kChromeUICacheHost) host = chrome::kChromeUINetworkViewCacheHost; // Replace gpu with gpu-internals. - } else if (host == chrome::kChromeUIGpuHost) { + else if (host == chrome::kChromeUIGpuHost) host = chrome::kChromeUIGpuInternalsHost; // Replace sync with sync-internals (for legacy reasons). - } else if (host == chrome::kChromeUISyncHost) { + else if (host == chrome::kChromeUISyncHost) host = chrome::kChromeUISyncInternalsHost; - // Redirect chrome://extensions to chrome://settings/extensionSettings. - } else if (host == chrome::kChromeUIExtensionsHost) { - host = chrome::kChromeUISettingsHost; - path = chrome::kExtensionsSubPage; - } - GURL::Replacements replacements; replacements.SetHostStr(host); - if (!path.empty()) - replacements.SetPathStr(path); *url = url->ReplaceComponents(replacements); // Handle URLs to crash the browser or wreck the gpu process. diff --git a/chrome/browser/extensions/browser_action_apitest.cc b/chrome/browser/extensions/browser_action_apitest.cc index 4f0043b..cb1007e 100644 --- a/chrome/browser/extensions/browser_action_apitest.cc +++ b/chrome/browser/extensions/browser_action_apitest.cc @@ -341,7 +341,8 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, IncognitoDragging) { BrowserActionTestUtil incognito_bar(incognito_browser); // Navigate just to have a tab in this window, otherwise wonky things happen. - ui_test_utils::OpenURLOffTheRecord(browser()->profile(), GURL("about:blank")); + ui_test_utils::OpenURLOffTheRecord(browser()->profile(), + GURL(chrome::kChromeUIExtensionsURL)); ASSERT_EQ(2, incognito_bar.NumberOfBrowserActions()); diff --git a/chrome/browser/extensions/extension_management_browsertest.cc b/chrome/browser/extensions/extension_management_browsertest.cc index 3119ab0..dd5357b 100644 --- a/chrome/browser/extensions/extension_management_browsertest.cc +++ b/chrome/browser/extensions/extension_management_browsertest.cc @@ -145,6 +145,20 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, InstallRequiresConfirm) { UninstallExtension("ldnnhddmnhbkjipkidpdiheffobcpfmf"); } +// Tests that installing and uninstalling extensions don't crash with an +// incognito window open. +IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, Incognito) { + // Open an incognito window to the extensions management page. We just + // want to make sure that we don't crash while playing with extensions when + // this guy is around. + ui_test_utils::OpenURLOffTheRecord(browser()->profile(), + GURL(chrome::kChromeUIExtensionsURL)); + + ASSERT_TRUE(InstallExtensionWithUIAutoConfirm( + test_data_dir_.AppendASCII("good.crx"), 1, browser()->profile())); + UninstallExtension("ldnnhddmnhbkjipkidpdiheffobcpfmf"); +} + // Tests the process of updating an extension to one that requires higher // permissions. IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, UpdatePermissions) { |