| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/indexed_db/indexed_db_backing_store.h" | 5 #include "content/browser/indexed_db/indexed_db_backing_store.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 status); | 221 status); |
| 222 } | 222 } |
| 223 | 223 |
| 224 private: | 224 private: |
| 225 DISALLOW_COPY_AND_ASSIGN(TestIDBFactory); | 225 DISALLOW_COPY_AND_ASSIGN(TestIDBFactory); |
| 226 }; | 226 }; |
| 227 | 227 |
| 228 class IndexedDBBackingStoreTest : public testing::Test { | 228 class IndexedDBBackingStoreTest : public testing::Test { |
| 229 public: | 229 public: |
| 230 IndexedDBBackingStoreTest() {} | 230 IndexedDBBackingStoreTest() {} |
| 231 virtual void SetUp() { | 231 void SetUp() override { |
| 232 const GURL origin("http://localhost:81"); | 232 const GURL origin("http://localhost:81"); |
| 233 task_runner_ = new base::TestSimpleTaskRunner(); | 233 task_runner_ = new base::TestSimpleTaskRunner(); |
| 234 special_storage_policy_ = new MockSpecialStoragePolicy(); | 234 special_storage_policy_ = new MockSpecialStoragePolicy(); |
| 235 special_storage_policy_->SetAllUnlimited(true); | 235 special_storage_policy_->SetAllUnlimited(true); |
| 236 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 236 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 237 idb_context_ = new IndexedDBContextImpl(temp_dir_.path(), | 237 idb_context_ = new IndexedDBContextImpl(temp_dir_.path(), |
| 238 special_storage_policy_.get(), | 238 special_storage_policy_.get(), |
| 239 NULL, | 239 NULL, |
| 240 task_runner_.get()); | 240 task_runner_.get()); |
| 241 idb_factory_ = new TestIDBFactory(idb_context_.get()); | 241 idb_factory_ = new TestIDBFactory(idb_context_.get()); |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 | 997 |
| 998 std::vector<base::string16> names = backing_store_->GetDatabaseNames(&s); | 998 std::vector<base::string16> names = backing_store_->GetDatabaseNames(&s); |
| 999 EXPECT_TRUE(s.ok()); | 999 EXPECT_TRUE(s.ok()); |
| 1000 EXPECT_EQ(names.size(), 1ULL); | 1000 EXPECT_EQ(names.size(), 1ULL); |
| 1001 EXPECT_EQ(names[0], db1_name); | 1001 EXPECT_EQ(names[0], db1_name); |
| 1002 } | 1002 } |
| 1003 | 1003 |
| 1004 } // namespace | 1004 } // namespace |
| 1005 | 1005 |
| 1006 } // namespace content | 1006 } // namespace content |
| OLD | NEW |