diff options
author | jsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-30 18:43:53 +0000 |
---|---|---|
committer | jsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-30 18:43:53 +0000 |
commit | 72021c7c43bddc6bfd730e2962b78a63778eae94 (patch) | |
tree | eb49e6da3ce78af17af3cc747e6f5b562e4a99ad /content/browser/indexed_db/indexed_db_unittest.cc | |
parent | 37c4fff628ff2bded81202d58d1858f0c7414784 (diff) | |
download | chromium_src-72021c7c43bddc6bfd730e2962b78a63778eae94.zip chromium_src-72021c7c43bddc6bfd730e2962b78a63778eae94.tar.gz chromium_src-72021c7c43bddc6bfd730e2962b78a63778eae94.tar.bz2 |
Revert "Migrate the IndexedDB backend from Blink to Chromium"
This reverts commit d29efa8261b6b0472ea262dadc48a2808f7fdf39.
Failure for "memory test: content" on "Chromium Mac (valgrind)(2)".
BUG=234278
TBR=motownavi@chromium.org
Review URL: https://codereview.chromium.org/15701012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203187 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/indexed_db/indexed_db_unittest.cc')
-rw-r--r-- | content/browser/indexed_db/indexed_db_unittest.cc | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/content/browser/indexed_db/indexed_db_unittest.cc b/content/browser/indexed_db/indexed_db_unittest.cc index 9e90b8a..d4a9fb9 100644 --- a/content/browser/indexed_db/indexed_db_unittest.cc +++ b/content/browser/indexed_db/indexed_db_unittest.cc @@ -55,9 +55,10 @@ TEST_F(IndexedDBTest, ClearSessionOnlyDatabases) { // Create some indexedDB paths. // With the levelDB backend, these are directories. - IndexedDBContextImpl* idb_context = static_cast<IndexedDBContextImpl*>( - BrowserContext::GetDefaultStoragePartition(&browser_context) - ->GetIndexedDBContext()); + IndexedDBContextImpl* idb_context = + static_cast<IndexedDBContextImpl*>( + BrowserContext::GetDefaultStoragePartition(&browser_context)-> + GetIndexedDBContext()); // Override the storage policy with our own. idb_context->special_storage_policy_ = special_storage_policy; @@ -98,9 +99,10 @@ TEST_F(IndexedDBTest, SetForceKeepSessionState) { // Create some indexedDB paths. // With the levelDB backend, these are directories. - IndexedDBContextImpl* idb_context = static_cast<IndexedDBContextImpl*>( - BrowserContext::GetDefaultStoragePartition(&browser_context) - ->GetIndexedDBContext()); + IndexedDBContextImpl* idb_context = + static_cast<IndexedDBContextImpl*>( + BrowserContext::GetDefaultStoragePartition(&browser_context)-> + GetIndexedDBContext()); // Override the storage policy with our own. idb_context->special_storage_policy_ = special_storage_policy; @@ -126,16 +128,20 @@ TEST_F(IndexedDBTest, SetForceKeepSessionState) { EXPECT_TRUE(file_util::DirectoryExists(session_only_path)); } -class MockWebIDBDatabase : public WebKit::WebIDBDatabase { +class MockWebIDBDatabase : public WebKit::WebIDBDatabase +{ public: MockWebIDBDatabase(bool expect_force_close) - : expect_force_close_(expect_force_close), force_close_called_(false) {} + : expect_force_close_(expect_force_close), + force_close_called_(false) {} - virtual ~MockWebIDBDatabase() { + virtual ~MockWebIDBDatabase() + { EXPECT_TRUE(force_close_called_ == expect_force_close_); } - virtual void forceClose() { + virtual void forceClose() + { ASSERT_TRUE(expect_force_close_); force_close_called_ = true; } @@ -145,6 +151,7 @@ class MockWebIDBDatabase : public WebKit::WebIDBDatabase { bool force_close_called_; }; + TEST_F(IndexedDBTest, ForceCloseOpenDatabasesOnDelete) { base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); @@ -158,9 +165,10 @@ TEST_F(IndexedDBTest, ForceCloseOpenDatabasesOnDelete) { const GURL kTestOrigin("http://test/"); - IndexedDBContextImpl* idb_context = static_cast<IndexedDBContextImpl*>( - BrowserContext::GetDefaultStoragePartition(&browser_context) - ->GetIndexedDBContext()); + IndexedDBContextImpl* idb_context = + static_cast<IndexedDBContextImpl*>( + BrowserContext::GetDefaultStoragePartition(&browser_context)-> + GetIndexedDBContext()); idb_context->quota_manager_proxy_ = NULL; idb_context->set_data_path_for_testing(temp_dir.path()); |