| Index: content/browser/appcache/chrome_appcache_service_unittest.cc
|
| diff --git a/content/browser/appcache/chrome_appcache_service_unittest.cc b/content/browser/appcache/chrome_appcache_service_unittest.cc
|
| index 29b795667e1d0703ecf4d3443c0624f50701fcbf..e22c9308081408dc9c5f93c9a50a74050c5831ca 100644
|
| --- a/content/browser/appcache/chrome_appcache_service_unittest.cc
|
| +++ b/content/browser/appcache/chrome_appcache_service_unittest.cc
|
| @@ -126,7 +126,6 @@ TEST_F(ChromeAppCacheServiceTest, KeepOnDestruction) {
|
| InsertDataIntoAppCache(appcache_service);
|
|
|
| // Test: delete the ChromeAppCacheService
|
| - appcache_service->set_clear_local_state_on_exit(false);
|
| appcache_service = NULL;
|
| message_loop_.RunAllPending();
|
|
|
| @@ -151,44 +150,6 @@ TEST_F(ChromeAppCacheServiceTest, KeepOnDestruction) {
|
| message_loop_.RunAllPending();
|
| }
|
|
|
| -TEST_F(ChromeAppCacheServiceTest, RemoveOnDestruction) {
|
| - ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
|
| - FilePath appcache_path = temp_dir_.path().Append(kTestingAppCacheDirname);
|
| -
|
| - // Create a ChromeAppCacheService and insert data into it
|
| - scoped_refptr<ChromeAppCacheService> appcache_service =
|
| - CreateAppCacheService(appcache_path, true);
|
| - ASSERT_TRUE(file_util::PathExists(appcache_path));
|
| - ASSERT_TRUE(file_util::PathExists(appcache_path.AppendASCII("Index")));
|
| - InsertDataIntoAppCache(appcache_service);
|
| -
|
| - // Test: delete the ChromeAppCacheService
|
| - appcache_service->set_clear_local_state_on_exit(true);
|
| - appcache_service = NULL;
|
| - message_loop_.RunAllPending();
|
| -
|
| - // Recreate the appcache (for reading the data back)
|
| - appcache_service = CreateAppCacheService(appcache_path, false);
|
| -
|
| - // The directory is still there
|
| - ASSERT_TRUE(file_util::PathExists(appcache_path));
|
| -
|
| - // The appcache data for the protected origin is there, and the data for the
|
| - // unprotected origin was deleted.
|
| - AppCacheTestHelper appcache_helper;
|
| - std::set<GURL> origins;
|
| - appcache_helper.GetOriginsWithCaches(appcache_service, &origins);
|
| - EXPECT_EQ(1UL, origins.size());
|
| - EXPECT_TRUE(origins.find(kProtectedManifestURL.GetOrigin()) != origins.end());
|
| - EXPECT_TRUE(origins.find(kNormalManifestURL.GetOrigin()) == origins.end());
|
| - EXPECT_TRUE(origins.find(kSessionOnlyManifestURL.GetOrigin()) ==
|
| - origins.end());
|
| -
|
| - // Delete and let cleanup tasks run prior to returning.
|
| - appcache_service = NULL;
|
| - message_loop_.RunAllPending();
|
| -}
|
| -
|
| TEST_F(ChromeAppCacheServiceTest, SaveSessionState) {
|
| ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
|
| FilePath appcache_path = temp_dir_.path().Append(kTestingAppCacheDirname);
|
| @@ -200,9 +161,8 @@ TEST_F(ChromeAppCacheServiceTest, SaveSessionState) {
|
| ASSERT_TRUE(file_util::PathExists(appcache_path.AppendASCII("Index")));
|
| InsertDataIntoAppCache(appcache_service);
|
|
|
| - appcache_service->set_clear_local_state_on_exit(true);
|
| // Save session state. This should bypass the destruction-time deletion.
|
| - appcache_service->set_save_session_state(true);
|
| + appcache_service->set_force_keep_session_state();
|
|
|
| // Test: delete the ChromeAppCacheService
|
| appcache_service = NULL;
|
|
|