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

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

Issue 2351803002: Switching ExtensionSpecialStoragePolicy::IsStorageDurable to use DurableStoragePermissionContext. (Closed)
Patch Set: Using PermissionManager::Get(). Created 4 years, 3 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_special_storage_policy_unittest.cc
diff --git a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
index b25b31f0e34246b36cb77c736903fe3a5d58f869..db4e2f2c72076abb6c05a537c92df2d403fb45ca 100644
--- a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
+++ b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
@@ -320,7 +320,7 @@ TEST_F(ExtensionSpecialStoragePolicyTest, HasSessionOnlyOrigins) {
TestingProfile profile;
content_settings::CookieSettings* cookie_settings =
CookieSettingsFactory::GetForProfile(&profile).get();
- policy_ = new ExtensionSpecialStoragePolicy(cookie_settings);
+ policy_ = new ExtensionSpecialStoragePolicy(&profile);
EXPECT_FALSE(policy_->HasSessionOnlyOrigins());
@@ -345,20 +345,18 @@ TEST_F(ExtensionSpecialStoragePolicyTest, HasSessionOnlyOrigins) {
TEST_F(ExtensionSpecialStoragePolicyTest, IsStorageDurableTest) {
TestingProfile profile;
- content_settings::CookieSettings* cookie_settings =
- CookieSettingsFactory::GetForProfile(&profile).get();
- policy_ = new ExtensionSpecialStoragePolicy(cookie_settings);
- const GURL kHttpUrl("http://foo.com");
+ policy_ = new ExtensionSpecialStoragePolicy(&profile);
+ const GURL kHttpsUrl("https://foo.com");
- EXPECT_FALSE(policy_->IsStorageDurable(kHttpUrl));
+ EXPECT_FALSE(policy_->IsStorageDurable(kHttpsUrl));
HostContentSettingsMap* content_settings_map =
HostContentSettingsMapFactory::GetForProfile(&profile);
content_settings_map->SetContentSettingDefaultScope(
- kHttpUrl, GURL(), CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, std::string(),
+ kHttpsUrl, GURL(), CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, std::string(),
CONTENT_SETTING_ALLOW);
- EXPECT_TRUE(policy_->IsStorageDurable(kHttpUrl));
+ EXPECT_TRUE(policy_->IsStorageDurable(kHttpsUrl));
}
TEST_F(ExtensionSpecialStoragePolicyTest, NotificationTest) {

Powered by Google App Engine
This is Rietveld 408576698