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

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

Issue 136573007: Quota: Factor out (Mock)QuotaManagerProxy into its own file for readability (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 6 years, 11 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_proxy.cc ('k') | webkit/storage_browser.gyp » ('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 <algorithm>
5 #include <set> 6 #include <set>
6 #include <sstream> 7 #include <sstream>
7 #include <vector> 8 #include <vector>
8 9
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/file_util.h" 11 #include "base/file_util.h"
11 #include "base/files/scoped_temp_dir.h" 12 #include "base/files/scoped_temp_dir.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
14 #include "base/message_loop/message_loop_proxy.h" 15 #include "base/message_loop/message_loop_proxy.h"
15 #include "base/run_loop.h" 16 #include "base/run_loop.h"
16 #include "base/stl_util.h" 17 #include "base/stl_util.h"
17 #include "base/sys_info.h" 18 #include "base/sys_info.h"
18 #include "base/time/time.h" 19 #include "base/time/time.h"
19 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
20 #include "url/gurl.h" 21 #include "url/gurl.h"
21 #include "webkit/browser/quota/mock_special_storage_policy.h" 22 #include "webkit/browser/quota/mock_special_storage_policy.h"
22 #include "webkit/browser/quota/mock_storage_client.h" 23 #include "webkit/browser/quota/mock_storage_client.h"
23 #include "webkit/browser/quota/quota_database.h" 24 #include "webkit/browser/quota/quota_database.h"
24 #include "webkit/browser/quota/quota_manager.h" 25 #include "webkit/browser/quota/quota_manager.h"
26 #include "webkit/browser/quota/quota_manager_proxy.h"
25 27
26 using base::MessageLoopProxy; 28 using base::MessageLoopProxy;
27 29
28 namespace quota { 30 namespace quota {
29 31
30 namespace { 32 namespace {
31 33
32 // For shorter names. 34 // For shorter names.
33 const StorageType kTemp = kStorageTypeTemporary; 35 const StorageType kTemp = kStorageTypeTemporary;
34 const StorageType kPerm = kStorageTypePersistent; 36 const StorageType kPerm = kStorageTypePersistent;
(...skipping 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after
2156 EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota()); 2158 EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota());
2157 2159
2158 GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp); 2160 GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp);
2159 base::RunLoop().RunUntilIdle(); 2161 base::RunLoop().RunUntilIdle();
2160 EXPECT_EQ(kQuotaStatusOk, status()); 2162 EXPECT_EQ(kQuotaStatusOk, status());
2161 EXPECT_EQ(10, usage()); 2163 EXPECT_EQ(10, usage());
2162 EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota()); 2164 EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota());
2163 } 2165 }
2164 2166
2165 } // namespace quota 2167 } // namespace quota
OLDNEW
« no previous file with comments | « webkit/browser/quota/quota_manager_proxy.cc ('k') | webkit/storage_browser.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698