OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "content/browser/blob_storage/blob_dispatcher_host.h" | 5 #include "content/browser/blob_storage/blob_dispatcher_host.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <tuple> | 8 #include <tuple> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } | 108 } |
109 // We run the run loop to initialize the chrome blob storage context. | 109 // We run the run loop to initialize the chrome blob storage context. |
110 base::RunLoop().RunUntilIdle(); | 110 base::RunLoop().RunUntilIdle(); |
111 context_ = chrome_blob_storage_context_->context(); | 111 context_ = chrome_blob_storage_context_->context(); |
112 ASSERT_TRUE(context_); | 112 ASSERT_TRUE(context_); |
113 | 113 |
114 storage::BlobStorageLimits limits; | 114 storage::BlobStorageLimits limits; |
115 limits.max_ipc_memory_size = kTestBlobStorageIPCThresholdBytes; | 115 limits.max_ipc_memory_size = kTestBlobStorageIPCThresholdBytes; |
116 limits.max_shared_memory_size = kTestBlobStorageMaxSharedMemoryBytes; | 116 limits.max_shared_memory_size = kTestBlobStorageMaxSharedMemoryBytes; |
117 limits.max_blob_in_memory_space = kTestBlobStorageMaxBlobMemorySize; | 117 limits.max_blob_in_memory_space = kTestBlobStorageMaxBlobMemorySize; |
118 limits.max_blob_disk_space = kTestBlobStorageMaxDiskSpace; | 118 limits.desired_max_disk_space = kTestBlobStorageMaxDiskSpace; |
| 119 limits.effective_max_disk_space = kTestBlobStorageMaxDiskSpace; |
119 limits.min_page_file_size = kTestBlobStorageMinFileSizeBytes; | 120 limits.min_page_file_size = kTestBlobStorageMinFileSizeBytes; |
120 limits.max_file_size = kTestBlobStorageMaxFileSizeBytes; | 121 limits.max_file_size = kTestBlobStorageMaxFileSizeBytes; |
121 context_->mutable_memory_controller()->set_limits_for_testing(limits); | 122 context_->mutable_memory_controller()->set_limits_for_testing(limits); |
122 } | 123 } |
123 | 124 |
124 void ExpectBlobNotExist(const std::string& id) { | 125 void ExpectBlobNotExist(const std::string& id) { |
125 EXPECT_FALSE(context_->registry().HasEntry(id)); | 126 EXPECT_FALSE(context_->registry().HasEntry(id)); |
126 EXPECT_FALSE(host_->IsInUseInHost(id)); | 127 EXPECT_FALSE(host_->IsInUseInHost(id)); |
127 EXPECT_FALSE(IsBeingBuiltInHost(id)); | 128 EXPECT_FALSE(IsBeingBuiltInHost(id)); |
128 } | 129 } |
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1087 EXPECT_EQ(BlobStatus::ERR_SOURCE_DIED_IN_TRANSIT, error_code); | 1088 EXPECT_EQ(BlobStatus::ERR_SOURCE_DIED_IN_TRANSIT, error_code); |
1088 EXPECT_FALSE(same_host_built); | 1089 EXPECT_FALSE(same_host_built); |
1089 EXPECT_EQ(BlobStatus::ERR_REFERENCED_BLOB_BROKEN, same_host_error_code); | 1090 EXPECT_EQ(BlobStatus::ERR_REFERENCED_BLOB_BROKEN, same_host_error_code); |
1090 EXPECT_FALSE(other_host_built); | 1091 EXPECT_FALSE(other_host_built); |
1091 EXPECT_EQ(BlobStatus::ERR_REFERENCED_BLOB_BROKEN, other_host_error_code); | 1092 EXPECT_EQ(BlobStatus::ERR_REFERENCED_BLOB_BROKEN, other_host_error_code); |
1092 | 1093 |
1093 sink_.ClearMessages(); | 1094 sink_.ClearMessages(); |
1094 } | 1095 } |
1095 | 1096 |
1096 } // namespace content | 1097 } // namespace content |
OLD | NEW |