OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <algorithm> |
6 #include <set> | 6 #include <set> |
7 #include <sstream> | 7 #include <sstream> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/message_loop/message_loop_proxy.h" | 15 #include "base/message_loop/message_loop_proxy.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "base/stl_util.h" | 17 #include "base/stl_util.h" |
18 #include "base/sys_info.h" | 18 #include "base/sys_info.h" |
19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
20 #include "content/public/test/mock_special_storage_policy.h" | 20 #include "content/public/test/mock_special_storage_policy.h" |
21 #include "content/public/test/mock_storage_client.h" | 21 #include "content/public/test/mock_storage_client.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
24 #include "webkit/browser/quota/quota_database.h" | 24 #include "storage/browser/quota/quota_database.h" |
25 #include "webkit/browser/quota/quota_manager.h" | 25 #include "storage/browser/quota/quota_manager.h" |
26 #include "webkit/browser/quota/quota_manager_proxy.h" | 26 #include "storage/browser/quota/quota_manager_proxy.h" |
27 | 27 |
28 using base::MessageLoopProxy; | 28 using base::MessageLoopProxy; |
29 using quota::kQuotaErrorAbort; | 29 using quota::kQuotaErrorAbort; |
30 using quota::kQuotaErrorInvalidModification; | 30 using quota::kQuotaErrorInvalidModification; |
31 using quota::kQuotaErrorNotSupported; | 31 using quota::kQuotaErrorNotSupported; |
32 using quota::kQuotaStatusOk; | 32 using quota::kQuotaStatusOk; |
33 using quota::kQuotaStatusUnknown; | 33 using quota::kQuotaStatusUnknown; |
34 using quota::kStorageTypePersistent; | 34 using quota::kStorageTypePersistent; |
35 using quota::kStorageTypeSyncable; | 35 using quota::kStorageTypeSyncable; |
36 using quota::kStorageTypeTemporary; | 36 using quota::kStorageTypeTemporary; |
(...skipping 2144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2181 EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota()); | 2181 EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota()); |
2182 | 2182 |
2183 GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp); | 2183 GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp); |
2184 base::RunLoop().RunUntilIdle(); | 2184 base::RunLoop().RunUntilIdle(); |
2185 EXPECT_EQ(kQuotaStatusOk, status()); | 2185 EXPECT_EQ(kQuotaStatusOk, status()); |
2186 EXPECT_EQ(10, usage()); | 2186 EXPECT_EQ(10, usage()); |
2187 EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota()); | 2187 EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota()); |
2188 } | 2188 } |
2189 | 2189 |
2190 } // namespace content | 2190 } // namespace content |
OLD | NEW |