Added methods to remove indexed databases from the ExtensionDataDeleter.

BUG=56249
TEST=ExtensionsServiceTest.ClearExtensionData

Review URL: http://codereview.chromium.org/5188005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66981 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extensions_service_unittest.cc b/chrome/browser/extensions/extensions_service_unittest.cc
index d5057b7..b9a2c27b 100644
--- a/chrome/browser/extensions/extensions_service_unittest.cc
+++ b/chrome/browser/extensions/extensions_service_unittest.cc
@@ -2203,6 +2203,15 @@
   EXPECT_EQ(0, file_util::WriteFile(lso_path, NULL, 0));
   EXPECT_TRUE(file_util::PathExists(lso_path));
 
+  // Create indexed db. Again, it is enough to only simulate this by creating
+  // the file on the disk.
+  IndexedDBContext* idb_context =
+      profile_->GetWebKitContext()->indexed_db_context();
+  FilePath idb_path = idb_context->GetIndexedDBFilePath(origin_id);
+  EXPECT_TRUE(file_util::CreateDirectory(idb_path.DirName()));
+  EXPECT_EQ(0, file_util::WriteFile(idb_path, NULL, 0));
+  EXPECT_TRUE(file_util::PathExists(idb_path));
+
   // Uninstall the extension.
   service_->UninstallExtension(good_crx, false);
   loop_.RunAllPending();
@@ -2218,6 +2227,9 @@
 
   // Check that the LSO file has been removed.
   EXPECT_FALSE(file_util::PathExists(lso_path));
+
+  // Check if the indexed db has disappeared too.
+  EXPECT_FALSE(file_util::PathExists(idb_path));
 }
 
 // Tests loading single extensions (like --load-extension)