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

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

Issue 2908513002: Include terminated extensions while retrieving extension version. (Closed)
Patch Set: add regression browser_test Created 3 years, 7 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 | « no previous file | chrome/test/data/extensions/api_test/runtime/update_terminated_extension/pem.pem » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service_unittest.cc
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index 89c0e9c537a90f3c91f423e6afc74ee817fab2e9..d89422cf7f26f8af5a5385c610f121bc054d293f 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -4314,6 +4314,18 @@ TEST_F(ExtensionServiceTest, DisableTerminatedExtension) {
EXPECT_EQ(0u, registry()->blacklisted_extensions().size());
}
+// Regression test for https://crbug.com/724563.
+TEST_F(ExtensionServiceTest, TerminatedExtensionStoredVersion) {
Devlin 2017/05/25 19:17:39 Could we actually move this to extension_registry_
+ InitializeEmptyExtensionService();
+ InstallCRX(data_dir().AppendASCII("good.crx"), INSTALL_NEW);
+ TerminateExtension(good_crx);
+ EXPECT_TRUE(registry()->GetExtensionById(
+ good_crx, extensions::ExtensionRegistry::TERMINATED));
+ base::Version version = registry()->GetStoredVersion(good_crx);
+ ASSERT_TRUE(version.IsValid());
+ EXPECT_EQ("1.0.0.0", version.GetString());
+}
+
// Tests that with the kDisableExtensions flag, extensions are not loaded by
// the ExtensionService...
TEST_F(ExtensionServiceTest, PRE_DisableAllExtensions) {
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/runtime/update_terminated_extension/pem.pem » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698