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

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

Issue 313883003: Split IndexedDBFactory into virtual base + impl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved indexed_db_factory_impl.h and relocated IsBackingStoreOpen. Created 6 years, 5 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
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_backing_store_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <set> 5 #include <set>
6 6
7 #include "base/test/test_simple_task_runner.h" 7 #include "base/test/test_simple_task_runner.h"
8 #include "content/browser/indexed_db/indexed_db_active_blob_registry.h" 8 #include "content/browser/indexed_db/indexed_db_active_blob_registry.h"
9 #include "content/browser/indexed_db/indexed_db_backing_store.h" 9 #include "content/browser/indexed_db/indexed_db_backing_store.h"
10 #include "content/browser/indexed_db/indexed_db_factory.h" 10 #include "content/browser/indexed_db/indexed_db_factory_impl.h"
11 #include "content/browser/indexed_db/indexed_db_fake_backing_store.h" 11 #include "content/browser/indexed_db/indexed_db_fake_backing_store.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 namespace { 16 namespace {
17 17
18 class MockIDBFactory : public IndexedDBFactory { 18 class MockIDBFactory : public IndexedDBFactoryImpl {
19 public: 19 public:
20 MockIDBFactory() : IndexedDBFactory(NULL), duplicate_calls_(false) {} 20 MockIDBFactory() : IndexedDBFactoryImpl(NULL), duplicate_calls_(false) {}
21 21
22 virtual void ReportOutstandingBlobs(const GURL& origin_url, 22 virtual void ReportOutstandingBlobs(const GURL& origin_url,
23 bool blobs_outstanding) OVERRIDE { 23 bool blobs_outstanding) OVERRIDE {
24 if (blobs_outstanding) { 24 if (blobs_outstanding) {
25 if (origins_.count(origin_url)) { 25 if (origins_.count(origin_url)) {
26 duplicate_calls_ = true; 26 duplicate_calls_ = true;
27 } else { 27 } else {
28 origins_.insert(origin_url); 28 origins_.insert(origin_url);
29 } 29 }
30 } else { 30 } else {
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 RunUntilIdle(); 265 RunUntilIdle();
266 266
267 // Nothing changes. 267 // Nothing changes.
268 EXPECT_TRUE(factory()->CheckSingleOriginInUse(backing_store()->origin_url())); 268 EXPECT_TRUE(factory()->CheckSingleOriginInUse(backing_store()->origin_url()));
269 EXPECT_TRUE(backing_store()->CheckUnusedBlobsEmpty()); 269 EXPECT_TRUE(backing_store()->CheckUnusedBlobsEmpty());
270 } 270 }
271 271
272 } // namespace 272 } // namespace
273 273
274 } // namespace content 274 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_backing_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698