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

Unified Diff: webkit/appcache/appcache_group_unittest.cc

Issue 201070: Implementation of application cache update algorithm.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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_group.cc ('k') | webkit/appcache/appcache_interfaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_group_unittest.cc
===================================================================
--- webkit/appcache/appcache_group_unittest.cc (revision 26887)
+++ webkit/appcache/appcache_group_unittest.cc (working copy)
@@ -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 @@
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
« no previous file with comments | « webkit/appcache/appcache_group.cc ('k') | webkit/appcache/appcache_interfaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698