Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(656)

Unified Diff: content/browser/indexed_db/indexed_db_unittest.cc

Issue 15564008: Migrate the IndexedDB backend from Blink to Chromium (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update to ToT again Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/indexed_db/indexed_db_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_unittest.cc b/content/browser/indexed_db/indexed_db_unittest.cc
index d4a9fb94a3b0a843b89fcc68f4b458e850a3b76e..9e90b8ac0fae7c49f60343ca64cc1f4aa0feb619 100644
--- a/content/browser/indexed_db/indexed_db_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_unittest.cc
@@ -55,10 +55,9 @@ 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;
@@ -99,10 +98,9 @@ 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;
@@ -128,20 +126,16 @@ 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;
}
@@ -151,7 +145,6 @@ class MockWebIDBDatabase : public WebKit::WebIDBDatabase
bool force_close_called_;
};
-
TEST_F(IndexedDBTest, ForceCloseOpenDatabasesOnDelete) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
@@ -165,10 +158,9 @@ 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());
« no previous file with comments | « content/browser/indexed_db/indexed_db_transaction_coordinator.cc ('k') | content/browser/indexed_db/leveldb/avltree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698