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/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/app/chrome_command_ids.h" | 12 #include "chrome/app/chrome_command_ids.h" |
13 #include "chrome/browser/content_settings/host_content_settings_map.h" | 13 #include "chrome/browser/content_settings/host_content_settings_map.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/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" | 20 #include "chrome/common/chrome_notification_types.h" |
22 #include "chrome/common/chrome_paths.h" | 21 #include "chrome/common/chrome_paths.h" |
23 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
24 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
25 #include "chrome/test/base/in_process_browser_test.h" | 24 #include "chrome/test/base/in_process_browser_test.h" |
26 #include "chrome/test/base/ui_test_utils.h" | 25 #include "chrome/test/base/ui_test_utils.h" |
26 #include "components/web_modal/web_contents_modal_dialog_manager.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" |
31 #include "content/public/browser/notification_service.h" | 31 #include "content/public/browser/notification_service.h" |
32 #include "content/public/browser/render_view_host.h" | 32 #include "content/public/browser/render_view_host.h" |
33 #include "content/public/browser/web_contents.h" | 33 #include "content/public/browser/web_contents.h" |
34 #include "content/public/browser/web_contents_observer.h" | 34 #include "content/public/browser/web_contents_observer.h" |
35 #include "content/public/common/security_style.h" | 35 #include "content/public/common/security_style.h" |
36 #include "content/public/common/ssl_status.h" | 36 #include "content/public/common/ssl_status.h" |
37 #include "content/public/test/browser_test_utils.h" | 37 #include "content/public/test/browser_test_utils.h" |
38 #include "content/public/test/download_test_observer.h" | 38 #include "content/public/test/download_test_observer.h" |
39 #include "content/public/test/test_renderer_host.h" | 39 #include "content/public/test/test_renderer_host.h" |
40 #include "crypto/nss_util.h" | 40 #include "crypto/nss_util.h" |
41 #include "net/base/crypto_module.h" | 41 #include "net/base/crypto_module.h" |
42 #include "net/base/net_errors.h" | 42 #include "net/base/net_errors.h" |
43 #include "net/base/test_data_directory.h" | 43 #include "net/base/test_data_directory.h" |
44 #include "net/cert/cert_status_flags.h" | 44 #include "net/cert/cert_status_flags.h" |
45 #include "net/test/spawned_test_server/spawned_test_server.h" | 45 #include "net/test/spawned_test_server/spawned_test_server.h" |
46 | 46 |
47 #if defined(USE_NSS) | 47 #if defined(USE_NSS) |
48 #include "net/cert/nss_cert_database.h" | 48 #include "net/cert/nss_cert_database.h" |
49 #endif // defined(USE_NSS) | 49 #endif // defined(USE_NSS) |
50 | 50 |
51 using content::InterstitialPage; | 51 using content::InterstitialPage; |
52 using content::NavigationController; | 52 using content::NavigationController; |
53 using content::NavigationEntry; | 53 using content::NavigationEntry; |
54 using content::SSLStatus; | 54 using content::SSLStatus; |
55 using content::WebContents; | 55 using content::WebContents; |
56 using web_modal::WebContentsModalDialogManager; | |
56 | 57 |
57 const base::FilePath::CharType kDocRoot[] = | 58 const base::FilePath::CharType kDocRoot[] = |
58 FILE_PATH_LITERAL("chrome/test/data"); | 59 FILE_PATH_LITERAL("chrome/test/data"); |
59 | 60 |
60 namespace { | 61 namespace { |
61 | 62 |
62 class ProvisionalLoadWaiter : public content::WebContentsObserver { | 63 class ProvisionalLoadWaiter : public content::WebContentsObserver { |
63 public: | 64 public: |
64 explicit ProvisionalLoadWaiter(WebContents* tab) | 65 explicit ProvisionalLoadWaiter(WebContents* tab) |
65 : WebContentsObserver(tab), waiting_(false), seen_(false) {} | 66 : WebContentsObserver(tab), waiting_(false), seen_(false) {} |
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1283 | 1284 |
1284 // | 1285 // |
1285 // Frame navigation | 1286 // Frame navigation |
1286 // | 1287 // |
1287 | 1288 |
1288 // From a good HTTPS top frame: | 1289 // From a good HTTPS top frame: |
1289 // - navigate to an OK HTTPS frame | 1290 // - navigate to an OK HTTPS frame |
1290 // - navigate to a bad HTTPS (expect unsafe content and filtered frame), then | 1291 // - navigate to a bad HTTPS (expect unsafe content and filtered frame), then |
1291 // back | 1292 // back |
1292 // - navigate to HTTP (expect insecure content), then back | 1293 // - navigate to HTTP (expect insecure content), then back |
1293 IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestGoodFrameNavigation) { | 1294 IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestGoodFrameNavigation) { |
Mike Wittman
2013/05/15 21:42:37
Why disable this test?
sadrul
2013/05/15 21:45:34
This CL is not disabling the test (the patchset de
| |
1294 ASSERT_TRUE(test_server()->Start()); | 1295 ASSERT_TRUE(test_server()->Start()); |
1295 ASSERT_TRUE(https_server_.Start()); | 1296 ASSERT_TRUE(https_server_.Start()); |
1296 ASSERT_TRUE(https_server_expired_.Start()); | 1297 ASSERT_TRUE(https_server_expired_.Start()); |
1297 | 1298 |
1298 std::string top_frame_path; | 1299 std::string top_frame_path; |
1299 ASSERT_TRUE(GetTopFramePath(*test_server(), | 1300 ASSERT_TRUE(GetTopFramePath(*test_server(), |
1300 https_server_, | 1301 https_server_, |
1301 https_server_expired_, | 1302 https_server_expired_, |
1302 &top_frame_path)); | 1303 &top_frame_path)); |
1303 | 1304 |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1631 | 1632 |
1632 // Visit a page over https that contains a frame with a redirect. | 1633 // Visit a page over https that contains a frame with a redirect. |
1633 | 1634 |
1634 // XMLHttpRequest insecure content in synchronous mode. | 1635 // XMLHttpRequest insecure content in synchronous mode. |
1635 | 1636 |
1636 // XMLHttpRequest insecure content in asynchronous mode. | 1637 // XMLHttpRequest insecure content in asynchronous mode. |
1637 | 1638 |
1638 // XMLHttpRequest over bad ssl in synchronous mode. | 1639 // XMLHttpRequest over bad ssl in synchronous mode. |
1639 | 1640 |
1640 // XMLHttpRequest over OK ssl in synchronous mode. | 1641 // XMLHttpRequest over OK ssl in synchronous mode. |
OLD | NEW |