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 #include "base/file_path.h" | 5 #include "base/file_path.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/scoped_temp_dir.h" | 9 #include "base/scoped_temp_dir.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
11 #include "base/test/test_file_util.h" | 11 #include "base/test/test_file_util.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/download/download_crx_util.h" | 14 #include "chrome/browser/download/download_crx_util.h" |
15 #include "chrome/browser/download/download_file_manager.h" | |
16 #include "chrome/browser/download/download_history.h" | 15 #include "chrome/browser/download/download_history.h" |
17 #include "chrome/browser/download/download_item.h" | |
18 #include "chrome/browser/download/download_manager.h" | |
19 #include "chrome/browser/download/download_prefs.h" | 16 #include "chrome/browser/download/download_prefs.h" |
20 #include "chrome/browser/download/download_shelf.h" | 17 #include "chrome/browser/download/download_shelf.h" |
21 #include "chrome/browser/download/download_util.h" | 18 #include "chrome/browser/download/download_util.h" |
22 #include "chrome/browser/extensions/extension_install_ui.h" | 19 #include "chrome/browser/extensions/extension_install_ui.h" |
23 #include "chrome/browser/extensions/extension_service.h" | 20 #include "chrome/browser/extensions/extension_service.h" |
24 #include "chrome/browser/history/download_history_info.h" | 21 #include "chrome/browser/history/download_history_info.h" |
25 #include "chrome/browser/history/history.h" | 22 #include "chrome/browser/history/history.h" |
26 #include "chrome/browser/prefs/pref_service.h" | 23 #include "chrome/browser/prefs/pref_service.h" |
27 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
28 #include "chrome/browser/ui/browser.h" | 25 #include "chrome/browser/ui/browser.h" |
29 #include "chrome/browser/ui/browser_list.h" | 26 #include "chrome/browser/ui/browser_list.h" |
30 #include "chrome/browser/ui/browser_window.h" | 27 #include "chrome/browser/ui/browser_window.h" |
31 #include "chrome/browser/ui/webui/active_downloads_ui.h" | 28 #include "chrome/browser/ui/webui/active_downloads_ui.h" |
32 #include "chrome/common/chrome_notification_types.h" | 29 #include "chrome/common/chrome_notification_types.h" |
33 #include "chrome/common/chrome_paths.h" | 30 #include "chrome/common/chrome_paths.h" |
34 #include "chrome/common/pref_names.h" | 31 #include "chrome/common/pref_names.h" |
35 #include "chrome/common/url_constants.h" | 32 #include "chrome/common/url_constants.h" |
36 #include "chrome/test/base/in_process_browser_test.h" | 33 #include "chrome/test/base/in_process_browser_test.h" |
37 #include "chrome/test/base/ui_test_utils.h" | 34 #include "chrome/test/base/ui_test_utils.h" |
38 #include "content/browser/cancelable_request.h" | 35 #include "content/browser/cancelable_request.h" |
| 36 #include "content/browser/download/download_file_manager.h" |
| 37 #include "content/browser/download/download_item.h" |
| 38 #include "content/browser/download/download_manager.h" |
39 #include "content/browser/net/url_request_mock_http_job.h" | 39 #include "content/browser/net/url_request_mock_http_job.h" |
40 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 40 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
41 #include "content/browser/tab_contents/tab_contents.h" | 41 #include "content/browser/tab_contents/tab_contents.h" |
42 #include "content/browser/net/url_request_slow_download_job.h" | 42 #include "content/browser/net/url_request_slow_download_job.h" |
43 #include "content/common/page_transition_types.h" | 43 #include "content/common/page_transition_types.h" |
44 #include "net/base/net_util.h" | 44 #include "net/base/net_util.h" |
45 #include "testing/gtest/include/gtest/gtest.h" | 45 #include "testing/gtest/include/gtest/gtest.h" |
46 | 46 |
47 namespace { | 47 namespace { |
48 | 48 |
(...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1729 EXPECT_EQ(1u, observer->NumDangerousDownloadsSeen()); | 1729 EXPECT_EQ(1u, observer->NumDangerousDownloadsSeen()); |
1730 | 1730 |
1731 // Download shelf should close. Download panel stays open on ChromeOS. | 1731 // Download shelf should close. Download panel stays open on ChromeOS. |
1732 CheckDownloadUI(browser(), false, true, FilePath()); | 1732 CheckDownloadUI(browser(), false, true, FilePath()); |
1733 | 1733 |
1734 // Check that the extension was installed. | 1734 // Check that the extension was installed. |
1735 ExtensionService* extension_service = | 1735 ExtensionService* extension_service = |
1736 browser()->profile()->GetExtensionService(); | 1736 browser()->profile()->GetExtensionService(); |
1737 ASSERT_TRUE(extension_service->GetExtensionById(kLargeThemeCrxId, false)); | 1737 ASSERT_TRUE(extension_service->GetExtensionById(kLargeThemeCrxId, false)); |
1738 } | 1738 } |
OLD | NEW |