| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // NOTE: These tests are run as part of "unit_tests" (in chrome/test/unit) | 5 // NOTE: These tests are run as part of "unit_tests" (in chrome/test/unit) |
| 6 // rather than as part of test_shell_tests because they rely on being able | 6 // rather than as part of test_shell_tests because they rely on being able |
| 7 // to instantiate a MessageLoop of type TYPE_IO. test_shell_tests uses | 7 // to instantiate a MessageLoop of type TYPE_IO. test_shell_tests uses |
| 8 // TYPE_UI, which URLRequest doesn't allow. | 8 // TYPE_UI, which URLRequest doesn't allow. |
| 9 // | 9 // |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/file_util_proxy.h" | 14 #include "base/file_util_proxy.h" |
| 15 #include "base/memory/scoped_temp_dir.h" | |
| 16 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
| 16 #include "base/scoped_temp_dir.h" |
| 17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
| 18 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
| 19 #include "net/url_request/url_request.h" | 19 #include "net/url_request/url_request.h" |
| 20 #include "net/url_request/url_request_job.h" | 20 #include "net/url_request/url_request_job.h" |
| 21 #include "net/url_request/url_request_status.h" | 21 #include "net/url_request/url_request_status.h" |
| 22 #include "testing/platform_test.h" | 22 #include "testing/platform_test.h" |
| 23 #include "webkit/fileapi/file_system_callback_dispatcher.h" | 23 #include "webkit/fileapi/file_system_callback_dispatcher.h" |
| 24 #include "webkit/fileapi/file_system_context.h" | 24 #include "webkit/fileapi/file_system_context.h" |
| 25 #include "webkit/fileapi/file_system_operation.h" | 25 #include "webkit/fileapi/file_system_operation.h" |
| 26 #include "webkit/fileapi/file_system_operation_context.h" | 26 #include "webkit/fileapi/file_system_operation_context.h" |
| 27 #include "webkit/fileapi/file_system_path_manager.h" | 27 #include "webkit/fileapi/file_system_path_manager.h" |
| 28 #include "webkit/fileapi/file_system_test_helper.h" |
| 28 #include "webkit/fileapi/file_system_usage_cache.h" | 29 #include "webkit/fileapi/file_system_usage_cache.h" |
| 29 #include "webkit/fileapi/file_writer_delegate.h" | 30 #include "webkit/fileapi/file_writer_delegate.h" |
| 30 #include "webkit/fileapi/quota_file_util.h" | 31 #include "webkit/fileapi/quota_file_util.h" |
| 31 #include "webkit/fileapi/sandbox_mount_point_provider.h" | 32 #include "webkit/fileapi/sandbox_mount_point_provider.h" |
| 32 #include "webkit/fileapi/file_system_test_helper.h" | |
| 33 | 33 |
| 34 namespace fileapi { | 34 namespace fileapi { |
| 35 | 35 |
| 36 namespace { | 36 namespace { |
| 37 | 37 |
| 38 class Result { | 38 class Result { |
| 39 public: | 39 public: |
| 40 Result() | 40 Result() |
| 41 : status_(base::PLATFORM_FILE_OK), | 41 : status_(base::PLATFORM_FILE_OK), |
| 42 bytes_written_(0), | 42 bytes_written_(0), |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 347 |
| 348 EXPECT_EQ(45, result_->bytes_written()); | 348 EXPECT_EQ(45, result_->bytes_written()); |
| 349 EXPECT_EQ(base::PLATFORM_FILE_OK, result_->status()); | 349 EXPECT_EQ(base::PLATFORM_FILE_OK, result_->status()); |
| 350 EXPECT_TRUE(result_->complete()); | 350 EXPECT_TRUE(result_->complete()); |
| 351 EXPECT_EQ(45, result2->bytes_written()); | 351 EXPECT_EQ(45, result2->bytes_written()); |
| 352 EXPECT_EQ(base::PLATFORM_FILE_OK, result2->status()); | 352 EXPECT_EQ(base::PLATFORM_FILE_OK, result2->status()); |
| 353 EXPECT_TRUE(result2->complete()); | 353 EXPECT_TRUE(result2->complete()); |
| 354 } | 354 } |
| 355 | 355 |
| 356 } // namespace fileapi | 356 } // namespace fileapi |
| OLD | NEW |