| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 | 326 |
| 327 // Final delete request should also run. | 327 // Final delete request should also run. |
| 328 EXPECT_TRUE(request2->success_called()); | 328 EXPECT_TRUE(request2->success_called()); |
| 329 | 329 |
| 330 // And everything else should be complete. | 330 // And everything else should be complete. |
| 331 EXPECT_EQ(db->ConnectionCount(), 0UL); | 331 EXPECT_EQ(db->ConnectionCount(), 0UL); |
| 332 EXPECT_EQ(db->ActiveOpenDeleteCount(), 0UL); | 332 EXPECT_EQ(db->ActiveOpenDeleteCount(), 0UL); |
| 333 EXPECT_EQ(db->PendingOpenDeleteCount(), 0UL); | 333 EXPECT_EQ(db->PendingOpenDeleteCount(), 0UL); |
| 334 } | 334 } |
| 335 | 335 |
| 336 void DummyOperation(IndexedDBTransaction* transaction) { | 336 leveldb::Status DummyOperation(IndexedDBTransaction* transaction) { |
| 337 return leveldb::Status::OK(); |
| 337 } | 338 } |
| 338 | 339 |
| 339 class IndexedDBDatabaseOperationTest : public testing::Test { | 340 class IndexedDBDatabaseOperationTest : public testing::Test { |
| 340 public: | 341 public: |
| 341 IndexedDBDatabaseOperationTest() | 342 IndexedDBDatabaseOperationTest() |
| 342 : commit_success_(leveldb::Status::OK()), | 343 : commit_success_(leveldb::Status::OK()), |
| 343 factory_(new MockIndexedDBFactory()) {} | 344 factory_(new MockIndexedDBFactory()) {} |
| 344 | 345 |
| 345 void SetUp() override { | 346 void SetUp() override { |
| 346 backing_store_ = new IndexedDBFakeBackingStore(); | 347 backing_store_ = new IndexedDBFakeBackingStore(); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 EXPECT_EQ(1ULL, db_->metadata().object_stores.size()); | 515 EXPECT_EQ(1ULL, db_->metadata().object_stores.size()); |
| 515 | 516 |
| 516 // This will execute the Put then Delete. | 517 // This will execute the Put then Delete. |
| 517 RunPostedTasks(); | 518 RunPostedTasks(); |
| 518 EXPECT_EQ(0ULL, db_->metadata().object_stores.size()); | 519 EXPECT_EQ(0ULL, db_->metadata().object_stores.size()); |
| 519 | 520 |
| 520 transaction_->Commit(); // Cleans up the object hierarchy. | 521 transaction_->Commit(); // Cleans up the object hierarchy. |
| 521 } | 522 } |
| 522 | 523 |
| 523 } // namespace content | 524 } // namespace content |
| OLD | NEW |