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

Unified Diff: chrome/browser/extensions/webstore_reinstaller_browsertest.cc

Issue 2801583003: developerPrivate.repair: Skip not-corrupted and policy extensions (Closed)
Patch Set: fix WebstoreReinsallerBrowserTest Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/webstore_reinstaller.cc ('k') | extensions/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/webstore_reinstaller_browsertest.cc
diff --git a/chrome/browser/extensions/webstore_reinstaller_browsertest.cc b/chrome/browser/extensions/webstore_reinstaller_browsertest.cc
index 4e59ce1c9e27fe30021e8b6a8eedc9819143c38d..b2dc009286d125e153277047f2916696c4040122 100644
--- a/chrome/browser/extensions/webstore_reinstaller_browsertest.cc
+++ b/chrome/browser/extensions/webstore_reinstaller_browsertest.cc
@@ -76,6 +76,10 @@ IN_PROC_BROWSER_TEST_F(WebstoreReinstallerBrowserTest, TestWebstoreReinstall) {
ExtensionRegistry* registry = ExtensionRegistry::Get(profile());
ASSERT_TRUE(registry->enabled_extensions().GetByID(kTestExtensionId));
+ // WebstoreReinstaller expects corrupted extension.
+ extension_service()->DisableExtension(kTestExtensionId,
+ Extension::DISABLE_CORRUPTED);
+
content::WebContents* active_web_contents =
browser()->tab_strip_model()->GetActiveWebContents();
ASSERT_TRUE(active_web_contents);
@@ -97,7 +101,7 @@ IN_PROC_BROWSER_TEST_F(WebstoreReinstallerBrowserTest, TestWebstoreReinstall) {
// We should have failed, and the old extension should still be present.
EXPECT_FALSE(last_install_result());
- extension = registry->enabled_extensions().GetByID(kTestExtensionId);
+ extension = registry->disabled_extensions().GetByID(kTestExtensionId);
ASSERT_TRUE(extension.get());
EXPECT_EQ(kExtensionName, extension->name());
« no previous file with comments | « chrome/browser/extensions/webstore_reinstaller.cc ('k') | extensions/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698