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

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

Issue 2233153002: IndexedDB: WrapUnique(new T(args..)) -> MakeUnique<T>(args...) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback Created 4 years, 4 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.h » ('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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/test/test_simple_task_runner.h" 10 #include "base/test/test_simple_task_runner.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 static const int64_t kDatabaseId0 = 7; 100 static const int64_t kDatabaseId0 = 7;
101 static const int64_t kDatabaseId1 = 12; 101 static const int64_t kDatabaseId1 = 12;
102 static const int64_t kBlobKey0 = 77; 102 static const int64_t kBlobKey0 = 77;
103 static const int64_t kBlobKey1 = 14; 103 static const int64_t kBlobKey1 = 14;
104 104
105 IndexedDBActiveBlobRegistryTest() 105 IndexedDBActiveBlobRegistryTest()
106 : task_runner_(new base::TestSimpleTaskRunner), 106 : task_runner_(new base::TestSimpleTaskRunner),
107 factory_(new RegistryTestMockFactory), 107 factory_(new RegistryTestMockFactory),
108 backing_store_( 108 backing_store_(
109 new MockIDBBackingStore(factory_.get(), task_runner_.get())), 109 new MockIDBBackingStore(factory_.get(), task_runner_.get())),
110 registry_(new IndexedDBActiveBlobRegistry(backing_store_.get())) {} 110 registry_(base::MakeUnique<IndexedDBActiveBlobRegistry>(
111 backing_store_.get())) {}
111 112
112 void RunUntilIdle() { task_runner_->RunUntilIdle(); } 113 void RunUntilIdle() { task_runner_->RunUntilIdle(); }
113 RegistryTestMockFactory* factory() const { return factory_.get(); } 114 RegistryTestMockFactory* factory() const { return factory_.get(); }
114 MockIDBBackingStore* backing_store() const { return backing_store_.get(); } 115 MockIDBBackingStore* backing_store() const { return backing_store_.get(); }
115 IndexedDBActiveBlobRegistry* registry() const { return registry_.get(); } 116 IndexedDBActiveBlobRegistry* registry() const { return registry_.get(); }
116 117
117 private: 118 private:
118 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; 119 scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
119 scoped_refptr<RegistryTestMockFactory> factory_; 120 scoped_refptr<RegistryTestMockFactory> factory_;
120 scoped_refptr<MockIDBBackingStore> backing_store_; 121 scoped_refptr<MockIDBBackingStore> backing_store_;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 RunUntilIdle(); 273 RunUntilIdle();
273 274
274 // Nothing changes. 275 // Nothing changes.
275 EXPECT_TRUE(factory()->CheckSingleOriginInUse(backing_store()->origin())); 276 EXPECT_TRUE(factory()->CheckSingleOriginInUse(backing_store()->origin()));
276 EXPECT_TRUE(backing_store()->CheckUnusedBlobsEmpty()); 277 EXPECT_TRUE(backing_store()->CheckUnusedBlobsEmpty());
277 } 278 }
278 279
279 } // namespace 280 } // namespace
280 281
281 } // namespace content 282 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_backing_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698