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/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/platform_file.h" | 8 #include "base/platform_file.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "content/public/test/test_file_system_context.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "webkit/browser/fileapi/file_system_context.h" | 12 #include "webkit/browser/fileapi/file_system_context.h" |
12 #include "webkit/browser/fileapi/file_system_operation_runner.h" | 13 #include "webkit/browser/fileapi/file_system_operation_runner.h" |
13 #include "webkit/browser/fileapi/mock_file_system_context.h" | |
14 | 14 |
15 namespace fileapi { | 15 namespace fileapi { |
16 | 16 |
17 void GetStatus(bool* done, | 17 void GetStatus(bool* done, |
18 base::PlatformFileError *status_out, | 18 base::PlatformFileError *status_out, |
19 base::PlatformFileError status) { | 19 base::PlatformFileError status) { |
20 ASSERT_FALSE(*done); | 20 ASSERT_FALSE(*done); |
21 *done = true; | 21 *done = true; |
22 *status_out = status; | 22 *status_out = status; |
23 } | 23 } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 base::PlatformFileError cancel_status = base::PLATFORM_FILE_ERROR_FAILED; | 153 base::PlatformFileError cancel_status = base::PLATFORM_FILE_ERROR_FAILED; |
154 operation_runner()->Cancel(kInvalidId, base::Bind(&GetCancelStatus, | 154 operation_runner()->Cancel(kInvalidId, base::Bind(&GetCancelStatus, |
155 &done, &cancel_done, | 155 &done, &cancel_done, |
156 &cancel_status)); | 156 &cancel_status)); |
157 | 157 |
158 ASSERT_TRUE(cancel_done); | 158 ASSERT_TRUE(cancel_done); |
159 ASSERT_EQ(base::PLATFORM_FILE_ERROR_INVALID_OPERATION, cancel_status); | 159 ASSERT_EQ(base::PLATFORM_FILE_ERROR_INVALID_OPERATION, cancel_status); |
160 } | 160 } |
161 | 161 |
162 } // namespace fileapi | 162 } // namespace fileapi |
OLD | NEW |