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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/app/chrome_command_ids.h" | 11 #include "chrome/app/chrome_command_ids.h" |
12 #include "chrome/browser/content_settings/host_content_settings_map.h" | 12 #include "chrome/browser/content_settings/host_content_settings_map.h" |
13 #include "chrome/browser/prefs/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/browser_commands.h" | 16 #include "chrome/browser/ui/browser_commands.h" |
17 #include "chrome/browser/ui/browser_navigator.h" | 17 #include "chrome/browser/ui/browser_navigator.h" |
18 #include "chrome/browser/ui/browser_tabstrip.h" | 18 #include "chrome/browser/ui/browser_tabstrip.h" |
19 #include "chrome/browser/ui/constrained_window_tab_helper.h" | |
20 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 20 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" |
21 #include "chrome/common/chrome_notification_types.h" | 21 #include "chrome/common/chrome_notification_types.h" |
22 #include "chrome/common/chrome_paths.h" | 22 #include "chrome/common/chrome_paths.h" |
23 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
24 #include "chrome/common/pref_names.h" | 24 #include "chrome/common/pref_names.h" |
25 #include "chrome/test/base/in_process_browser_test.h" | 25 #include "chrome/test/base/in_process_browser_test.h" |
26 #include "chrome/test/base/ui_test_utils.h" | 26 #include "chrome/test/base/ui_test_utils.h" |
27 #include "content/public/browser/browser_context.h" | 27 #include "content/public/browser/browser_context.h" |
28 #include "content/public/browser/interstitial_page.h" | 28 #include "content/public/browser/interstitial_page.h" |
29 #include "content/public/browser/navigation_controller.h" | 29 #include "content/public/browser/navigation_controller.h" |
30 #include "content/public/browser/navigation_entry.h" | 30 #include "content/public/browser/navigation_entry.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 InterstitialPage* interstitial_page = tab->GetInterstitialPage(); | 208 InterstitialPage* interstitial_page = tab->GetInterstitialPage(); |
209 ASSERT_TRUE(interstitial_page); | 209 ASSERT_TRUE(interstitial_page); |
210 content::WindowedNotificationObserver observer( | 210 content::WindowedNotificationObserver observer( |
211 content::NOTIFICATION_LOAD_STOP, | 211 content::NOTIFICATION_LOAD_STOP, |
212 content::Source<NavigationController>(&tab->GetController())); | 212 content::Source<NavigationController>(&tab->GetController())); |
213 interstitial_page->Proceed(); | 213 interstitial_page->Proceed(); |
214 observer.Wait(); | 214 observer.Wait(); |
215 } | 215 } |
216 | 216 |
217 size_t GetConstrainedWindowCount() const { | 217 size_t GetConstrainedWindowCount() const { |
218 return ConstrainedWindowTabHelper::FromWebContents( | 218 return WebContentsModalDialogManager::FromWebContents( |
219 chrome::GetActiveWebContents(browser()))->dialog_count(); | 219 chrome::GetActiveWebContents(browser()))->dialog_count(); |
220 } | 220 } |
221 | 221 |
222 static bool GetFilePathWithHostAndPortReplacement( | 222 static bool GetFilePathWithHostAndPortReplacement( |
223 const std::string& original_file_path, | 223 const std::string& original_file_path, |
224 const net::HostPortPair& host_port_pair, | 224 const net::HostPortPair& host_port_pair, |
225 std::string* replacement_path) { | 225 std::string* replacement_path) { |
226 std::vector<net::TestServer::StringPair> replacement_text; | 226 std::vector<net::TestServer::StringPair> replacement_text; |
227 replacement_text.push_back( | 227 replacement_text.push_back( |
228 make_pair("REPLACE_WITH_HOST_AND_PORT", host_port_pair.ToString())); | 228 make_pair("REPLACE_WITH_HOST_AND_PORT", host_port_pair.ToString())); |
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1607 | 1607 |
1608 // Visit a page over https that contains a frame with a redirect. | 1608 // Visit a page over https that contains a frame with a redirect. |
1609 | 1609 |
1610 // XMLHttpRequest insecure content in synchronous mode. | 1610 // XMLHttpRequest insecure content in synchronous mode. |
1611 | 1611 |
1612 // XMLHttpRequest insecure content in asynchronous mode. | 1612 // XMLHttpRequest insecure content in asynchronous mode. |
1613 | 1613 |
1614 // XMLHttpRequest over bad ssl in synchronous mode. | 1614 // XMLHttpRequest over bad ssl in synchronous mode. |
1615 | 1615 |
1616 // XMLHttpRequest over OK ssl in synchronous mode. | 1616 // XMLHttpRequest over OK ssl in synchronous mode. |
OLD | NEW |