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/recursive_operation_delegate.h" | 5 #include "storage/browser/fileapi/recursive_operation_delegate.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/message_loop/message_loop_proxy.h" | 14 #include "base/message_loop/message_loop_proxy.h" |
15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
16 #include "content/public/test/sandbox_file_system_test_helper.h" | 16 #include "content/public/test/sandbox_file_system_test_helper.h" |
| 17 #include "storage/browser/fileapi/file_system_file_util.h" |
| 18 #include "storage/browser/fileapi/file_system_operation.h" |
| 19 #include "storage/browser/fileapi/file_system_operation_runner.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "webkit/browser/fileapi/file_system_file_util.h" | |
19 #include "webkit/browser/fileapi/file_system_operation.h" | |
20 #include "webkit/browser/fileapi/file_system_operation_runner.h" | |
21 | 21 |
22 using storage::FileSystemContext; | 22 using storage::FileSystemContext; |
23 using storage::FileSystemOperationContext; | 23 using storage::FileSystemOperationContext; |
24 using storage::FileSystemURL; | 24 using storage::FileSystemURL; |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 namespace { | 27 namespace { |
28 | 28 |
29 class LoggingRecursiveOperation : public storage::RecursiveOperationDelegate { | 29 class LoggingRecursiveOperation : public storage::RecursiveOperationDelegate { |
30 public: | 30 public: |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 base::Bind(&ReportStatus, &error))); | 275 base::Bind(&ReportStatus, &error))); |
276 operation->RunRecursively(); | 276 operation->RunRecursively(); |
277 | 277 |
278 // Invoke Cancel(), after 5 times message posting. | 278 // Invoke Cancel(), after 5 times message posting. |
279 CallCancelLater(operation.get(), 5); | 279 CallCancelLater(operation.get(), 5); |
280 base::RunLoop().RunUntilIdle(); | 280 base::RunLoop().RunUntilIdle(); |
281 ASSERT_EQ(base::File::FILE_ERROR_ABORT, error); | 281 ASSERT_EQ(base::File::FILE_ERROR_ABORT, error); |
282 } | 282 } |
283 | 283 |
284 } // namespace content | 284 } // namespace content |
OLD | NEW |