| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| 11 #include <sstream> | 11 #include <sstream> |
| 12 #include <tuple> | 12 #include <tuple> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/bind.h" | 15 #include "base/bind.h" |
| 16 #include "base/files/file_util.h" | 16 #include "base/files/file_util.h" |
| 17 #include "base/files/scoped_temp_dir.h" | 17 #include "base/files/scoped_temp_dir.h" |
| 18 #include "base/macros.h" | 18 #include "base/macros.h" |
| 19 #include "base/memory/ptr_util.h" | 19 #include "base/memory/ptr_util.h" |
| 20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
| 21 #include "base/run_loop.h" | 21 #include "base/run_loop.h" |
| 22 #include "base/stl_util.h" | 22 #include "base/stl_util.h" |
| 23 #include "base/sys_info.h" | 23 #include "base/sys_info.h" |
| 24 #include "base/test/histogram_tester.h" | 24 #include "base/test/histogram_tester.h" |
| 25 #include "base/test/scoped_task_environment.h" | 25 #include "base/test/scoped_task_environment.h" |
| 26 #include "base/threading/thread_task_runner_handle.h" | 26 #include "base/threading/thread_task_runner_handle.h" |
| 27 #include "base/time/time.h" | 27 #include "base/time/time.h" |
| 28 #include "content/public/test/mock_storage_client.h" | |
| 29 #include "storage/browser/quota/quota_database.h" | 28 #include "storage/browser/quota/quota_database.h" |
| 30 #include "storage/browser/quota/quota_manager.h" | 29 #include "storage/browser/quota/quota_manager.h" |
| 31 #include "storage/browser/quota/quota_manager_proxy.h" | 30 #include "storage/browser/quota/quota_manager_proxy.h" |
| 32 #include "storage/browser/test/mock_special_storage_policy.h" | 31 #include "storage/browser/test/mock_special_storage_policy.h" |
| 32 #include "storage/browser/test/mock_storage_client.h" |
| 33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
| 34 #include "url/gurl.h" | 34 #include "url/gurl.h" |
| 35 | 35 |
| 36 using storage::kQuotaErrorAbort; | 36 using storage::kQuotaErrorAbort; |
| 37 using storage::kQuotaErrorInvalidModification; | 37 using storage::kQuotaErrorInvalidModification; |
| 38 using storage::kQuotaErrorNotSupported; | 38 using storage::kQuotaErrorNotSupported; |
| 39 using storage::kQuotaStatusOk; | 39 using storage::kQuotaStatusOk; |
| 40 using storage::kQuotaStatusUnknown; | 40 using storage::kQuotaStatusUnknown; |
| 41 using storage::kStorageTypePersistent; | 41 using storage::kStorageTypePersistent; |
| 42 using storage::kStorageTypeSyncable; | 42 using storage::kStorageTypeSyncable; |
| (...skipping 2219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2262 GetUsageAndQuotaForWebApps(kEpheremalOrigin, kTemp); | 2262 GetUsageAndQuotaForWebApps(kEpheremalOrigin, kTemp); |
| 2263 base::RunLoop().RunUntilIdle(); | 2263 base::RunLoop().RunUntilIdle(); |
| 2264 EXPECT_EQ(quota_manager()->settings().session_only_per_host_quota, quota()); | 2264 EXPECT_EQ(quota_manager()->settings().session_only_per_host_quota, quota()); |
| 2265 | 2265 |
| 2266 GetUsageAndQuotaForWebApps(kEpheremalOrigin, kPerm); | 2266 GetUsageAndQuotaForWebApps(kEpheremalOrigin, kPerm); |
| 2267 base::RunLoop().RunUntilIdle(); | 2267 base::RunLoop().RunUntilIdle(); |
| 2268 EXPECT_EQ(0, quota()); | 2268 EXPECT_EQ(0, quota()); |
| 2269 } | 2269 } |
| 2270 | 2270 |
| 2271 } // namespace content | 2271 } // namespace content |
| OLD | NEW |