| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 class FileSystemQuotaClientTest : public testing::Test { | 43 class FileSystemQuotaClientTest : public testing::Test { |
| 44 public: | 44 public: |
| 45 FileSystemQuotaClientTest() | 45 FileSystemQuotaClientTest() |
| 46 : additional_callback_count_(0), | 46 : additional_callback_count_(0), |
| 47 deletion_status_(storage::kQuotaStatusUnknown), | 47 deletion_status_(storage::kQuotaStatusUnknown), |
| 48 weak_factory_(this) {} | 48 weak_factory_(this) {} |
| 49 | 49 |
| 50 void SetUp() override { | 50 void SetUp() override { |
| 51 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 51 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
| 52 file_system_context_ = CreateFileSystemContextForTesting( | 52 file_system_context_ = |
| 53 NULL, data_dir_.path()); | 53 CreateFileSystemContextForTesting(NULL, data_dir_.GetPath()); |
| 54 } | 54 } |
| 55 | 55 |
| 56 struct TestFile { | 56 struct TestFile { |
| 57 bool isDirectory; | 57 bool isDirectory; |
| 58 const char* name; | 58 const char* name; |
| 59 int64_t size; | 59 int64_t size; |
| 60 const char* origin_url; | 60 const char* origin_url; |
| 61 storage::StorageType type; | 61 storage::StorageType type; |
| 62 }; | 62 }; |
| 63 | 63 |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 GetOriginUsage(quota_client.get(), | 562 GetOriginUsage(quota_client.get(), |
| 563 "https://bar.com/", | 563 "https://bar.com/", |
| 564 kPersistent)); | 564 kPersistent)); |
| 565 EXPECT_EQ(64 + file_paths_cost_temporary_bar_https, | 565 EXPECT_EQ(64 + file_paths_cost_temporary_bar_https, |
| 566 GetOriginUsage(quota_client.get(), | 566 GetOriginUsage(quota_client.get(), |
| 567 "https://bar.com/", | 567 "https://bar.com/", |
| 568 kTemporary)); | 568 kTemporary)); |
| 569 } | 569 } |
| 570 | 570 |
| 571 } // namespace content | 571 } // namespace content |
| OLD | NEW |