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 <set> | 7 #include <set> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 EXPECT_TRUE(callbacks->abort_called()); | 151 EXPECT_TRUE(callbacks->abort_called()); |
152 } | 152 } |
153 | 153 |
154 class MockDeleteCallbacks : public IndexedDBCallbacks { | 154 class MockDeleteCallbacks : public IndexedDBCallbacks { |
155 public: | 155 public: |
156 MockDeleteCallbacks() | 156 MockDeleteCallbacks() |
157 : IndexedDBCallbacks(NULL, 0, 0), | 157 : IndexedDBCallbacks(NULL, 0, 0), |
158 blocked_called_(false), | 158 blocked_called_(false), |
159 success_called_(false) {} | 159 success_called_(false) {} |
160 | 160 |
161 virtual void OnBlocked(int64 existing_version) OVERRIDE { | 161 virtual void OnBlocked(int64 existing_version) override { |
162 blocked_called_ = true; | 162 blocked_called_ = true; |
163 } | 163 } |
164 virtual void OnSuccess(int64 result) OVERRIDE { success_called_ = true; } | 164 virtual void OnSuccess(int64 result) override { success_called_ = true; } |
165 | 165 |
166 bool blocked_called() const { return blocked_called_; } | 166 bool blocked_called() const { return blocked_called_; } |
167 bool success_called() const { return success_called_; } | 167 bool success_called() const { return success_called_; } |
168 | 168 |
169 private: | 169 private: |
170 virtual ~MockDeleteCallbacks() {} | 170 virtual ~MockDeleteCallbacks() {} |
171 | 171 |
172 bool blocked_called_; | 172 bool blocked_called_; |
173 bool success_called_; | 173 bool success_called_; |
174 | 174 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 EXPECT_EQ(1ULL, db_->metadata().object_stores.size()); | 412 EXPECT_EQ(1ULL, db_->metadata().object_stores.size()); |
413 | 413 |
414 // This will execute the Put then Delete. | 414 // This will execute the Put then Delete. |
415 RunPostedTasks(); | 415 RunPostedTasks(); |
416 EXPECT_EQ(0ULL, db_->metadata().object_stores.size()); | 416 EXPECT_EQ(0ULL, db_->metadata().object_stores.size()); |
417 | 417 |
418 transaction_->Commit(); // Cleans up the object hierarchy. | 418 transaction_->Commit(); // Cleans up the object hierarchy. |
419 } | 419 } |
420 | 420 |
421 } // namespace content | 421 } // namespace content |
OLD | NEW |