| 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 "webkit/fileapi/file_system_url_request_job.h" | 11 #include "webkit/fileapi/file_system_url_request_job.h" |
| 12 | 12 |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 | 14 |
| 15 #include <string> | 15 #include <string> |
| 16 | 16 |
| 17 #include "base/file_path.h" | 17 #include "base/file_path.h" |
| 18 #include "base/file_util.h" | 18 #include "base/file_util.h" |
| 19 #include "base/format_macros.h" | 19 #include "base/format_macros.h" |
| 20 #include "base/memory/scoped_callback_factory.h" |
| 20 #include "base/message_loop.h" | 21 #include "base/message_loop.h" |
| 21 #include "base/message_loop_proxy.h" | 22 #include "base/message_loop_proxy.h" |
| 22 #include "base/platform_file.h" | 23 #include "base/platform_file.h" |
| 23 #include "base/scoped_temp_dir.h" | 24 #include "base/scoped_temp_dir.h" |
| 24 #include "base/string_piece.h" | 25 #include "base/string_piece.h" |
| 25 #include "base/stringprintf.h" | 26 #include "base/stringprintf.h" |
| 26 #include "base/utf_string_conversions.h" | 27 #include "base/utf_string_conversions.h" |
| 27 #include "net/base/load_flags.h" | 28 #include "net/base/load_flags.h" |
| 28 #include "net/base/mime_util.h" | 29 #include "net/base/mime_util.h" |
| 29 #include "net/base/net_errors.h" | 30 #include "net/base/net_errors.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 | 367 |
| 367 TestRequest(CreateFileSystemURL(kFilename)); | 368 TestRequest(CreateFileSystemURL(kFilename)); |
| 368 | 369 |
| 369 std::string mime_type_from_job; | 370 std::string mime_type_from_job; |
| 370 request_->GetMimeType(&mime_type_from_job); | 371 request_->GetMimeType(&mime_type_from_job); |
| 371 EXPECT_EQ(mime_type_direct, mime_type_from_job); | 372 EXPECT_EQ(mime_type_direct, mime_type_from_job); |
| 372 } | 373 } |
| 373 | 374 |
| 374 } // namespace (anonymous) | 375 } // namespace (anonymous) |
| 375 } // namespace fileapi | 376 } // namespace fileapi |
| OLD | NEW |