| 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/file_util.h" | 7 #include "base/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/platform_file.h" | 10 #include "base/platform_file.h" |
| 11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
| 12 #include "content/public/test/async_file_test_helper.h" |
| 12 #include "content/public/test/test_file_system_context.h" | 13 #include "content/public/test/test_file_system_context.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 14 #include "url/gurl.h" | 15 #include "url/gurl.h" |
| 15 #include "webkit/browser/fileapi/async_file_test_helper.h" | |
| 16 #include "webkit/browser/fileapi/file_system_context.h" | 16 #include "webkit/browser/fileapi/file_system_context.h" |
| 17 #include "webkit/browser/fileapi/file_system_quota_client.h" | 17 #include "webkit/browser/fileapi/file_system_quota_client.h" |
| 18 #include "webkit/browser/fileapi/file_system_usage_cache.h" | 18 #include "webkit/browser/fileapi/file_system_usage_cache.h" |
| 19 #include "webkit/browser/fileapi/obfuscated_file_util.h" | 19 #include "webkit/browser/fileapi/obfuscated_file_util.h" |
| 20 #include "webkit/common/fileapi/file_system_types.h" | 20 #include "webkit/common/fileapi/file_system_types.h" |
| 21 #include "webkit/common/fileapi/file_system_util.h" | 21 #include "webkit/common/fileapi/file_system_util.h" |
| 22 #include "webkit/common/quota/quota_types.h" | 22 #include "webkit/common/quota/quota_types.h" |
| 23 | 23 |
| 24 using fileapi::AsyncFileTestHelper; | 24 using content::AsyncFileTestHelper; |
| 25 using fileapi::FileSystemQuotaClient; | 25 using fileapi::FileSystemQuotaClient; |
| 26 using fileapi::FileSystemType; | 26 using fileapi::FileSystemType; |
| 27 using fileapi::FileSystemURL; | 27 using fileapi::FileSystemURL; |
| 28 | 28 |
| 29 namespace content { | 29 namespace content { |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 const char kDummyURL1[] = "http://www.dummy.org"; | 32 const char kDummyURL1[] = "http://www.dummy.org"; |
| 33 const char kDummyURL2[] = "http://www.example.com"; | 33 const char kDummyURL2[] = "http://www.example.com"; |
| 34 const char kDummyURL3[] = "http://www.bleh"; | 34 const char kDummyURL3[] = "http://www.bleh"; |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 GetOriginUsage(quota_client.get(), | 563 GetOriginUsage(quota_client.get(), |
| 564 "https://bar.com/", | 564 "https://bar.com/", |
| 565 kPersistent)); | 565 kPersistent)); |
| 566 EXPECT_EQ(64 + file_paths_cost_temporary_bar_https, | 566 EXPECT_EQ(64 + file_paths_cost_temporary_bar_https, |
| 567 GetOriginUsage(quota_client.get(), | 567 GetOriginUsage(quota_client.get(), |
| 568 "https://bar.com/", | 568 "https://bar.com/", |
| 569 kTemporary)); | 569 kTemporary)); |
| 570 } | 570 } |
| 571 | 571 |
| 572 } // namespace content | 572 } // namespace content |
| OLD | NEW |