| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 blink::WebIDBTransactionModeReadOnly); | 151 blink::WebIDBTransactionModeReadOnly); |
| 152 | 152 |
| 153 request->connection()->ForceClose(); | 153 request->connection()->ForceClose(); |
| 154 | 154 |
| 155 EXPECT_TRUE(backing_store->HasOneRef()); // local | 155 EXPECT_TRUE(backing_store->HasOneRef()); // local |
| 156 EXPECT_TRUE(callbacks->abort_called()); | 156 EXPECT_TRUE(callbacks->abort_called()); |
| 157 } | 157 } |
| 158 | 158 |
| 159 class MockCallbacks : public IndexedDBCallbacks { | 159 class MockCallbacks : public IndexedDBCallbacks { |
| 160 public: | 160 public: |
| 161 MockCallbacks() : IndexedDBCallbacks(NULL, 0, 0) {} | 161 MockCallbacks() : IndexedDBCallbacks(nullptr, url::Origin(), nullptr) {} |
| 162 | 162 |
| 163 void OnBlocked(int64_t existing_version) override { blocked_called_ = true; } | 163 void OnBlocked(int64_t existing_version) override { blocked_called_ = true; } |
| 164 void OnSuccess(int64_t result) override { success_called_ = true; } | 164 void OnSuccess(int64_t result) override { success_called_ = true; } |
| 165 void OnError(const IndexedDBDatabaseError& error) override { | 165 void OnError(const IndexedDBDatabaseError& error) override { |
| 166 error_called_ = true; | 166 error_called_ = true; |
| 167 } | 167 } |
| 168 bool IsValid() const override { return valid_; } | 168 bool IsValid() const override { return valid_; } |
| 169 | 169 |
| 170 bool blocked_called() const { return blocked_called_; } | 170 bool blocked_called() const { return blocked_called_; } |
| 171 bool success_called() const { return success_called_; } | 171 bool success_called() const { return success_called_; } |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 EXPECT_EQ(1ULL, db_->metadata().object_stores.size()); | 523 EXPECT_EQ(1ULL, db_->metadata().object_stores.size()); |
| 524 | 524 |
| 525 // This will execute the Put then Delete. | 525 // This will execute the Put then Delete. |
| 526 RunPostedTasks(); | 526 RunPostedTasks(); |
| 527 EXPECT_EQ(0ULL, db_->metadata().object_stores.size()); | 527 EXPECT_EQ(0ULL, db_->metadata().object_stores.size()); |
| 528 | 528 |
| 529 transaction_->Commit(); // Cleans up the object hierarchy. | 529 transaction_->Commit(); // Cleans up the object hierarchy. |
| 530 } | 530 } |
| 531 | 531 |
| 532 } // namespace content | 532 } // namespace content |
| OLD | NEW |