Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1613)

Side by Side Diff: content/browser/indexed_db/indexed_db_database_unittest.cc

Issue 667943003: Standardize usage of virtual/override/final in content/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 void OnBlocked(int64 existing_version) override { blocked_called_ = true; }
162 blocked_called_ = true; 162 void OnSuccess(int64 result) override { success_called_ = true; }
163 }
164 virtual void OnSuccess(int64 result) override { success_called_ = true; }
165 163
166 bool blocked_called() const { return blocked_called_; } 164 bool blocked_called() const { return blocked_called_; }
167 bool success_called() const { return success_called_; } 165 bool success_called() const { return success_called_; }
168 166
169 private: 167 private:
170 virtual ~MockDeleteCallbacks() {} 168 ~MockDeleteCallbacks() override {}
171 169
172 bool blocked_called_; 170 bool blocked_called_;
173 bool success_called_; 171 bool success_called_;
174 172
175 DISALLOW_COPY_AND_ASSIGN(MockDeleteCallbacks); 173 DISALLOW_COPY_AND_ASSIGN(MockDeleteCallbacks);
176 }; 174 };
177 175
178 TEST(IndexedDBDatabaseTest, PendingDelete) { 176 TEST(IndexedDBDatabaseTest, PendingDelete) {
179 scoped_refptr<IndexedDBFakeBackingStore> backing_store = 177 scoped_refptr<IndexedDBFakeBackingStore> backing_store =
180 new IndexedDBFakeBackingStore(); 178 new IndexedDBFakeBackingStore();
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 EXPECT_EQ(1ULL, db_->metadata().object_stores.size()); 410 EXPECT_EQ(1ULL, db_->metadata().object_stores.size());
413 411
414 // This will execute the Put then Delete. 412 // This will execute the Put then Delete.
415 RunPostedTasks(); 413 RunPostedTasks();
416 EXPECT_EQ(0ULL, db_->metadata().object_stores.size()); 414 EXPECT_EQ(0ULL, db_->metadata().object_stores.size());
417 415
418 transaction_->Commit(); // Cleans up the object hierarchy. 416 transaction_->Commit(); // Cleans up the object hierarchy.
419 } 417 }
420 418
421 } // namespace content 419 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_context_impl.h ('k') | content/browser/indexed_db/indexed_db_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698