#ifndef CONTENT_TEST_APPCACHE_TEST_HELPER_H_
#define CONTENT_TEST_APPCACHE_TEST_HELPER_H_
#include <set>
#include "webkit/browser/appcache/appcache_storage.h"
namespace appcache {
class AppCacheService;
}
namespace content {
class AppCacheTestHelper : public appcache::AppCacheStorage::Delegate {
public:
AppCacheTestHelper();
virtual ~AppCacheTestHelper();
void AddGroupAndCache(appcache::AppCacheService* appcache_service,
const GURL& manifest_url);
void GetOriginsWithCaches(appcache::AppCacheService* appcache_service,
std::set<GURL>* origins);
private:
virtual void OnGroupAndNewestCacheStored(
appcache::AppCacheGroup* group,
appcache::AppCache* newest_cache,
bool success,
bool would_exceed_quota) OVERRIDE;
void OnGotAppCacheInfo(int rv);
int group_id_;
int appcache_id_;
int response_id_;
scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_;
std::set<GURL>* origins_;
DISALLOW_COPY_AND_ASSIGN(AppCacheTestHelper);
};
}
#endif