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

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

Issue 10854009: Extension white and force lists (set by policy) should have priority over auto-updated Google black… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Refactored Created 8 years, 4 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
Index: chrome/browser/extensions/extension_prefs_unittest.cc
diff --git a/chrome/browser/extensions/extension_prefs_unittest.cc b/chrome/browser/extensions/extension_prefs_unittest.cc
index f240488501f487fe907ddf68ac9a32003aa368b0..3694638376e26f5fc3c1a2c03f4442e4254ee1c7 100644
--- a/chrome/browser/extensions/extension_prefs_unittest.cc
+++ b/chrome/browser/extensions/extension_prefs_unittest.cc
@@ -479,7 +479,7 @@ class ExtensionPrefsBlacklist : public ExtensionPrefsTest {
ExtensionList::const_iterator iter;
for (iter = extensions_.begin(); iter != extensions_.end(); ++iter) {
- EXPECT_FALSE(prefs()->IsExtensionBlacklisted((*iter)->id()));
+ EXPECT_TRUE(prefs()->UserMayLoad(*iter, NULL));
}
// Blacklist one installed and one not-installed extension id.
std::set<std::string> blacklisted_ids;
@@ -489,15 +489,13 @@ class ExtensionPrefsBlacklist : public ExtensionPrefsTest {
}
virtual void Verify() {
- // Make sure the two id's we expect to be blacklisted are.
- EXPECT_TRUE(prefs()->IsExtensionBlacklisted(extensions_[0]->id()));
- EXPECT_TRUE(prefs()->IsExtensionBlacklisted(not_installed_id_));
+ // Make sure the id we expect to be blacklisted is.
+ EXPECT_FALSE(prefs()->UserMayLoad(extensions_[0], NULL));
// Make sure the other id's are not blacklisted.
ExtensionList::const_iterator iter;
- for (iter = extensions_.begin() + 1; iter != extensions_.end(); ++iter) {
- EXPECT_FALSE(prefs()->IsExtensionBlacklisted((*iter)->id()));
- }
+ for (iter = extensions_.begin() + 1; iter != extensions_.end(); ++iter)
+ EXPECT_TRUE(prefs()->UserMayLoad(*iter, NULL));
// Make sure GetInstalledExtensionsInfo returns only the non-blacklisted
// extensions data.

Powered by Google App Engine
This is Rietveld 408576698