| 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 "webkit/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 "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #include "webkit/browser/fileapi/file_system_file_util.h" | 18 #include "webkit/browser/fileapi/file_system_file_util.h" |
| 18 #include "webkit/browser/fileapi/file_system_operation.h" | 19 #include "webkit/browser/fileapi/file_system_operation.h" |
| 19 #include "webkit/browser/fileapi/file_system_operation_runner.h" | 20 #include "webkit/browser/fileapi/file_system_operation_runner.h" |
| 20 #include "webkit/browser/fileapi/sandbox_file_system_test_helper.h" | |
| 21 | 21 |
| 22 namespace fileapi { | 22 namespace fileapi { |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 class LoggingRecursiveOperation : public RecursiveOperationDelegate { | 25 class LoggingRecursiveOperation : public RecursiveOperationDelegate { |
| 26 public: | 26 public: |
| 27 struct LogEntry { | 27 struct LogEntry { |
| 28 enum Type { | 28 enum Type { |
| 29 PROCESS_FILE, | 29 PROCESS_FILE, |
| 30 PROCESS_DIRECTORY, | 30 PROCESS_DIRECTORY, |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 base::Bind(&ReportStatus, &error))); | 271 base::Bind(&ReportStatus, &error))); |
| 272 operation->RunRecursively(); | 272 operation->RunRecursively(); |
| 273 | 273 |
| 274 // Invoke Cancel(), after 5 times message posting. | 274 // Invoke Cancel(), after 5 times message posting. |
| 275 CallCancelLater(operation.get(), 5); | 275 CallCancelLater(operation.get(), 5); |
| 276 base::RunLoop().RunUntilIdle(); | 276 base::RunLoop().RunUntilIdle(); |
| 277 ASSERT_EQ(base::PLATFORM_FILE_ERROR_ABORT, error); | 277 ASSERT_EQ(base::PLATFORM_FILE_ERROR_ABORT, error); |
| 278 } | 278 } |
| 279 | 279 |
| 280 } // namespace fileapi | 280 } // namespace fileapi |
| OLD | NEW |