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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 #include "chrome/browser/ui/browser_list.h" | 56 #include "chrome/browser/ui/browser_list.h" |
57 #include "chrome/browser/ui/browser_tabstrip.h" | 57 #include "chrome/browser/ui/browser_tabstrip.h" |
58 #include "chrome/browser/ui/browser_window.h" | 58 #include "chrome/browser/ui/browser_window.h" |
59 #include "chrome/browser/ui/chrome_pages.h" | 59 #include "chrome/browser/ui/chrome_pages.h" |
60 #include "chrome/browser/ui/host_desktop.h" | 60 #include "chrome/browser/ui/host_desktop.h" |
61 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 61 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
62 #include "chrome/common/chrome_paths.h" | 62 #include "chrome/common/chrome_paths.h" |
63 #include "chrome/common/pref_names.h" | 63 #include "chrome/common/pref_names.h" |
64 #include "chrome/common/safe_browsing/csd.pb.h" | 64 #include "chrome/common/safe_browsing/csd.pb.h" |
65 #include "chrome/common/url_constants.h" | 65 #include "chrome/common/url_constants.h" |
| 66 #include "chrome/grit/generated_resources.h" |
66 #include "chrome/test/base/in_process_browser_test.h" | 67 #include "chrome/test/base/in_process_browser_test.h" |
67 #include "chrome/test/base/test_switches.h" | 68 #include "chrome/test/base/test_switches.h" |
68 #include "chrome/test/base/ui_test_utils.h" | 69 #include "chrome/test/base/ui_test_utils.h" |
69 #include "components/infobars/core/confirm_infobar_delegate.h" | 70 #include "components/infobars/core/confirm_infobar_delegate.h" |
70 #include "components/infobars/core/infobar.h" | 71 #include "components/infobars/core/infobar.h" |
71 #include "content/public/browser/download_interrupt_reasons.h" | 72 #include "content/public/browser/download_interrupt_reasons.h" |
72 #include "content/public/browser/download_item.h" | 73 #include "content/public/browser/download_item.h" |
73 #include "content/public/browser/download_manager.h" | 74 #include "content/public/browser/download_manager.h" |
74 #include "content/public/browser/download_save_info.h" | 75 #include "content/public/browser/download_save_info.h" |
75 #include "content/public/browser/download_url_parameters.h" | 76 #include "content/public/browser/download_url_parameters.h" |
76 #include "content/public/browser/notification_source.h" | 77 #include "content/public/browser/notification_source.h" |
77 #include "content/public/browser/render_frame_host.h" | 78 #include "content/public/browser/render_frame_host.h" |
78 #include "content/public/browser/render_view_host.h" | 79 #include "content/public/browser/render_view_host.h" |
79 #include "content/public/browser/resource_context.h" | 80 #include "content/public/browser/resource_context.h" |
80 #include "content/public/browser/web_contents.h" | 81 #include "content/public/browser/web_contents.h" |
81 #include "content/public/common/content_switches.h" | 82 #include "content/public/common/content_switches.h" |
82 #include "content/public/common/context_menu_params.h" | 83 #include "content/public/common/context_menu_params.h" |
83 #include "content/public/common/page_transition_types.h" | 84 #include "content/public/common/page_transition_types.h" |
84 #include "content/public/test/browser_test_utils.h" | 85 #include "content/public/test/browser_test_utils.h" |
85 #include "content/public/test/download_test_observer.h" | 86 #include "content/public/test/download_test_observer.h" |
86 #include "content/public/test/test_file_error_injector.h" | 87 #include "content/public/test/test_file_error_injector.h" |
87 #include "content/public/test/test_navigation_observer.h" | 88 #include "content/public/test/test_navigation_observer.h" |
88 #include "content/test/net/url_request_mock_http_job.h" | 89 #include "content/test/net/url_request_mock_http_job.h" |
89 #include "content/test/net/url_request_slow_download_job.h" | 90 #include "content/test/net/url_request_slow_download_job.h" |
90 #include "extensions/browser/extension_system.h" | 91 #include "extensions/browser/extension_system.h" |
91 #include "extensions/common/feature_switch.h" | 92 #include "extensions/common/feature_switch.h" |
92 #include "grit/generated_resources.h" | |
93 #include "net/base/filename_util.h" | 93 #include "net/base/filename_util.h" |
94 #include "net/test/spawned_test_server/spawned_test_server.h" | 94 #include "net/test/spawned_test_server/spawned_test_server.h" |
95 #include "testing/gtest/include/gtest/gtest.h" | 95 #include "testing/gtest/include/gtest/gtest.h" |
96 #include "ui/base/l10n/l10n_util.h" | 96 #include "ui/base/l10n/l10n_util.h" |
97 | 97 |
98 using content::BrowserContext; | 98 using content::BrowserContext; |
99 using content::BrowserThread; | 99 using content::BrowserThread; |
100 using content::DownloadItem; | 100 using content::DownloadItem; |
101 using content::DownloadManager; | 101 using content::DownloadManager; |
102 using content::DownloadUrlParameters; | 102 using content::DownloadUrlParameters; |
(...skipping 3288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3391 *(downloads[0]))); | 3391 *(downloads[0]))); |
3392 | 3392 |
3393 // Begin feedback and check that the file is "stolen". | 3393 // Begin feedback and check that the file is "stolen". |
3394 download_protection_service->feedback_service()->BeginFeedbackForDownload( | 3394 download_protection_service->feedback_service()->BeginFeedbackForDownload( |
3395 downloads[0]); | 3395 downloads[0]); |
3396 std::vector<DownloadItem*> updated_downloads; | 3396 std::vector<DownloadItem*> updated_downloads; |
3397 GetDownloads(browser(), &updated_downloads); | 3397 GetDownloads(browser(), &updated_downloads); |
3398 ASSERT_TRUE(updated_downloads.empty()); | 3398 ASSERT_TRUE(updated_downloads.empty()); |
3399 } | 3399 } |
3400 #endif | 3400 #endif |
OLD | NEW |