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/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 #include "chrome/browser/profiles/profile.h" | 47 #include "chrome/browser/profiles/profile.h" |
48 #include "chrome/browser/renderer_context_menu/render_view_context_menu_browsert
est_util.h" | 48 #include "chrome/browser/renderer_context_menu/render_view_context_menu_browsert
est_util.h" |
49 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti
l.h" | 49 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti
l.h" |
50 #include "chrome/browser/ui/browser.h" | 50 #include "chrome/browser/ui/browser.h" |
51 #include "chrome/browser/ui/browser_commands.h" | 51 #include "chrome/browser/ui/browser_commands.h" |
52 #include "chrome/browser/ui/browser_finder.h" | 52 #include "chrome/browser/ui/browser_finder.h" |
53 #include "chrome/browser/ui/browser_list.h" | 53 #include "chrome/browser/ui/browser_list.h" |
54 #include "chrome/browser/ui/browser_tabstrip.h" | 54 #include "chrome/browser/ui/browser_tabstrip.h" |
55 #include "chrome/browser/ui/browser_window.h" | 55 #include "chrome/browser/ui/browser_window.h" |
56 #include "chrome/browser/ui/chrome_pages.h" | 56 #include "chrome/browser/ui/chrome_pages.h" |
57 #include "chrome/browser/ui/host_desktop.h" | |
58 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 57 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
59 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" | 58 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" |
60 #include "chrome/common/chrome_paths.h" | 59 #include "chrome/common/chrome_paths.h" |
61 #include "chrome/common/chrome_switches.h" | 60 #include "chrome/common/chrome_switches.h" |
62 #include "chrome/common/pref_names.h" | 61 #include "chrome/common/pref_names.h" |
63 #include "chrome/common/safe_browsing/csd.pb.h" | 62 #include "chrome/common/safe_browsing/csd.pb.h" |
64 #include "chrome/common/url_constants.h" | 63 #include "chrome/common/url_constants.h" |
65 #include "chrome/grit/generated_resources.h" | 64 #include "chrome/grit/generated_resources.h" |
66 #include "chrome/test/base/in_process_browser_test.h" | 65 #include "chrome/test/base/in_process_browser_test.h" |
67 #include "chrome/test/base/test_switches.h" | 66 #include "chrome/test/base/test_switches.h" |
(...skipping 24 matching lines...) Expand all Loading... |
92 #include "extensions/common/feature_switch.h" | 91 #include "extensions/common/feature_switch.h" |
93 #include "net/base/filename_util.h" | 92 #include "net/base/filename_util.h" |
94 #include "net/test/embedded_test_server/embedded_test_server.h" | 93 #include "net/test/embedded_test_server/embedded_test_server.h" |
95 #include "net/test/embedded_test_server/http_request.h" | 94 #include "net/test/embedded_test_server/http_request.h" |
96 #include "net/test/embedded_test_server/http_response.h" | 95 #include "net/test/embedded_test_server/http_response.h" |
97 #include "net/test/url_request/url_request_mock_http_job.h" | 96 #include "net/test/url_request/url_request_mock_http_job.h" |
98 #include "net/test/url_request/url_request_slow_download_job.h" | 97 #include "net/test/url_request/url_request_slow_download_job.h" |
99 #include "testing/gtest/include/gtest/gtest.h" | 98 #include "testing/gtest/include/gtest/gtest.h" |
100 #include "ui/base/l10n/l10n_util.h" | 99 #include "ui/base/l10n/l10n_util.h" |
101 #include "ui/base/page_transition_types.h" | 100 #include "ui/base/page_transition_types.h" |
| 101 #include "ui/gfx/host_desktop_type.h" |
102 | 102 |
103 #if defined(FULL_SAFE_BROWSING) | 103 #if defined(FULL_SAFE_BROWSING) |
104 #include "chrome/browser/safe_browsing/download_feedback_service.h" | 104 #include "chrome/browser/safe_browsing/download_feedback_service.h" |
105 #include "chrome/browser/safe_browsing/download_protection_service.h" | 105 #include "chrome/browser/safe_browsing/download_protection_service.h" |
106 #include "chrome/browser/safe_browsing/safe_browsing_database.h" | 106 #include "chrome/browser/safe_browsing/safe_browsing_database.h" |
107 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 107 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
108 #endif | 108 #endif |
109 | 109 |
110 using content::BrowserContext; | 110 using content::BrowserContext; |
111 using content::BrowserThread; | 111 using content::BrowserThread; |
(...skipping 3534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3646 | 3646 |
3647 scoped_ptr<content::DownloadTestObserver> observer(DangerousDownloadWaiter( | 3647 scoped_ptr<content::DownloadTestObserver> observer(DangerousDownloadWaiter( |
3648 browser(), 1, content::DownloadTestObserver::ON_DANGEROUS_DOWNLOAD_DENY)); | 3648 browser(), 1, content::DownloadTestObserver::ON_DANGEROUS_DOWNLOAD_DENY)); |
3649 ui_test_utils::NavigateToURL(browser(), extension_url); | 3649 ui_test_utils::NavigateToURL(browser(), extension_url); |
3650 | 3650 |
3651 observer->WaitForFinished(); | 3651 observer->WaitForFinished(); |
3652 | 3652 |
3653 // Download shelf should close. | 3653 // Download shelf should close. |
3654 EXPECT_FALSE(browser()->window()->IsDownloadShelfVisible()); | 3654 EXPECT_FALSE(browser()->window()->IsDownloadShelfVisible()); |
3655 } | 3655 } |
OLD | NEW |