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

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

Issue 16155009: Update webkit/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « webkit/browser/quota/quota_manager.cc ('k') | webkit/browser/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 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 #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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 68
69 virtual void TearDown() { 69 virtual void TearDown() {
70 // Make sure the quota manager cleans up correctly. 70 // Make sure the quota manager cleans up correctly.
71 quota_manager_ = NULL; 71 quota_manager_ = NULL;
72 base::MessageLoop::current()->RunUntilIdle(); 72 base::MessageLoop::current()->RunUntilIdle();
73 } 73 }
74 74
75 protected: 75 protected:
76 void ResetQuotaManager(bool is_incognito) { 76 void ResetQuotaManager(bool is_incognito) {
77 quota_manager_ = new QuotaManager( 77 quota_manager_ = new QuotaManager(is_incognito,
78 is_incognito, 78 data_dir_.path(),
79 data_dir_.path(), 79 MessageLoopProxy::current(),
80 MessageLoopProxy::current(), 80 MessageLoopProxy::current(),
81 MessageLoopProxy::current(), 81 mock_special_storage_policy_.get());
82 mock_special_storage_policy_);
83 // Don't (automatically) start the eviction for testing. 82 // Don't (automatically) start the eviction for testing.
84 quota_manager_->eviction_disabled_ = true; 83 quota_manager_->eviction_disabled_ = true;
85 // Don't query the hard disk for remaining capacity. 84 // Don't query the hard disk for remaining capacity.
86 quota_manager_->get_disk_space_fn_ = &GetAvailableDiskSpaceForTest; 85 quota_manager_->get_disk_space_fn_ = &GetAvailableDiskSpaceForTest;
87 additional_callback_count_ = 0; 86 additional_callback_count_ = 0;
88 } 87 }
89 88
90 MockStorageClient* CreateClient( 89 MockStorageClient* CreateClient(
91 const MockOriginData* mock_data, 90 const MockOriginData* mock_data,
92 size_t mock_data_size, 91 size_t mock_data_size,
(...skipping 2063 matching lines...) Expand 10 before | Expand all | Expand 10 after
2156 EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota()); 2155 EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota());
2157 2156
2158 GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp); 2157 GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp);
2159 base::MessageLoop::current()->RunUntilIdle(); 2158 base::MessageLoop::current()->RunUntilIdle();
2160 EXPECT_EQ(kQuotaStatusOk, status()); 2159 EXPECT_EQ(kQuotaStatusOk, status());
2161 EXPECT_EQ(10, usage()); 2160 EXPECT_EQ(10, usage());
2162 EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota()); 2161 EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota());
2163 } 2162 }
2164 2163
2165 } // namespace quota 2164 } // namespace quota
OLDNEW
« no previous file with comments | « webkit/browser/quota/quota_manager.cc ('k') | webkit/browser/quota/quota_task.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698