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

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

Issue 10540042: Move remaining webkit storage unit tests to content_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « webkit/quota/quota_manager_unittest.cc ('k') | webkit/tools/test_shell/test_shell.gypi » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <list> 5 #include <list>
6 #include <map> 6 #include <map>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 void set_min_available_disk_space_to_start_eviction(int64 value) const { 215 void set_min_available_disk_space_to_start_eviction(int64 value) const {
216 temporary_storage_evictor_->set_min_available_disk_space_to_start_eviction( 216 temporary_storage_evictor_->set_min_available_disk_space_to_start_eviction(
217 value); 217 value);
218 } 218 }
219 219
220 void reset_min_available_disk_space_to_start_eviction() const { 220 void reset_min_available_disk_space_to_start_eviction() const {
221 temporary_storage_evictor_-> 221 temporary_storage_evictor_->
222 reset_min_available_disk_space_to_start_eviction(); 222 reset_min_available_disk_space_to_start_eviction();
223 } 223 }
224 224
225 MessageLoop message_loop_;
225 scoped_ptr<MockQuotaEvictionHandler> quota_eviction_handler_; 226 scoped_ptr<MockQuotaEvictionHandler> quota_eviction_handler_;
226 scoped_ptr<QuotaTemporaryStorageEvictor> temporary_storage_evictor_; 227 scoped_ptr<QuotaTemporaryStorageEvictor> temporary_storage_evictor_;
227 228
228 int num_get_usage_and_quota_for_eviction_; 229 int num_get_usage_and_quota_for_eviction_;
229 230
230 base::WeakPtrFactory<QuotaTemporaryStorageEvictorTest> weak_factory_; 231 base::WeakPtrFactory<QuotaTemporaryStorageEvictorTest> weak_factory_;
231 232
232 DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictorTest); 233 DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictorTest);
233 }; 234 };
234 235
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 quota_eviction_handler()->set_available_space(1000000000); 425 quota_eviction_handler()->set_available_space(1000000000);
425 EXPECT_EQ(3000 + 200 + 500000, quota_eviction_handler()->GetUsage()); 426 EXPECT_EQ(3000 + 200 + 500000, quota_eviction_handler()->GetUsage());
426 set_repeated_eviction(false); 427 set_repeated_eviction(false);
427 temporary_storage_evictor()->Start(); 428 temporary_storage_evictor()->Start();
428 MessageLoop::current()->RunAllPending(); 429 MessageLoop::current()->RunAllPending();
429 // Nothing should have been evicted. 430 // Nothing should have been evicted.
430 EXPECT_EQ(3000 + 200 + 500000, quota_eviction_handler()->GetUsage()); 431 EXPECT_EQ(3000 + 200 + 500000, quota_eviction_handler()->GetUsage());
431 } 432 }
432 433
433 } // namespace quota 434 } // namespace quota
OLDNEW
« no previous file with comments | « webkit/quota/quota_manager_unittest.cc ('k') | webkit/tools/test_shell/test_shell.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698