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

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

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 | « webkit/plugins/ppapi/npobject_var.cc ('k') | webkit/quota/quota_task.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 (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 <set> 5 #include <set>
6 #include <sstream> 6 #include <sstream>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 : weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), 50 : weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
51 mock_time_counter_(0) { 51 mock_time_counter_(0) {
52 } 52 }
53 53
54 void SetUp() { 54 void SetUp() {
55 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); 55 ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
56 mock_special_storage_policy_ = new MockSpecialStoragePolicy; 56 mock_special_storage_policy_ = new MockSpecialStoragePolicy;
57 quota_manager_ = new QuotaManager( 57 quota_manager_ = new QuotaManager(
58 false /* is_incognito */, 58 false /* is_incognito */,
59 data_dir_.path(), 59 data_dir_.path(),
60 MessageLoopProxy::current(), 60 MessageLoopProxy::current().get(),
61 MessageLoopProxy::current(), 61 MessageLoopProxy::current().get(),
62 mock_special_storage_policy_); 62 mock_special_storage_policy_.get());
63 // Don't (automatically) start the eviction for testing. 63 // Don't (automatically) start the eviction for testing.
64 quota_manager_->eviction_disabled_ = true; 64 quota_manager_->eviction_disabled_ = true;
65 // Don't query the hard disk for remaining capacity. 65 // Don't query the hard disk for remaining capacity.
66 quota_manager_->get_disk_space_fn_ = &GetAvailableDiskSpaceForTest; 66 quota_manager_->get_disk_space_fn_ = &GetAvailableDiskSpaceForTest;
67 additional_callback_count_ = 0; 67 additional_callback_count_ = 0;
68 } 68 }
69 69
70 void TearDown() { 70 void TearDown() {
71 // Make sure the quota manager cleans up correctly. 71 // Make sure the quota manager cleans up correctly.
72 quota_manager_ = NULL; 72 quota_manager_ = NULL;
(...skipping 1973 matching lines...) Expand 10 before | Expand all | Expand 10 after
2046 EXPECT_EQ(predelete_foo_tmp - 2 - 1, usage()); 2046 EXPECT_EQ(predelete_foo_tmp - 2 - 1, usage());
2047 2047
2048 DeleteHostData("foo.com", kTemp, 2048 DeleteHostData("foo.com", kTemp,
2049 QuotaClient::kDatabase | QuotaClient::kIndexedDatabase); 2049 QuotaClient::kDatabase | QuotaClient::kIndexedDatabase);
2050 MessageLoop::current()->RunAllPending(); 2050 MessageLoop::current()->RunAllPending();
2051 GetHostUsage("foo.com", kTemp); 2051 GetHostUsage("foo.com", kTemp);
2052 MessageLoop::current()->RunAllPending(); 2052 MessageLoop::current()->RunAllPending();
2053 EXPECT_EQ(predelete_foo_tmp - 8 - 4 - 2 - 1, usage()); 2053 EXPECT_EQ(predelete_foo_tmp - 8 - 4 - 2 - 1, usage());
2054 } 2054 }
2055 } // namespace quota 2055 } // namespace quota
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/npobject_var.cc ('k') | webkit/quota/quota_task.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698