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

Unified Diff: chrome/browser/cookies_tree_model_unittest.cc

Issue 8383004: Adding CookieSettings for storing cookie content settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing the rebase. Created 9 years, 2 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/cookies_tree_model.cc ('k') | chrome/browser/extensions/extension_content_settings_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cookies_tree_model_unittest.cc
diff --git a/chrome/browser/cookies_tree_model_unittest.cc b/chrome/browser/cookies_tree_model_unittest.cc
index 275f2d7688073a93eb6397339af632b9a08882e8..ea34a0929a0b7a64150cdec9a0f033e5482c5bbc 100644
--- a/chrome/browser/cookies_tree_model_unittest.cc
+++ b/chrome/browser/cookies_tree_model_unittest.cc
@@ -6,6 +6,7 @@
#include <string>
+#include "chrome/browser/content_settings/cookie_settings.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/content_settings/mock_settings_observer.h"
#include "chrome/browser/mock_browsing_data_appcache_helper.h"
@@ -948,6 +949,7 @@ TEST_F(CookiesTreeModelTest, ContentSettings) {
TestingProfile profile;
HostContentSettingsMap* content_settings =
profile.GetHostContentSettingsMap();
+ CookieSettings* cookie_settings = CookieSettings::GetForProfile(&profile);
MockSettingsObserver observer;
CookieTreeRootNode* root =
@@ -972,9 +974,9 @@ TEST_F(CookiesTreeModelTest, ContentSettings) {
ContentSettingsPattern::Wildcard(),
false));
origin->CreateContentException(
- content_settings, CONTENT_SETTING_SESSION_ONLY);
- EXPECT_EQ(CONTENT_SETTING_SESSION_ONLY,
- content_settings->GetCookieContentSetting(host, host, true));
+ cookie_settings, CONTENT_SETTING_SESSION_ONLY);
+ EXPECT_TRUE(cookie_settings->IsReadingCookieAllowed(host, host));
+ EXPECT_TRUE(cookie_settings->IsCookieSessionOnly(host));
}
TEST_F(CookiesTreeModelTest, FileSystemFilter) {
« no previous file with comments | « chrome/browser/cookies_tree_model.cc ('k') | chrome/browser/extensions/extension_content_settings_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698