OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file contains download browser tests that are known to be runnable | 5 // This file contains download browser tests that are known to be runnable |
6 // in a pure content context. Over time tests should be migrated here. | 6 // in a pure content context. Over time tests should be migrated here. |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <utility> | 10 #include <utility> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback_helpers.h" | 13 #include "base/callback_helpers.h" |
14 #include "base/feature_list.h" | 14 #include "base/feature_list.h" |
15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
16 #include "base/files/file_util.h" | 16 #include "base/files/file_util.h" |
17 #include "base/files/scoped_temp_dir.h" | 17 #include "base/files/scoped_temp_dir.h" |
18 #include "base/format_macros.h" | 18 #include "base/format_macros.h" |
19 #include "base/macros.h" | 19 #include "base/macros.h" |
20 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
21 #include "base/run_loop.h" | 21 #include "base/run_loop.h" |
22 #include "base/strings/stringprintf.h" | 22 #include "base/strings/stringprintf.h" |
23 #include "base/strings/utf_string_conversions.h" | 23 #include "base/strings/utf_string_conversions.h" |
24 #include "base/threading/platform_thread.h" | 24 #include "base/threading/platform_thread.h" |
| 25 #include "base/threading/sequenced_worker_pool.h" |
25 #include "base/threading/thread_restrictions.h" | 26 #include "base/threading/thread_restrictions.h" |
26 #include "base/time/time.h" | 27 #include "base/time/time.h" |
27 #include "build/build_config.h" | 28 #include "build/build_config.h" |
28 #include "content/browser/byte_stream.h" | 29 #include "content/browser/byte_stream.h" |
29 #include "content/browser/download/download_file_factory.h" | 30 #include "content/browser/download/download_file_factory.h" |
30 #include "content/browser/download/download_file_impl.h" | 31 #include "content/browser/download/download_file_impl.h" |
31 #include "content/browser/download/download_item_impl.h" | 32 #include "content/browser/download/download_item_impl.h" |
32 #include "content/browser/download/download_manager_impl.h" | 33 #include "content/browser/download/download_manager_impl.h" |
33 #include "content/browser/download/download_resource_handler.h" | 34 #include "content/browser/download/download_resource_handler.h" |
34 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 35 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
(...skipping 2601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2636 GURL document_url = | 2637 GURL document_url = |
2637 origin_two.GetURL("/iframe-host.html?target=" + frame_url.spec()); | 2638 origin_two.GetURL("/iframe-host.html?target=" + frame_url.spec()); |
2638 DownloadItem* download = StartDownloadAndReturnItem(shell(), document_url); | 2639 DownloadItem* download = StartDownloadAndReturnItem(shell(), document_url); |
2639 WaitForCompletion(download); | 2640 WaitForCompletion(download); |
2640 | 2641 |
2641 EXPECT_STREQ(FILE_PATH_LITERAL("download-test.lib"), | 2642 EXPECT_STREQ(FILE_PATH_LITERAL("download-test.lib"), |
2642 download->GetTargetFilePath().BaseName().value().c_str()); | 2643 download->GetTargetFilePath().BaseName().value().c_str()); |
2643 } | 2644 } |
2644 | 2645 |
2645 } // namespace content | 2646 } // namespace content |
OLD | NEW |