| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_database.h" | 5 #include "content/browser/indexed_db/indexed_db_database.h" |
| 6 | 6 |
| 7 #include <gtest/gtest.h> | 7 #include <gtest/gtest.h> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "content/browser/in_process_webkit/indexed_db_database_callbacks.h" | |
| 14 #include "content/browser/indexed_db/indexed_db.h" | 13 #include "content/browser/indexed_db/indexed_db.h" |
| 15 #include "content/browser/indexed_db/indexed_db_backing_store.h" | 14 #include "content/browser/indexed_db/indexed_db_backing_store.h" |
| 16 #include "content/browser/indexed_db/indexed_db_callbacks_wrapper.h" | 15 #include "content/browser/indexed_db/indexed_db_callbacks_wrapper.h" |
| 17 #include "content/browser/indexed_db/indexed_db_cursor.h" | 16 #include "content/browser/indexed_db/indexed_db_cursor.h" |
| 18 #include "content/browser/indexed_db/indexed_db_database.h" | 17 #include "content/browser/indexed_db/indexed_db_database.h" |
| 18 #include "content/browser/indexed_db/indexed_db_database_callbacks.h" |
| 19 #include "content/browser/indexed_db/indexed_db_factory.h" | 19 #include "content/browser/indexed_db/indexed_db_factory.h" |
| 20 #include "content/browser/indexed_db/indexed_db_fake_backing_store.h" | 20 #include "content/browser/indexed_db/indexed_db_fake_backing_store.h" |
| 21 #include "content/browser/indexed_db/indexed_db_transaction.h" | 21 #include "content/browser/indexed_db/indexed_db_transaction.h" |
| 22 #include "content/browser/indexed_db/webidbdatabase_impl.h" | 22 #include "content/browser/indexed_db/webidbdatabase_impl.h" |
| 23 | 23 |
| 24 using WebKit::WebIDBDatabaseError; | 24 using WebKit::WebIDBDatabaseError; |
| 25 | 25 |
| 26 namespace content { | 26 namespace content { |
| 27 | 27 |
| 28 TEST(IndexedDBDatabaseTest, BackingStoreRetention) { | 28 TEST(IndexedDBDatabaseTest, BackingStoreRetention) { |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 const std::vector<int64> scope; | 191 const std::vector<int64> scope; |
| 192 web_database.createTransaction( | 192 web_database.createTransaction( |
| 193 transaction_id, 0, scope, indexed_db::TRANSACTION_READ_ONLY); | 193 transaction_id, 0, scope, indexed_db::TRANSACTION_READ_ONLY); |
| 194 | 194 |
| 195 web_database.forceClose(); | 195 web_database.forceClose(); |
| 196 | 196 |
| 197 EXPECT_TRUE(backing_store->HasOneRef()); // local | 197 EXPECT_TRUE(backing_store->HasOneRef()); // local |
| 198 } | 198 } |
| 199 | 199 |
| 200 } // namespace content | 200 } // namespace content |
| OLD | NEW |