OLD | NEW |
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 "content/browser/renderer_host/pepper/quota_reservation.h" | 5 #include "content/browser/renderer_host/pepper/quota_reservation.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 std::unique_ptr<QuotaReservationManager::QuotaBackend>( | 83 std::unique_ptr<QuotaReservationManager::QuotaBackend>( |
84 new FakeBackend))); | 84 new FakeBackend))); |
85 } | 85 } |
86 | 86 |
87 void TearDown() override { | 87 void TearDown() override { |
88 reservation_manager_.reset(); | 88 reservation_manager_.reset(); |
89 base::RunLoop().RunUntilIdle(); | 89 base::RunLoop().RunUntilIdle(); |
90 } | 90 } |
91 | 91 |
92 base::FilePath MakeFilePath(const base::FilePath::StringType& file_name) { | 92 base::FilePath MakeFilePath(const base::FilePath::StringType& file_name) { |
93 return work_dir_.path().Append(file_name); | 93 return work_dir_.GetPath().Append(file_name); |
94 } | 94 } |
95 | 95 |
96 storage::FileSystemURL MakeFileSystemURL( | 96 storage::FileSystemURL MakeFileSystemURL( |
97 const base::FilePath::StringType& file_name) { | 97 const base::FilePath::StringType& file_name) { |
98 return storage::FileSystemURL::CreateForTest( | 98 return storage::FileSystemURL::CreateForTest( |
99 GURL(kOrigin), kType, MakeFilePath(file_name)); | 99 GURL(kOrigin), kType, MakeFilePath(file_name)); |
100 } | 100 } |
101 | 101 |
102 scoped_refptr<QuotaReservation> CreateQuotaReservation( | 102 scoped_refptr<QuotaReservation> CreateQuotaReservation( |
103 scoped_refptr<storage::QuotaReservation> reservation, | 103 scoped_refptr<storage::QuotaReservation> reservation, |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 EXPECT_EQ(amount, reserved_quota); | 243 EXPECT_EQ(amount, reserved_quota); |
244 EXPECT_EQ(2U, file_growths.size()); | 244 EXPECT_EQ(2U, file_growths.size()); |
245 EXPECT_EQ(file1_size, file_growths[kFile1ID].max_written_offset); | 245 EXPECT_EQ(file1_size, file_growths[kFile1ID].max_written_offset); |
246 EXPECT_EQ(file3_size, file_growths[kFile3ID].max_written_offset); | 246 EXPECT_EQ(file3_size, file_growths[kFile3ID].max_written_offset); |
247 | 247 |
248 test->CloseFile(kFile1ID, ppapi::FileGrowth(file1_size, 0)); | 248 test->CloseFile(kFile1ID, ppapi::FileGrowth(file1_size, 0)); |
249 test->CloseFile(kFile3ID, ppapi::FileGrowth(file3_size, 0)); | 249 test->CloseFile(kFile3ID, ppapi::FileGrowth(file3_size, 0)); |
250 } | 250 } |
251 | 251 |
252 } // namespace content | 252 } // namespace content |
OLD | NEW |