| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/extensions/extension_service_unittest.h" | 5 #include "chrome/browser/extensions/extension_service_unittest.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 3366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3377 // initialized. | 3377 // initialized. |
| 3378 TEST_F(ExtensionServiceTest, SetUnsetBlacklistInPrefs) { | 3378 TEST_F(ExtensionServiceTest, SetUnsetBlacklistInPrefs) { |
| 3379 scoped_refptr<FakeSafeBrowsingDatabaseManager> blacklist_db( | 3379 scoped_refptr<FakeSafeBrowsingDatabaseManager> blacklist_db( |
| 3380 new FakeSafeBrowsingDatabaseManager(true)); | 3380 new FakeSafeBrowsingDatabaseManager(true)); |
| 3381 Blacklist::ScopedDatabaseManagerForTest scoped_blacklist_db(blacklist_db); | 3381 Blacklist::ScopedDatabaseManagerForTest scoped_blacklist_db(blacklist_db); |
| 3382 | 3382 |
| 3383 // A profile with 3 extensions installed: good0, good1, and good2. | 3383 // A profile with 3 extensions installed: good0, good1, and good2. |
| 3384 InitializeGoodInstalledExtensionService(); | 3384 InitializeGoodInstalledExtensionService(); |
| 3385 service_->Init(); | 3385 service_->Init(); |
| 3386 | 3386 |
| 3387 const ExtensionSet* extensions = service_->extensions(); | 3387 const extensions::ExtensionSet* extensions = service_->extensions(); |
| 3388 const ExtensionSet* blacklisted_extensions = | 3388 const extensions::ExtensionSet* blacklisted_extensions = |
| 3389 service_->blacklisted_extensions(); | 3389 service_->blacklisted_extensions(); |
| 3390 | 3390 |
| 3391 EXPECT_TRUE( extensions->Contains(good0) && | 3391 EXPECT_TRUE( extensions->Contains(good0) && |
| 3392 !blacklisted_extensions->Contains(good0)); | 3392 !blacklisted_extensions->Contains(good0)); |
| 3393 EXPECT_TRUE( extensions->Contains(good1) && | 3393 EXPECT_TRUE( extensions->Contains(good1) && |
| 3394 !blacklisted_extensions->Contains(good1)); | 3394 !blacklisted_extensions->Contains(good1)); |
| 3395 EXPECT_TRUE( extensions->Contains(good2) && | 3395 EXPECT_TRUE( extensions->Contains(good2) && |
| 3396 !blacklisted_extensions->Contains(good2)); | 3396 !blacklisted_extensions->Contains(good2)); |
| 3397 | 3397 |
| 3398 EXPECT_FALSE(IsPrefExist(good0, "blacklist")); | 3398 EXPECT_FALSE(IsPrefExist(good0, "blacklist")); |
| (...skipping 3359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6758 service_->ReconcileKnownDisabled(); | 6758 service_->ReconcileKnownDisabled(); |
| 6759 expected_extensions.insert(good2); | 6759 expected_extensions.insert(good2); |
| 6760 expected_disabled_extensions.erase(good2); | 6760 expected_disabled_extensions.erase(good2); |
| 6761 | 6761 |
| 6762 EXPECT_EQ(expected_extensions, service_->extensions()->GetIDs()); | 6762 EXPECT_EQ(expected_extensions, service_->extensions()->GetIDs()); |
| 6763 EXPECT_EQ(expected_disabled_extensions, | 6763 EXPECT_EQ(expected_disabled_extensions, |
| 6764 service_->disabled_extensions()->GetIDs()); | 6764 service_->disabled_extensions()->GetIDs()); |
| 6765 } | 6765 } |
| 6766 | 6766 |
| 6767 #endif // #if !(defined(OS_LINUX) && defined(USE_AURA) && !defined(OS_CHROMEOS)) | 6767 #endif // #if !(defined(OS_LINUX) && defined(USE_AURA) && !defined(OS_CHROMEOS)) |
| OLD | NEW |