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 #include "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/prefs/pref_member.h" | 12 #include "base/prefs/pref_member.h" |
13 #include "base/prefs/pref_service.h" | 13 #include "base/prefs/pref_service.h" |
14 #include "base/test/test_file_util.h" | 14 #include "base/test/test_file_util.h" |
15 #include "chrome/app/chrome_command_ids.h" | 15 #include "chrome/app/chrome_command_ids.h" |
16 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 16 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
17 #include "chrome/browser/download/download_history.h" | 17 #include "chrome/browser/download/download_history.h" |
18 #include "chrome/browser/download/download_prefs.h" | 18 #include "chrome/browser/download/download_prefs.h" |
19 #include "chrome/browser/download/download_service.h" | 19 #include "chrome/browser/download/download_service.h" |
20 #include "chrome/browser/download/download_service_factory.h" | 20 #include "chrome/browser/download/download_service_factory.h" |
21 #include "chrome/browser/download/save_package_file_picker.h" | 21 #include "chrome/browser/download/save_package_file_picker.h" |
22 #include "chrome/browser/history/download_row.h" | |
23 #include "chrome/browser/net/url_request_mock_util.h" | 22 #include "chrome/browser/net/url_request_mock_util.h" |
24 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
25 #include "chrome/browser/ui/browser.h" | 24 #include "chrome/browser/ui/browser.h" |
26 #include "chrome/browser/ui/browser_commands.h" | 25 #include "chrome/browser/ui/browser_commands.h" |
27 #include "chrome/browser/ui/browser_window.h" | 26 #include "chrome/browser/ui/browser_window.h" |
28 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 27 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
29 #include "chrome/common/chrome_paths.h" | 28 #include "chrome/common/chrome_paths.h" |
30 #include "chrome/common/chrome_switches.h" | 29 #include "chrome/common/chrome_switches.h" |
31 #include "chrome/common/pref_names.h" | 30 #include "chrome/common/pref_names.h" |
32 #include "chrome/common/url_constants.h" | 31 #include "chrome/common/url_constants.h" |
33 #include "chrome/test/base/in_process_browser_test.h" | 32 #include "chrome/test/base/in_process_browser_test.h" |
34 #include "chrome/test/base/ui_test_utils.h" | 33 #include "chrome/test/base/ui_test_utils.h" |
| 34 #include "components/history/core/browser/download_row.h" |
35 #include "content/public/browser/download_item.h" | 35 #include "content/public/browser/download_item.h" |
36 #include "content/public/browser/download_manager.h" | 36 #include "content/public/browser/download_manager.h" |
37 #include "content/public/browser/notification_service.h" | 37 #include "content/public/browser/notification_service.h" |
38 #include "content/public/browser/notification_types.h" | 38 #include "content/public/browser/notification_types.h" |
39 #include "content/public/browser/web_contents.h" | 39 #include "content/public/browser/web_contents.h" |
40 #include "content/public/common/url_constants.h" | 40 #include "content/public/common/url_constants.h" |
41 #include "content/public/test/test_utils.h" | 41 #include "content/public/test/test_utils.h" |
42 #include "net/test/url_request/url_request_mock_http_job.h" | 42 #include "net/test/url_request/url_request_mock_http_job.h" |
43 #include "testing/gtest/include/gtest/gtest.h" | 43 #include "testing/gtest/include/gtest/gtest.h" |
44 | 44 |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 base::FilePath download_dir = DownloadPrefs::FromDownloadManager( | 801 base::FilePath download_dir = DownloadPrefs::FromDownloadManager( |
802 GetDownloadManager())->DownloadPath(); | 802 GetDownloadManager())->DownloadPath(); |
803 base::FilePath filename = download_dir.AppendASCII("dataurl.txt"); | 803 base::FilePath filename = download_dir.AppendASCII("dataurl.txt"); |
804 ASSERT_TRUE(base::PathExists(filename)); | 804 ASSERT_TRUE(base::PathExists(filename)); |
805 std::string contents; | 805 std::string contents; |
806 EXPECT_TRUE(base::ReadFileToString(filename, &contents)); | 806 EXPECT_TRUE(base::ReadFileToString(filename, &contents)); |
807 EXPECT_EQ("foo", contents); | 807 EXPECT_EQ("foo", contents); |
808 } | 808 } |
809 | 809 |
810 } // namespace | 810 } // namespace |
OLD | NEW |