diff options
4 files changed, 20 insertions, 14 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) { diff --git a/chrome/test/data/extensions/api_test/notifications/has_permission_manifest/background.html b/chrome/test/data/extensions/api_test/notifications/has_permission_manifest/background.html index 2deb4ff..9f96f1b 100644 --- a/chrome/test/data/extensions/api_test/notifications/has_permission_manifest/background.html +++ b/chrome/test/data/extensions/api_test/notifications/has_permission_manifest/background.html @@ -1,6 +1,6 @@ <script> var notification = null; -var chromeExtensionsUrl = "chrome://settings/extensionSettings"; +var chromeExtensionsUrl = "chrome://extensions/"; // Shows the notification window using the specified URL. // Control continues at onNotificationDone(). |