diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-06 21:50:16 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-06 21:50:16 +0000 |
commit | dad50522aa53b69d74b5a0301c375ff4cd8c170c (patch) | |
tree | e6ef58050121c35309b16b5db0457d9df05409f3 /chrome/browser/extensions/extension_disabled_ui_browsertest.cc | |
parent | 955f04406579b4c5ba3e9960149a8d9697bfb79a (diff) | |
download | chromium_src-dad50522aa53b69d74b5a0301c375ff4cd8c170c.zip chromium_src-dad50522aa53b69d74b5a0301c375ff4cd8c170c.tar.gz chromium_src-dad50522aa53b69d74b5a0301c375ff4cd8c170c.tar.bz2 |
Revert 171072
> Delay determination of why a synced disabled extension was disabled.
>
> Also simplify handling of legacy disabled extensions.
>
> BUG=162062
>
>
> Review URL: https://chromiumcodereview.appspot.com/11412239
TBR=yoz@chromium.org
Review URL: https://codereview.chromium.org/11476007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_disabled_ui_browsertest.cc')
-rw-r--r-- | chrome/browser/extensions/extension_disabled_ui_browsertest.cc | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc index 1f88dd9..f2fea19 100644 --- a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc +++ b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc @@ -5,30 +5,20 @@ #include "base/file_path.h" #include "base/files/scoped_temp_dir.h" #include "chrome/app/chrome_command_ids.h" -#include "chrome/browser/extensions/autoupdate_interceptor.h" #include "chrome/browser/extensions/extension_browsertest.h" #include "chrome/browser/extensions/extension_prefs.h" #include "chrome/browser/extensions/extension_service.h" -#include "chrome/browser/extensions/updater/extension_updater.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/global_error/global_error.h" #include "chrome/browser/ui/global_error/global_error_service.h" #include "chrome/browser/ui/global_error/global_error_service_factory.h" -#include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" -#include "net/url_request/url_fetcher.h" using extensions::Extension; class ExtensionDisabledGlobalErrorTest : public ExtensionBrowserTest { protected: - void SetUpCommandLine(CommandLine* command_line) { - ExtensionBrowserTest::SetUpCommandLine(command_line); - command_line->AppendSwitchASCII(switches::kAppsGalleryUpdateURL, - "http://localhost/autoupdate/updates.xml"); - } - void SetUpOnMainThread() { EXPECT_TRUE(scoped_temp_dir_.CreateUniqueTempDir()); service_ = browser()->profile()->GetExtensionService(); @@ -171,49 +161,3 @@ IN_PROC_BROWSER_TEST_F(ExtensionDisabledGlobalErrorTest, ASSERT_TRUE(extension); ASSERT_TRUE(GetExtensionDisabledGlobalError()); } - -// Test that an error appears if the extension gets disabled because a -// version with higher permissions was installed by sync. -IN_PROC_BROWSER_TEST_F(ExtensionDisabledGlobalErrorTest, - HigherPermissionsFromSync) { - // Get data for extension v2 (disabled) into sync. - const Extension* extension = InstallAndUpdateIncreasingPermissionsExtension(); - std::string extension_id = extension->id(); - // service_->GrantPermissionsAndEnableExtension(extension, false); - extensions::ExtensionSyncData sync_data = - service_->GetExtensionSyncData(*extension); - UninstallExtension(extension_id); - extension = NULL; - - // Install extension v1. - InstallIncreasingPermissionExtensionV1(); - - // Note: This interceptor gets requests on the IO thread. - scoped_refptr<extensions::AutoUpdateInterceptor> interceptor( - new extensions::AutoUpdateInterceptor()); - net::URLFetcher::SetEnableInterceptionForTests(true); - interceptor->SetResponseOnIOThread( - "http://localhost/autoupdate/updates.xml", - test_data_dir_.AppendASCII("permissions_increase") - .AppendASCII("updates.xml")); - interceptor->SetResponseOnIOThread( - "http://localhost/autoupdate/v2.crx", - scoped_temp_dir_.path().AppendASCII("permissions2.crx")); - - extensions::ExtensionUpdater::CheckParams params; - params.check_blacklist = false; - service_->updater()->set_default_check_params(params); - - // Sync is replacing an older version, so it pends. - EXPECT_FALSE(service_->ProcessExtensionSyncData(sync_data)); - - WaitForExtensionInstall(); - - extension = service_->GetExtensionById(extension_id, true); - ASSERT_TRUE(extension); - EXPECT_EQ("2", extension->VersionString()); - EXPECT_EQ(1u, service_->disabled_extensions()->size()); - EXPECT_EQ(Extension::DISABLE_PERMISSIONS_INCREASE, - service_->extension_prefs()->GetDisableReasons(extension_id)); - EXPECT_TRUE(GetExtensionDisabledGlobalError()); -} |