summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browsing_data_database_helper_unittest.cc
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-10 09:39:48 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-10 09:39:48 +0000
commitb2d8f363a11f1e674eb14a297d0a20c3b2134906 (patch)
treec57623fe575da463685e426ebed7e68d773b67ab /chrome/browser/browsing_data_database_helper_unittest.cc
parent7c64b2dd993a3835e4d9e7934e235d11846c143e (diff)
downloadchromium_src-b2d8f363a11f1e674eb14a297d0a20c3b2134906.zip
chromium_src-b2d8f363a11f1e674eb14a297d0a20c3b2134906.tar.gz
chromium_src-b2d8f363a11f1e674eb14a297d0a20c3b2134906.tar.bz2
Reland r55382. When blocking cookies, also show an icon in the location bar when cookies are accessed.
If the user choses to block cookies per default, this will grant access to the collected cookies dialog as soon as the page accesses cookies. Right now, the icon is only shown if cookies were actually blocked. BUG=45230 TEST=Canned*.*:ContentSettingImage*.*:TabSpecific*.* Review URL: http://codereview.chromium.org/3014056 Review URL: http://codereview.chromium.org/3148002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data_database_helper_unittest.cc')
-rw-r--r--chrome/browser/browsing_data_database_helper_unittest.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/browsing_data_database_helper_unittest.cc b/chrome/browser/browsing_data_database_helper_unittest.cc
index b5368c4..9d313db 100644
--- a/chrome/browser/browsing_data_database_helper_unittest.cc
+++ b/chrome/browser/browsing_data_database_helper_unittest.cc
@@ -93,3 +93,19 @@ TEST(CannedBrowsingDataDatabaseTest, Unique) {
EXPECT_STREQ(origin_str, result[0].origin_identifier.c_str());
EXPECT_STREQ(db, result[0].database_name.c_str());
}
+
+TEST(CannedBrowsingDataDatabaseTest, Empty) {
+ TestingProfile profile;
+
+ const GURL origin("http://host1:1/");
+ const char db[] = "db1";
+
+ scoped_refptr<CannedBrowsingDataDatabaseHelper> helper =
+ new CannedBrowsingDataDatabaseHelper(&profile);
+
+ ASSERT_TRUE(helper->empty());
+ helper->AddDatabase(origin, db, "");
+ ASSERT_FALSE(helper->empty());
+ helper->Reset();
+ ASSERT_TRUE(helper->empty());
+}