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

Unified Diff: chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc

Issue 6352005: Don't register cookie access on empty cookie list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/tab_contents
Patch Set: Created 9 years, 11 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/tab_contents/tab_specific_content_settings.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc
diff --git a/chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc b/chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc
index d23d877a62eafa2c28711e53e56690d9c50eef50..61fdcfe8f30da5c0a30fc555c01f1b5102c9eaaf 100644
--- a/chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc
+++ b/chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/tab_contents/tab_specific_content_settings.h"
#include "chrome/test/testing_profile.h"
-#include "net/base/cookie_options.h"
+#include "net/base/cookie_monster.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -137,3 +137,20 @@ TEST(TabSpecificContentSettingsTest, AllowedContent) {
ASSERT_TRUE(
content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES));
}
+
+TEST(TabSpecificContentSettingsTest, EmptyCookieList) {
+ TestContentSettingsDelegate test_delegate;
+ TestingProfile profile;
+ TabSpecificContentSettings content_settings(&test_delegate, &profile);
+
+ ASSERT_FALSE(
+ content_settings.IsContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES));
+ ASSERT_FALSE(
+ content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES));
+ content_settings.OnCookiesRead(
+ GURL("http://google.com"), net::CookieList(), true);
+ ASSERT_FALSE(
+ content_settings.IsContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES));
+ ASSERT_FALSE(
+ content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES));
+}
« no previous file with comments | « chrome/browser/tab_contents/tab_specific_content_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698