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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
12 #include "content/browser/fileapi/mock_file_change_observer.h" | 12 #include "content/browser/fileapi/mock_file_change_observer.h" |
13 #include "content/browser/quota/mock_quota_manager.h" | 13 #include "content/browser/quota/mock_quota_manager.h" |
14 #include "content/public/test/mock_blob_url_request_context.h" | 14 #include "content/public/test/mock_blob_url_request_context.h" |
15 #include "content/public/test/test_file_system_backend.h" | 15 #include "content/public/test/test_file_system_backend.h" |
16 #include "content/public/test/test_file_system_context.h" | 16 #include "content/public/test/test_file_system_context.h" |
17 #include "net/url_request/url_request.h" | 17 #include "net/url_request/url_request.h" |
18 #include "net/url_request/url_request_context.h" | 18 #include "net/url_request/url_request_context.h" |
19 #include "net/url_request/url_request_job.h" | 19 #include "net/url_request/url_request_job.h" |
20 #include "net/url_request/url_request_job_factory_impl.h" | 20 #include "net/url_request/url_request_job_factory_impl.h" |
| 21 #include "storage/browser/blob/blob_storage_context.h" |
| 22 #include "storage/browser/blob/blob_url_request_job.h" |
| 23 #include "storage/browser/fileapi/file_system_context.h" |
| 24 #include "storage/browser/fileapi/file_system_file_util.h" |
| 25 #include "storage/browser/fileapi/file_system_operation_context.h" |
| 26 #include "storage/browser/fileapi/file_system_operation_runner.h" |
| 27 #include "storage/browser/fileapi/local_file_util.h" |
21 #include "storage/common/blob/blob_data.h" | 28 #include "storage/common/blob/blob_data.h" |
22 #include "storage/common/fileapi/file_system_util.h" | 29 #include "storage/common/fileapi/file_system_util.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
24 #include "url/gurl.h" | 31 #include "url/gurl.h" |
25 #include "webkit/browser/blob/blob_storage_context.h" | |
26 #include "webkit/browser/blob/blob_url_request_job.h" | |
27 #include "webkit/browser/fileapi/file_system_context.h" | |
28 #include "webkit/browser/fileapi/file_system_file_util.h" | |
29 #include "webkit/browser/fileapi/file_system_operation_context.h" | |
30 #include "webkit/browser/fileapi/file_system_operation_runner.h" | |
31 #include "webkit/browser/fileapi/local_file_util.h" | |
32 | 32 |
33 using storage::FileSystemOperation; | 33 using storage::FileSystemOperation; |
34 using storage::FileSystemOperationRunner; | 34 using storage::FileSystemOperationRunner; |
35 using storage::FileSystemURL; | 35 using storage::FileSystemURL; |
36 using content::MockBlobURLRequestContext; | 36 using content::MockBlobURLRequestContext; |
37 using content::ScopedTextBlob; | 37 using content::ScopedTextBlob; |
38 | 38 |
39 namespace content { | 39 namespace content { |
40 | 40 |
41 namespace { | 41 namespace { |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 EXPECT_EQ(base::File::FILE_ERROR_ABORT, status()); | 323 EXPECT_EQ(base::File::FILE_ERROR_ABORT, status()); |
324 EXPECT_EQ(base::File::FILE_OK, cancel_status()); | 324 EXPECT_EQ(base::File::FILE_OK, cancel_status()); |
325 EXPECT_TRUE(complete()); | 325 EXPECT_TRUE(complete()); |
326 | 326 |
327 EXPECT_EQ(0, change_observer()->get_and_reset_modify_file_count()); | 327 EXPECT_EQ(0, change_observer()->get_and_reset_modify_file_count()); |
328 } | 328 } |
329 | 329 |
330 // TODO(ericu,dmikurube,kinuko): Add more tests for cancel cases. | 330 // TODO(ericu,dmikurube,kinuko): Add more tests for cancel cases. |
331 | 331 |
332 } // namespace content | 332 } // namespace content |
OLD | NEW |