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 quota::QuotaManager; | 32 using quota::QuotaManager; |
31 using quota::QuotaManagerProxy; | 33 using quota::QuotaManagerProxy; |
32 using webkit_blob::ShareableFileReference; | 34 using webkit_blob::ShareableFileReference; |
33 | 35 |
34 namespace fileapi { | 36 namespace fileapi { |
35 | 37 |
36 namespace { | 38 namespace { |
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1274 base::RunLoop().RunUntilIdle(); | 1276 base::RunLoop().RunUntilIdle(); |
1275 | 1277 |
1276 expected_usage += grandchild_file_size + grandchild_path_cost; | 1278 expected_usage += grandchild_file_size + grandchild_path_cost; |
1277 usage = GetUsage(); | 1279 usage = GetUsage(); |
1278 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, | 1280 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, |
1279 GetDataSizeOnDisk()); | 1281 GetDataSizeOnDisk()); |
1280 EXPECT_EQ(expected_usage, usage); | 1282 EXPECT_EQ(expected_usage, usage); |
1281 } | 1283 } |
1282 | 1284 |
1283 } // namespace fileapi | 1285 } // namespace fileapi |
OLD | NEW |