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

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

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/ppapi/quota_file_io_unittest.cc ('k') | webkit/quota/mock_storage_client.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/scoped_callback_factory.h" 9 #include "base/memory/scoped_callback_factory.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 21 matching lines...) Expand all
32 : callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), 32 : callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
33 deletion_callback_count_(0) { 33 deletion_callback_count_(0) {
34 } 34 }
35 35
36 void SetUp() { 36 void SetUp() {
37 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); 37 ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
38 policy_ = new MockSpecialStoragePolicy; 38 policy_ = new MockSpecialStoragePolicy;
39 manager_ = new MockQuotaManager( 39 manager_ = new MockQuotaManager(
40 false /* is_incognito */, 40 false /* is_incognito */,
41 data_dir_.path(), 41 data_dir_.path(),
42 base::MessageLoopProxy::CreateForCurrentThread(), 42 base::MessageLoopProxy::current(),
43 base::MessageLoopProxy::CreateForCurrentThread(), 43 base::MessageLoopProxy::current(),
44 policy_); 44 policy_);
45 } 45 }
46 46
47 void TearDown() { 47 void TearDown() {
48 // Make sure the quota manager cleans up correctly. 48 // Make sure the quota manager cleans up correctly.
49 manager_ = NULL; 49 manager_ = NULL;
50 MessageLoop::current()->RunAllPending(); 50 MessageLoop::current()->RunAllPending();
51 } 51 }
52 52
53 void GetModifiedOrigins(StorageType type, base::Time since) { 53 void GetModifiedOrigins(StorageType type, base::Time since) {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 GetModifiedOrigins(kStorageTypeTemporary, now - a_minute); 172 GetModifiedOrigins(kStorageTypeTemporary, now - a_minute);
173 MessageLoop::current()->RunAllPending(); 173 MessageLoop::current()->RunAllPending();
174 174
175 EXPECT_EQ(kStorageTypeTemporary, type()); 175 EXPECT_EQ(kStorageTypeTemporary, type());
176 EXPECT_EQ(1UL, origins().size()); 176 EXPECT_EQ(1UL, origins().size());
177 EXPECT_EQ(0UL, origins().count(kOrigin1)); 177 EXPECT_EQ(0UL, origins().count(kOrigin1));
178 EXPECT_EQ(1UL, origins().count(kOrigin2)); 178 EXPECT_EQ(1UL, origins().count(kOrigin2));
179 } 179 }
180 } // Namespace quota 180 } // Namespace quota
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/quota_file_io_unittest.cc ('k') | webkit/quota/mock_storage_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698