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

Side by Side Diff: webkit/browser/quota/mock_quota_manager_unittest.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
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 5
6 #include <set> 6 #include <set>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 26 matching lines...) Expand all
37 MockQuotaManagerTest() 37 MockQuotaManagerTest()
38 : weak_factory_(this), 38 : weak_factory_(this),
39 deletion_callback_count_(0) { 39 deletion_callback_count_(0) {
40 } 40 }
41 41
42 virtual void SetUp() { 42 virtual void SetUp() {
43 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); 43 ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
44 policy_ = new MockSpecialStoragePolicy; 44 policy_ = new MockSpecialStoragePolicy;
45 manager_ = new MockQuotaManager(false /* is_incognito */, 45 manager_ = new MockQuotaManager(false /* is_incognito */,
46 data_dir_.path(), 46 data_dir_.path(),
47 base::MessageLoopProxy::current(), 47 base::MessageLoopProxy::current().get(),
48 base::MessageLoopProxy::current(), 48 base::MessageLoopProxy::current().get(),
49 policy_.get()); 49 policy_.get());
50 } 50 }
51 51
52 virtual void TearDown() { 52 virtual void TearDown() {
53 // Make sure the quota manager cleans up correctly. 53 // Make sure the quota manager cleans up correctly.
54 manager_ = NULL; 54 manager_ = NULL;
55 base::MessageLoop::current()->RunUntilIdle(); 55 base::MessageLoop::current()->RunUntilIdle();
56 } 56 }
57 57
58 void GetModifiedOrigins(StorageType type, base::Time since) { 58 void GetModifiedOrigins(StorageType type, base::Time since) {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 GetModifiedOrigins(kTemporary, now - a_minute); 214 GetModifiedOrigins(kTemporary, now - a_minute);
215 base::MessageLoop::current()->RunUntilIdle(); 215 base::MessageLoop::current()->RunUntilIdle();
216 216
217 EXPECT_EQ(kTemporary, type()); 217 EXPECT_EQ(kTemporary, type());
218 EXPECT_EQ(1UL, origins().size()); 218 EXPECT_EQ(1UL, origins().size());
219 EXPECT_EQ(0UL, origins().count(kOrigin1)); 219 EXPECT_EQ(0UL, origins().count(kOrigin1));
220 EXPECT_EQ(1UL, origins().count(kOrigin2)); 220 EXPECT_EQ(1UL, origins().count(kOrigin2));
221 } 221 }
222 } // Namespace quota 222 } // Namespace quota
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/syncable/syncable_file_system_util_unittest.cc ('k') | webkit/browser/quota/quota_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698