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

Unified Diff: chrome/browser/net/quota_policy_channel_id_store_unittest.cc

Issue 1015233002: Fixes a bug where QuotaPolicyChannelIDStore would ignore some deletes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: With fix. Created 5 years, 9 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/net/quota_policy_channel_id_store_unittest.cc
diff --git a/chrome/browser/net/quota_policy_channel_id_store_unittest.cc b/chrome/browser/net/quota_policy_channel_id_store_unittest.cc
index f82f6e477208dc28045e815d36e481fec71d7321..b43e69b51bdb3190cdd9ab8c780658ad3a21b73b 100644
--- a/chrome/browser/net/quota_policy_channel_id_store_unittest.cc
+++ b/chrome/browser/net/quota_policy_channel_id_store_unittest.cc
@@ -178,6 +178,8 @@ TEST_F(QuotaPolicyChannelIDStoreTest, TestPolicy) {
new content::MockSpecialStoragePolicy();
storage_policy->AddSessionOnly(
net::cookie_util::CookieOriginToURL("foo.com", true));
+ storage_policy->AddSessionOnly(
+ net::cookie_util::CookieOriginToURL("nonpersistent.com", true));
// Reload store, it should still have both channel ids.
store_ = new QuotaPolicyChannelIDStore(
temp_dir_.path().Append(kTestChannelIDFilename),
@@ -186,6 +188,13 @@ TEST_F(QuotaPolicyChannelIDStoreTest, TestPolicy) {
Load(&channel_ids);
ASSERT_EQ(2U, channel_ids.size());
+ store_->AddChannelID(
+ net::DefaultChannelIDStore::ChannelID("nonpersistent.com",
+ base::Time::FromInternalValue(5),
+ base::Time::FromInternalValue(6),
+ "e",
+ "f"));
+
// Now close the store, and "foo.com" should be deleted according to policy.
store_ = NULL;
// Make sure we wait until the destructor has run.
« no previous file with comments | « no previous file | net/extras/sqlite/sqlite_channel_id_store.cc » ('j') | net/extras/sqlite/sqlite_channel_id_store.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698