summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authordgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-16 00:59:03 +0000
committerdgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-16 00:59:03 +0000
commit5316c141a4c800d714b14473feb181d6054de9cc (patch)
tree638a27a1d4bc2816bd13a3a5cebc5996562c75e1 /content/browser
parent276508af364e08c3a358122b9d3048c33d221d08 (diff)
downloadchromium_src-5316c141a4c800d714b14473feb181d6054de9cc.zip
chromium_src-5316c141a4c800d714b14473feb181d6054de9cc.tar.gz
chromium_src-5316c141a4c800d714b14473feb181d6054de9cc.tar.bz2
Turn on LevelDB logging
This will help us diagnose corruption in the wild. BUG=140543 Review URL: https://codereview.chromium.org/11098057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162016 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/in_process_webkit/indexed_db_browsertest.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/content/browser/in_process_webkit/indexed_db_browsertest.cc b/content/browser/in_process_webkit/indexed_db_browsertest.cc
index 57a73c7..afacd3f 100644
--- a/content/browser/in_process_webkit/indexed_db_browsertest.cc
+++ b/content/browser/in_process_webkit/indexed_db_browsertest.cc
@@ -234,6 +234,26 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithVersion0Schema, MigrationTest) {
SimpleTest(GetTestUrl("indexeddb", "migration_test.html"));
}
+IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, LevelDBLogFileTest) {
+ // Any page that opens an IndexedDB will work here.
+ SimpleTest(GetTestUrl("indexeddb", "database_test.html"));
+ scoped_refptr<IndexedDBContext> context =
+ BrowserContext::GetDefaultStoragePartition(
+ shell()->web_contents()->GetBrowserContext())->
+ GetIndexedDBContext();
+ IndexedDBContextImpl* context_impl =
+ static_cast<IndexedDBContextImpl*>(context.get());
+ FilePath leveldb_dir(FILE_PATH_LITERAL("file__0.indexeddb.leveldb"));
+ FilePath log_file(FILE_PATH_LITERAL("LOG"));
+ FilePath log_file_path =
+ context_impl->data_path().Append(leveldb_dir).Append(log_file);
+ int64 size;
+ EXPECT_TRUE(file_util::GetFileSize(log_file_path, &size));
+ EXPECT_GT(size, 0);
+}
+
+// Complex multi-step (converted from pyauto) tests begin here.
+
// Verify null key path persists after restarting browser.
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, PRE_NullKeyPathPersistence) {
NavigateAndWaitForTitle(shell(), "bug_90635.html", "#part1",