diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-12 02:10:27 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-12 02:10:27 +0000 |
commit | 2bfc5c14f395ef247a5980e1a6dcc0f26893f2d6 (patch) | |
tree | 42b0e45b16affe458cc051c7bdd282e2e43546cf /webkit/appcache/mock_appcache_storage.h | |
parent | d32e75740a892b8578c825b9b5fb850ee5f41269 (diff) | |
download | chromium_src-2bfc5c14f395ef247a5980e1a6dcc0f26893f2d6.zip chromium_src-2bfc5c14f395ef247a5980e1a6dcc0f26893f2d6.tar.gz chromium_src-2bfc5c14f395ef247a5980e1a6dcc0f26893f2d6.tar.bz2 |
Lookup appcached responses given a request URL.
TEST=new cases in mock_appcache_storage_unittest.cc and appcache_unittest.cc
BUG=none
Review URL: http://codereview.chromium.org/372070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31757 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/mock_appcache_storage.h')
-rw-r--r-- | webkit/appcache/mock_appcache_storage.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/webkit/appcache/mock_appcache_storage.h b/webkit/appcache/mock_appcache_storage.h index 9f352bd..bf70fc6 100644 --- a/webkit/appcache/mock_appcache_storage.h +++ b/webkit/appcache/mock_appcache_storage.h @@ -97,7 +97,8 @@ class MockAppCacheStorage : public AppCacheStorage { return disk_cache_.get(); } - // Simulate failures for testing. + // Simulate failures for testing. Once set all subsequent calls + // to MakeGroupObsolete or StorageGroupAndNewestCache will fail. void SimulateMakeGroupObsoleteFailure() { simulate_make_group_obsolete_failure_ = true; } @@ -105,7 +106,10 @@ class MockAppCacheStorage : public AppCacheStorage { simulate_store_group_and_newest_cache_failure_ = true; } - // Simulate FindResponseFor results for testing. + // Simulate FindResponseFor results for testing. These + // provided values will be return on the next call to + // the corresponding Find method, subsequent calls are + // unaffected. void SimulateFindMainResource( const AppCacheEntry& entry, const AppCacheEntry& fallback_entry, @@ -149,7 +153,11 @@ class MockAppCacheStorage : public AppCacheStorage { GURL simulated_found_manifest_url_; bool simulated_found_network_namespace_; + FRIEND_TEST(MockAppCacheStorageTest, BasicFindMainResponse); + FRIEND_TEST(MockAppCacheStorageTest, BasicFindMainFallbackResponse); FRIEND_TEST(MockAppCacheStorageTest, CreateGroup); + FRIEND_TEST(MockAppCacheStorageTest, FindMainResponseExclusions); + FRIEND_TEST(MockAppCacheStorageTest, FindMainResponseWithMultipleCandidates); FRIEND_TEST(MockAppCacheStorageTest, LoadCache_FarHit); FRIEND_TEST(MockAppCacheStorageTest, LoadGroupAndCache_FarHit); FRIEND_TEST(MockAppCacheStorageTest, MakeGroupObsolete); |