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

Unified Diff: webkit/appcache/appcache_database_unittest.cc

Issue 7031065: AppCache + Quota integration (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 | « webkit/appcache/appcache_database.cc ('k') | webkit/appcache/appcache_quota_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_database_unittest.cc
===================================================================
--- webkit/appcache/appcache_database_unittest.cc (revision 88615)
+++ webkit/appcache/appcache_database_unittest.cc (working copy)
@@ -540,7 +540,7 @@
EXPECT_EQ(i + 5, ids[i]);
}
-TEST(AppCacheDatabaseTest, Quotas) {
+TEST(AppCacheDatabaseTest, OriginUsage) {
const GURL kManifestUrl("http://blah/manifest");
const GURL kManifestUrl2("http://blah/manifest2");
const GURL kOrigin(kManifestUrl.GetOrigin());
@@ -555,7 +555,6 @@
db.db_->set_error_delegate(error_delegate);
std::vector<AppCacheDatabase::CacheRecord> cache_records;
- EXPECT_EQ(db.GetDefaultOriginQuota(), db.GetOriginQuota(kOrigin));
EXPECT_EQ(0, db.GetOriginUsage(kOrigin));
EXPECT_TRUE(db.FindCachesForOrigin(kOrigin, &cache_records));
EXPECT_TRUE(cache_records.empty());
@@ -606,6 +605,12 @@
cache_records.clear();
EXPECT_TRUE(db.FindCachesForOrigin(kOtherOrigin, &cache_records));
EXPECT_EQ(1U, cache_records.size());
+
+ std::map<GURL, int64> usage_map;
+ EXPECT_TRUE(db.GetAllOriginUsage(&usage_map));
+ EXPECT_EQ(2U, usage_map.size());
+ EXPECT_EQ(1100, usage_map[kOrigin]);
+ EXPECT_EQ(5000, usage_map[kOtherOrigin]);
}
} // namespace appcache
« no previous file with comments | « webkit/appcache/appcache_database.cc ('k') | webkit/appcache/appcache_quota_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698