| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 } // namespace | 38 } // namespace |
| 39 | 39 |
| 40 class FileSystemQuotaClientTest : public testing::Test { | 40 class FileSystemQuotaClientTest : public testing::Test { |
| 41 public: | 41 public: |
| 42 FileSystemQuotaClientTest() | 42 FileSystemQuotaClientTest() |
| 43 : weak_factory_(this), | 43 : weak_factory_(this), |
| 44 additional_callback_count_(0), | 44 additional_callback_count_(0), |
| 45 deletion_status_(storage::kQuotaStatusUnknown) {} | 45 deletion_status_(storage::kQuotaStatusUnknown) {} |
| 46 | 46 |
| 47 virtual void SetUp() { | 47 void SetUp() override { |
| 48 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 48 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
| 49 file_system_context_ = CreateFileSystemContextForTesting( | 49 file_system_context_ = CreateFileSystemContextForTesting( |
| 50 NULL, data_dir_.path()); | 50 NULL, data_dir_.path()); |
| 51 } | 51 } |
| 52 | 52 |
| 53 struct TestFile { | 53 struct TestFile { |
| 54 bool isDirectory; | 54 bool isDirectory; |
| 55 const char* name; | 55 const char* name; |
| 56 int64 size; | 56 int64 size; |
| 57 const char* origin_url; | 57 const char* origin_url; |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 GetOriginUsage(quota_client.get(), | 557 GetOriginUsage(quota_client.get(), |
| 558 "https://bar.com/", | 558 "https://bar.com/", |
| 559 kPersistent)); | 559 kPersistent)); |
| 560 EXPECT_EQ(64 + file_paths_cost_temporary_bar_https, | 560 EXPECT_EQ(64 + file_paths_cost_temporary_bar_https, |
| 561 GetOriginUsage(quota_client.get(), | 561 GetOriginUsage(quota_client.get(), |
| 562 "https://bar.com/", | 562 "https://bar.com/", |
| 563 kTemporary)); | 563 kTemporary)); |
| 564 } | 564 } |
| 565 | 565 |
| 566 } // namespace content | 566 } // namespace content |
| OLD | NEW |