OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/file_util.h" | 5 #include "base/files/file_util.h" |
6 #include "base/files/scoped_temp_dir.h" | 6 #include "base/files/scoped_temp_dir.h" |
7 #include "base/test/test_simple_task_runner.h" | 7 #include "base/test/test_simple_task_runner.h" |
8 #include "base/threading/thread.h" | 8 #include "base/threading/thread.h" |
9 #include "content/browser/browser_thread_impl.h" | 9 #include "content/browser/browser_thread_impl.h" |
10 #include "content/browser/indexed_db/indexed_db_connection.h" | 10 #include "content/browser/indexed_db/indexed_db_connection.h" |
11 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 11 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
12 #include "content/browser/indexed_db/indexed_db_factory_impl.h" | 12 #include "content/browser/indexed_db/indexed_db_factory_impl.h" |
13 #include "content/browser/indexed_db/mock_indexed_db_callbacks.h" | 13 #include "content/browser/indexed_db/mock_indexed_db_callbacks.h" |
14 #include "content/browser/indexed_db/mock_indexed_db_database_callbacks.h" | 14 #include "content/browser/indexed_db/mock_indexed_db_database_callbacks.h" |
15 #include "content/public/browser/storage_partition.h" | 15 #include "content/public/browser/storage_partition.h" |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 | 285 |
286 // Simulate the write failure. | 286 // Simulate the write failure. |
287 leveldb::Status status = leveldb::Status::IOError("Simulated failure"); | 287 leveldb::Status status = leveldb::Status::IOError("Simulated failure"); |
288 callbacks->connection()->database()->TransactionCommitFailed(status); | 288 callbacks->connection()->database()->TransactionCommitFailed(status); |
289 | 289 |
290 EXPECT_TRUE(db_callbacks->forced_close_called()); | 290 EXPECT_TRUE(db_callbacks->forced_close_called()); |
291 EXPECT_FALSE(factory->IsBackingStoreOpen(kTestOrigin)); | 291 EXPECT_FALSE(factory->IsBackingStoreOpen(kTestOrigin)); |
292 } | 292 } |
293 | 293 |
294 } // namespace content | 294 } // namespace content |
OLD | NEW |