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 "webkit/browser/fileapi/file_system_operation_impl.h" | 5 #include "webkit/browser/fileapi/file_system_operation_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "content/public/test/sandbox_file_system_test_helper.h" | 15 #include "content/public/test/sandbox_file_system_test_helper.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "url/gurl.h" | 17 #include "url/gurl.h" |
18 #include "webkit/browser/fileapi/async_file_test_helper.h" | 18 #include "webkit/browser/fileapi/async_file_test_helper.h" |
19 #include "webkit/browser/fileapi/file_system_context.h" | 19 #include "webkit/browser/fileapi/file_system_context.h" |
20 #include "webkit/browser/fileapi/file_system_file_util.h" | 20 #include "webkit/browser/fileapi/file_system_file_util.h" |
21 #include "webkit/browser/fileapi/file_system_operation_context.h" | 21 #include "webkit/browser/fileapi/file_system_operation_context.h" |
22 #include "webkit/browser/fileapi/file_system_operation_runner.h" | 22 #include "webkit/browser/fileapi/file_system_operation_runner.h" |
23 #include "webkit/browser/fileapi/mock_file_change_observer.h" | 23 #include "webkit/browser/fileapi/mock_file_change_observer.h" |
24 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" | 24 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" |
25 #include "webkit/browser/quota/mock_quota_manager.h" | 25 #include "webkit/browser/quota/mock_quota_manager.h" |
| 26 #include "webkit/browser/quota/mock_quota_manager_proxy.h" |
26 #include "webkit/browser/quota/quota_manager.h" | 27 #include "webkit/browser/quota/quota_manager.h" |
| 28 #include "webkit/browser/quota/quota_manager_proxy.h" |
27 #include "webkit/common/blob/shareable_file_reference.h" | 29 #include "webkit/common/blob/shareable_file_reference.h" |
28 #include "webkit/common/fileapi/file_system_util.h" | 30 #include "webkit/common/fileapi/file_system_util.h" |
29 | 31 |
30 using fileapi::AsyncFileTestHelper; | 32 using fileapi::AsyncFileTestHelper; |
31 using fileapi::FileSystemOperation; | 33 using fileapi::FileSystemOperation; |
32 using fileapi::FileSystemOperationContext; | 34 using fileapi::FileSystemOperationContext; |
33 using fileapi::FileSystemOperationRunner; | 35 using fileapi::FileSystemOperationRunner; |
34 using fileapi::FileSystemURL; | 36 using fileapi::FileSystemURL; |
35 using quota::QuotaManager; | 37 using quota::QuotaManager; |
36 using quota::QuotaManagerProxy; | 38 using quota::QuotaManagerProxy; |
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 base::RunLoop().RunUntilIdle(); | 1282 base::RunLoop().RunUntilIdle(); |
1281 | 1283 |
1282 expected_usage += grandchild_file_size + grandchild_path_cost; | 1284 expected_usage += grandchild_file_size + grandchild_path_cost; |
1283 usage = GetUsage(); | 1285 usage = GetUsage(); |
1284 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, | 1286 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, |
1285 GetDataSizeOnDisk()); | 1287 GetDataSizeOnDisk()); |
1286 EXPECT_EQ(expected_usage, usage); | 1288 EXPECT_EQ(expected_usage, usage); |
1287 } | 1289 } |
1288 | 1290 |
1289 } // namespace content | 1291 } // namespace content |
OLD | NEW |