| Index: webkit/appcache/appcache_storage_impl_unittest.cc
|
| diff --git a/webkit/appcache/appcache_storage_impl_unittest.cc b/webkit/appcache/appcache_storage_impl_unittest.cc
|
| index 0b914f7e54990156618333dbc4614d3c3eda4fd8..30360c1f8e27163ac1403b59ca2a062a32d6137b 100644
|
| --- a/webkit/appcache/appcache_storage_impl_unittest.cc
|
| +++ b/webkit/appcache/appcache_storage_impl_unittest.cc
|
| @@ -466,6 +466,13 @@ class AppCacheStorageImplTest : public testing::Test {
|
| TestFinished();
|
| }
|
|
|
| + void CreateGroupSyncInPopulatedOrigin() {
|
| + storage()->usage_map_[kOrigin] = kDefaultEntrySize;
|
| +
|
| + storage()->SyncLoadOrCreateGroup(kManifestUrl, delegate());
|
| + Verify_CreateGroup();
|
| + }
|
| +
|
| // LoadGroupAndCache_FarHit --------------------------------------
|
|
|
| void LoadGroupAndCache_FarHit() {
|
| @@ -713,11 +720,7 @@ class AppCacheStorageImplTest : public testing::Test {
|
|
|
| // MakeGroupObsolete -------------------------------
|
|
|
| - void MakeGroupObsolete() {
|
| - // Make a group obsolete, should complete asyncly.
|
| - PushNextTask(NewRunnableMethod(
|
| - this, &AppCacheStorageImplTest::Verify_MakeGroupObsolete));
|
| -
|
| + void Setup_MakeGroupObsolete() {
|
| // Setup some preconditions. Create a group and newest cache that
|
| // appears to be "stored" and "currently in use".
|
| MakeCacheAndGroup(kManifestUrl, 1, 1, true);
|
| @@ -743,12 +746,26 @@ class AppCacheStorageImplTest : public testing::Test {
|
| online_whitelist_record.cache_id = 1;
|
| online_whitelist_record.namespace_url = kOnlineNamespace;
|
| EXPECT_TRUE(database()->InsertOnlineWhiteList(&online_whitelist_record));
|
| + }
|
| +
|
| + void MakeGroupObsolete() {
|
| + // Make a group obsolete, should complete asyncly.
|
| + PushNextTask(NewRunnableMethod(
|
| + this, &AppCacheStorageImplTest::Verify_MakeGroupObsolete));
|
| + Setup_MakeGroupObsolete();
|
|
|
| // Conduct the test.
|
| storage()->MakeGroupObsolete(group_, delegate());
|
| EXPECT_FALSE(group_->is_obsolete());
|
| }
|
|
|
| + void SyncMakeGroupObsolete() {
|
| + Setup_MakeGroupObsolete();
|
| + // Conduct the test.
|
| + storage()->SyncMakeGroupObsolete(group_, delegate());
|
| + Verify_MakeGroupObsolete();
|
| + }
|
| +
|
| void Verify_MakeGroupObsolete() {
|
| EXPECT_TRUE(delegate()->obsoleted_success_);
|
| EXPECT_EQ(group_.get(), delegate()->obsoleted_group_.get());
|
| @@ -1335,6 +1352,10 @@ TEST_F(AppCacheStorageImplTest, CreateGroupInPopulatedOrigin) {
|
| RunTestOnIOThread(&AppCacheStorageImplTest::CreateGroupInPopulatedOrigin);
|
| }
|
|
|
| +TEST_F(AppCacheStorageImplTest, CreateGroupSyncInPopulatedOrigin) {
|
| + RunTestOnIOThread(&AppCacheStorageImplTest::CreateGroupSyncInPopulatedOrigin);
|
| +}
|
| +
|
| TEST_F(AppCacheStorageImplTest, LoadGroupAndCache_FarHit) {
|
| RunTestOnIOThread(&AppCacheStorageImplTest::LoadGroupAndCache_FarHit);
|
| }
|
| @@ -1359,6 +1380,10 @@ TEST_F(AppCacheStorageImplTest, MakeGroupObsolete) {
|
| RunTestOnIOThread(&AppCacheStorageImplTest::MakeGroupObsolete);
|
| }
|
|
|
| +TEST_F(AppCacheStorageImplTest, SyncMakeGroupObsolete) {
|
| + RunTestOnIOThread(&AppCacheStorageImplTest::SyncMakeGroupObsolete);
|
| +}
|
| +
|
| TEST_F(AppCacheStorageImplTest, MarkEntryAsForeign) {
|
| RunTestOnIOThread(&AppCacheStorageImplTest::MarkEntryAsForeign);
|
| }
|
|
|