diff options
author | jennb@chromium.org <jennb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 17:19:37 +0000 |
---|---|---|
committer | jennb@chromium.org <jennb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 17:19:37 +0000 |
commit | ae3c0b266d4a3f7f2f121589e24e76528d44f4f7 (patch) | |
tree | 85af04a19120db4a75b1ad07ca2a6e1473f1767e /webkit/appcache/appcache_group_unittest.cc | |
parent | ff9cfce7ec2ae06df4ac413cfde3bfd7ae503677 (diff) | |
download | chromium_src-ae3c0b266d4a3f7f2f121589e24e76528d44f4f7.zip chromium_src-ae3c0b266d4a3f7f2f121589e24e76528d44f4f7.tar.gz chromium_src-ae3c0b266d4a3f7f2f121589e24e76528d44f4f7.tar.bz2 |
Implementation of application cache update algorithm.
Does not include storage nor processing of pending master entries.
TEST=verify update functionality
BUG=none
Review URL: http://codereview.chromium.org/201070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_group_unittest.cc')
-rw-r--r-- | webkit/appcache/appcache_group_unittest.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/webkit/appcache/appcache_group_unittest.cc b/webkit/appcache/appcache_group_unittest.cc index bcfbce0..74846af 100644 --- a/webkit/appcache/appcache_group_unittest.cc +++ b/webkit/appcache/appcache_group_unittest.cc @@ -7,6 +7,7 @@ #include "webkit/appcache/appcache_group.h" #include "webkit/appcache/appcache_host.h" #include "webkit/appcache/appcache_service.h" +#include "webkit/appcache/appcache_update_job.h" namespace { @@ -130,4 +131,27 @@ TEST(AppCacheGroupTest, CleanupUnusedGroup) { EXPECT_EQ(frontend.last_status_, appcache::UNCACHED); } +TEST(AppCacheGroupTest, StartUpdate) { + /* TODO(jennb) - uncomment after AppCacheGroup::StartUpdate does something. + AppCacheService service; + scoped_refptr<AppCacheGroup> group = + new AppCacheGroup(&service, GURL("http://foo.com")); + + // Set state to checking to prevent update job from executing fetches. + group->update_status_ = AppCacheGroup::CHECKING; + group->StartUpdate(); + AppCacheUpdateJob* update = group->update_job_; + EXPECT_TRUE(update != NULL); + + // Start another update, check that same update job is in use. + group->StartUpdateWithHost(NULL); + EXPECT_EQ(update, group->update_job_); + + // Remove update job's reference to this group. + delete update; + EXPECT_TRUE(group->update_job_ == NULL); + EXPECT_EQ(AppCacheGroup::IDLE, group->update_status()); + */ +} + } // namespace appcache |