Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Issue 7890029: Revert 101046 - Redirect chrome://extensions to the new chrome://settings/chromeExtensions. (Closed)

Created:
9 years, 3 months ago by Jói
Modified:
9 years, 3 months ago
Reviewers:
Finnur
CC:
chromium-reviews, Aaron Boodman, Erik does not do reviews, mihaip+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=101064

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -13 lines) Patch
M chrome/browser/browser_about_handler.cc View 1 chunk +3 lines, -12 lines 0 comments Download
M chrome/browser/extensions/browser_action_apitest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_management_browsertest.cc View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Jói
9 years, 3 months ago (2011-09-14 12:16:18 UTC) #1
Finnur
9 years, 3 months ago (2011-09-14 15:15:32 UTC) #2
LGTM. Thanks.

On Wed, Sep 14, 2011 at 12:16, <joi@chromium.org> wrote:

> Reviewers: Finnur,
>
> Description:
> 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<http://codereview.chromium.org/7888010>
>
> TBR=finnur@chromium.org
>
> Please review this at
http://codereview.chromium.**org/7890029/<http://codereview.chromium.org/7890...
>
> SVN Base:
svn://svn.chromium.org/chrome/**trunk/src/<http://svn.chromium.org/chrome/trunk/src/>
>
> Affected files:
>  M     chrome/browser/browser_about_**handler.cc
>  M     chrome/browser/extensions/**browser_action_apitest.cc
>  M     chrome/browser/extensions/**extension_management_**browsertest.cc
>
>
> Index: chrome/browser/browser_about_**handler.cc
> ==============================**==============================**=======
> --- chrome/browser/browser_about_**handler.cc     (revision 101063)
> +++ chrome/browser/browser_about_**handler.cc     (working copy)
> @@ -1495,29 +1495,20 @@
>     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.
> Index: chrome/browser/extensions/**browser_action_apitest.cc
> ==============================**==============================**=======
> --- chrome/browser/extensions/**browser_action_apitest.cc (revision
> 101063)
> +++ chrome/browser/extensions/**browser_action_apitest.cc (working copy)
> @@ -341,7 +341,8 @@
>   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());
>
> Index: chrome/browser/extensions/**extension_management_**browsertest.cc
> ==============================**==============================**=======
> --- chrome/browser/extensions/**extension_management_**browsertest.cc
>   (revision 101063)
> +++ chrome/browser/extensions/**extension_management_**browsertest.cc
>   (working copy)
> @@ -145,6 +145,20 @@
>   UninstallExtension("**ldnnhddmnhbkjipkidpdiheffobcpf**mf");
>  }
>
> +// 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(**InstallExtensionWithUIAutoConf**irm(
> +      test_data_dir_.AppendASCII("**good.crx"), 1,
> browser()->profile()));
> +  UninstallExtension("**ldnnhddmnhbkjipkidpdiheffobcpf**mf");
> +}
> +
>  // Tests the process of updating an extension to one that requires higher
>  // permissions.
>  IN_PROC_BROWSER_TEST_F(**ExtensionManagementTest, UpdatePermissions) {
>
>
>

Powered by Google App Engine
This is Rietveld 408576698