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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "chrome/app/chrome_command_ids.h" | 13 #include "chrome/app/chrome_command_ids.h" |
| 14 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/chrome_notification_types.h" | 15 #include "chrome/browser/chrome_notification_types.h" |
| 16 #include "chrome/browser/net/certificate_error_reporter.h" |
15 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/safe_browsing/ping_manager.h" |
| 19 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
16 #include "chrome/browser/ssl/ssl_blocking_page.h" | 20 #include "chrome/browser/ssl/ssl_blocking_page.h" |
17 #include "chrome/browser/ui/browser.h" | 21 #include "chrome/browser/ui/browser.h" |
18 #include "chrome/browser/ui/browser_commands.h" | 22 #include "chrome/browser/ui/browser_commands.h" |
19 #include "chrome/browser/ui/browser_navigator.h" | 23 #include "chrome/browser/ui/browser_navigator.h" |
20 #include "chrome/browser/ui/browser_tabstrip.h" | 24 #include "chrome/browser/ui/browser_tabstrip.h" |
21 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 25 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
22 #include "chrome/common/chrome_paths.h" | 26 #include "chrome/common/chrome_paths.h" |
23 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
24 #include "chrome/common/pref_names.h" | 28 #include "chrome/common/pref_names.h" |
25 #include "chrome/test/base/in_process_browser_test.h" | 29 #include "chrome/test/base/in_process_browser_test.h" |
(...skipping 12 matching lines...) Expand all Loading... |
38 #include "content/public/browser/web_contents_observer.h" | 42 #include "content/public/browser/web_contents_observer.h" |
39 #include "content/public/common/security_style.h" | 43 #include "content/public/common/security_style.h" |
40 #include "content/public/common/ssl_status.h" | 44 #include "content/public/common/ssl_status.h" |
41 #include "content/public/test/browser_test_utils.h" | 45 #include "content/public/test/browser_test_utils.h" |
42 #include "content/public/test/download_test_observer.h" | 46 #include "content/public/test/download_test_observer.h" |
43 #include "content/public/test/test_renderer_host.h" | 47 #include "content/public/test/test_renderer_host.h" |
44 #include "net/base/net_errors.h" | 48 #include "net/base/net_errors.h" |
45 #include "net/base/test_data_directory.h" | 49 #include "net/base/test_data_directory.h" |
46 #include "net/cert/cert_status_flags.h" | 50 #include "net/cert/cert_status_flags.h" |
47 #include "net/test/spawned_test_server/spawned_test_server.h" | 51 #include "net/test/spawned_test_server/spawned_test_server.h" |
| 52 #include "net/url_request/url_request_context.h" |
48 | 53 |
49 #if defined(USE_NSS) | 54 #if defined(USE_NSS) |
50 #include "chrome/browser/net/nss_context.h" | 55 #include "chrome/browser/net/nss_context.h" |
51 #include "net/base/crypto_module.h" | 56 #include "net/base/crypto_module.h" |
52 #include "net/cert/nss_cert_database.h" | 57 #include "net/cert/nss_cert_database.h" |
53 #endif // defined(USE_NSS) | 58 #endif // defined(USE_NSS) |
54 | 59 |
55 using base::ASCIIToUTF16; | 60 using base::ASCIIToUTF16; |
| 61 using chrome_browser_net::CertificateErrorReporter; |
56 using content::InterstitialPage; | 62 using content::InterstitialPage; |
57 using content::NavigationController; | 63 using content::NavigationController; |
58 using content::NavigationEntry; | 64 using content::NavigationEntry; |
59 using content::SSLStatus; | 65 using content::SSLStatus; |
60 using content::WebContents; | 66 using content::WebContents; |
61 using web_modal::WebContentsModalDialogManager; | 67 using web_modal::WebContentsModalDialogManager; |
62 | 68 |
63 const base::FilePath::CharType kDocRoot[] = | 69 const base::FilePath::CharType kDocRoot[] = |
64 FILE_PATH_LITERAL("chrome/test/data"); | 70 FILE_PATH_LITERAL("chrome/test/data"); |
65 | 71 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 content::SecurityStyle expected_security_style, | 168 content::SecurityStyle expected_security_style, |
163 int expected_authentication_state) { | 169 int expected_authentication_state) { |
164 ASSERT_FALSE(tab->IsCrashed()); | 170 ASSERT_FALSE(tab->IsCrashed()); |
165 NavigationEntry* entry = tab->GetController().GetActiveEntry(); | 171 NavigationEntry* entry = tab->GetController().GetActiveEntry(); |
166 ASSERT_TRUE(entry); | 172 ASSERT_TRUE(entry); |
167 CertError::Check(*entry, error); | 173 CertError::Check(*entry, error); |
168 SecurityStyle::Check(*entry, expected_security_style); | 174 SecurityStyle::Check(*entry, expected_security_style); |
169 AuthState::Check(*entry, expected_authentication_state); | 175 AuthState::Check(*entry, expected_authentication_state); |
170 } | 176 } |
171 | 177 |
| 178 namespace CertificateReporting { |
| 179 |
| 180 enum OptIn { EXTENDED_REPORTING_OPT_IN, EXTENDED_REPORTING_DO_NOT_OPT_IN }; |
| 181 |
| 182 enum Proceed { SSL_INTERSTITIAL_PROCEED, SSL_INTERSTITIAL_DO_NOT_PROCEED }; |
| 183 |
| 184 enum ExpectReport { CERT_REPORT_EXPECTED, CERT_REPORT_NOT_EXPECTED }; |
| 185 |
| 186 // This class is used to test invalid certificate chain reporting when |
| 187 // the user opts in to do so on the interstitial. |
| 188 class MockReporter : public CertificateErrorReporter { |
| 189 public: |
| 190 explicit MockReporter(net::URLRequestContext* request_context, |
| 191 const GURL& upload_url) |
| 192 : CertificateErrorReporter(request_context, upload_url) {} |
| 193 |
| 194 void SendReport(CertificateErrorReporter::ReportType type, |
| 195 const std::string& hostname, |
| 196 const net::SSLInfo& ssl_info) override { |
| 197 EXPECT_EQ(CertificateErrorReporter::REPORT_TYPE_EXTENDED_REPORTING, type); |
| 198 latest_hostname_reported_ = hostname; |
| 199 } |
| 200 |
| 201 const std::string& latest_hostname_reported() { |
| 202 return latest_hostname_reported_; |
| 203 } |
| 204 |
| 205 private: |
| 206 std::string latest_hostname_reported_; |
| 207 }; |
| 208 |
| 209 void SetUpMockReporter(SafeBrowsingService* safe_browsing_service, |
| 210 MockReporter* reporter) { |
| 211 safe_browsing_service->ping_manager()->SetCertificateErrorReporterForTesting( |
| 212 reporter); |
| 213 } |
| 214 |
| 215 } // namespace CertificateReporting |
| 216 |
172 } // namespace | 217 } // namespace |
173 | 218 |
174 class SSLUITest : public InProcessBrowserTest { | 219 class SSLUITest : public InProcessBrowserTest { |
175 public: | 220 public: |
176 SSLUITest() | 221 SSLUITest() |
177 : https_server_(net::SpawnedTestServer::TYPE_HTTPS, | 222 : https_server_(net::SpawnedTestServer::TYPE_HTTPS, |
178 SSLOptions(SSLOptions::CERT_OK), | 223 SSLOptions(SSLOptions::CERT_OK), |
179 base::FilePath(kDocRoot)), | 224 base::FilePath(kDocRoot)), |
180 https_server_expired_(net::SpawnedTestServer::TYPE_HTTPS, | 225 https_server_expired_(net::SpawnedTestServer::TYPE_HTTPS, |
181 SSLOptions(SSLOptions::CERT_EXPIRED), | 226 SSLOptions(SSLOptions::CERT_EXPIRED), |
182 base::FilePath(kDocRoot)), | 227 base::FilePath(kDocRoot)), |
183 https_server_mismatched_(net::SpawnedTestServer::TYPE_HTTPS, | 228 https_server_mismatched_(net::SpawnedTestServer::TYPE_HTTPS, |
184 SSLOptions(SSLOptions::CERT_MISMATCHED_NAME), | 229 SSLOptions(SSLOptions::CERT_MISMATCHED_NAME), |
185 base::FilePath(kDocRoot)), | 230 base::FilePath(kDocRoot)), |
186 wss_server_expired_(net::SpawnedTestServer::TYPE_WSS, | 231 wss_server_expired_(net::SpawnedTestServer::TYPE_WSS, |
187 SSLOptions(SSLOptions::CERT_EXPIRED), | 232 SSLOptions(SSLOptions::CERT_EXPIRED), |
188 net::GetWebSocketTestDataDirectory()) {} | 233 net::GetWebSocketTestDataDirectory()) {} |
189 | 234 |
| 235 void SetUpOnMainThread() override { |
| 236 // Set up the mock reporter to track the hostnames that reports get |
| 237 // sent for. The request_context argument is NULL here |
| 238 // because the MockReporter doesn't actually use a |
| 239 // request_context. (In order to pass a real request_context, the |
| 240 // reporter would have to be constructed on the IO thread.) |
| 241 reporter_ = new CertificateReporting::MockReporter( |
| 242 NULL, GURL("http://example.test")); |
| 243 scoped_refptr<SafeBrowsingService> safe_browsing_service = |
| 244 g_browser_process->safe_browsing_service(); |
| 245 ASSERT_TRUE(safe_browsing_service); |
| 246 content::BrowserThread::PostTask( |
| 247 content::BrowserThread::IO, FROM_HERE, |
| 248 base::Bind(CertificateReporting::SetUpMockReporter, |
| 249 safe_browsing_service, reporter_)); |
| 250 } |
| 251 |
190 void SetUpCommandLine(base::CommandLine* command_line) override { | 252 void SetUpCommandLine(base::CommandLine* command_line) override { |
191 // Browser will both run and display insecure content. | 253 // Browser will both run and display insecure content. |
192 command_line->AppendSwitch(switches::kAllowRunningInsecureContent); | 254 command_line->AppendSwitch(switches::kAllowRunningInsecureContent); |
193 // Use process-per-site so that navigating to a same-site page in a | 255 // Use process-per-site so that navigating to a same-site page in a |
194 // new tab will use the same process. | 256 // new tab will use the same process. |
195 command_line->AppendSwitch(switches::kProcessPerSite); | 257 command_line->AppendSwitch(switches::kProcessPerSite); |
196 } | 258 } |
197 | 259 |
198 void CheckAuthenticatedState(WebContents* tab, | 260 void CheckAuthenticatedState(WebContents* tab, |
199 int expected_authentication_state) { | 261 int expected_authentication_state) { |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 std::vector<net::SpawnedTestServer::StringPair> | 406 std::vector<net::SpawnedTestServer::StringPair> |
345 replacement_text_for_page_with_unsafe_worker; | 407 replacement_text_for_page_with_unsafe_worker; |
346 replacement_text_for_page_with_unsafe_worker.push_back( | 408 replacement_text_for_page_with_unsafe_worker.push_back( |
347 make_pair("REPLACE_WITH_UNSAFE_WORKER_PATH", unsafe_worker_path)); | 409 make_pair("REPLACE_WITH_UNSAFE_WORKER_PATH", unsafe_worker_path)); |
348 return net::SpawnedTestServer::GetFilePathWithReplacements( | 410 return net::SpawnedTestServer::GetFilePathWithReplacements( |
349 "files/ssl/page_with_unsafe_worker.html", | 411 "files/ssl/page_with_unsafe_worker.html", |
350 replacement_text_for_page_with_unsafe_worker, | 412 replacement_text_for_page_with_unsafe_worker, |
351 page_with_unsafe_worker_path); | 413 page_with_unsafe_worker_path); |
352 } | 414 } |
353 | 415 |
| 416 // Helper function for testing invalid certificate chain reporting. |
| 417 void TestBrokenHTTPSReporting( |
| 418 CertificateReporting::OptIn opt_in, |
| 419 CertificateReporting::Proceed proceed, |
| 420 CertificateReporting::ExpectReport expect_report, |
| 421 Browser* browser) { |
| 422 ASSERT_TRUE(https_server_expired_.Start()); |
| 423 |
| 424 // Opt in to sending reports for invalid certificate chains. |
| 425 browser->profile()->GetPrefs()->SetBoolean( |
| 426 prefs::kSafeBrowsingExtendedReportingEnabled, |
| 427 opt_in == CertificateReporting::EXTENDED_REPORTING_OPT_IN); |
| 428 |
| 429 ui_test_utils::NavigateToURL(browser, https_server_expired_.GetURL("/")); |
| 430 |
| 431 WebContents* tab = browser->tab_strip_model()->GetActiveWebContents(); |
| 432 CheckAuthenticationBrokenState(tab, net::CERT_STATUS_DATE_INVALID, |
| 433 AuthState::SHOWING_INTERSTITIAL); |
| 434 |
| 435 // Set up a callback so that the test is notified when the report |
| 436 // has been sent on the IO thread (or not sent). |
| 437 base::RunLoop report_run_loop; |
| 438 base::Closure report_callback = report_run_loop.QuitClosure(); |
| 439 SSLBlockingPage* interstitial_page = static_cast<SSLBlockingPage*>( |
| 440 tab->GetInterstitialPage()->GetDelegateForTesting()); |
| 441 interstitial_page->SetCertificateReportCallbackForTesting(report_callback); |
| 442 |
| 443 EXPECT_EQ(std::string(), reporter_->latest_hostname_reported()); |
| 444 |
| 445 // Leave the interstitial (either by proceeding or going back) |
| 446 if (proceed == CertificateReporting::SSL_INTERSTITIAL_PROCEED) { |
| 447 ProceedThroughInterstitial(tab); |
| 448 } else { |
| 449 // Click "Take me back" |
| 450 InterstitialPage* interstitial_page = tab->GetInterstitialPage(); |
| 451 ASSERT_TRUE(interstitial_page); |
| 452 interstitial_page->DontProceed(); |
| 453 } |
| 454 |
| 455 // Wait until the report has been sent on the IO thread. |
| 456 report_run_loop.Run(); |
| 457 |
| 458 if (expect_report == CertificateReporting::CERT_REPORT_EXPECTED) { |
| 459 // Check that the mock reporter received a request to send a report. |
| 460 EXPECT_EQ(https_server_expired_.GetURL("/").host(), |
| 461 reporter_->latest_hostname_reported()); |
| 462 } else { |
| 463 EXPECT_EQ(std::string(), reporter_->latest_hostname_reported()); |
| 464 } |
| 465 } |
| 466 |
354 net::SpawnedTestServer https_server_; | 467 net::SpawnedTestServer https_server_; |
355 net::SpawnedTestServer https_server_expired_; | 468 net::SpawnedTestServer https_server_expired_; |
356 net::SpawnedTestServer https_server_mismatched_; | 469 net::SpawnedTestServer https_server_mismatched_; |
357 net::SpawnedTestServer wss_server_expired_; | 470 net::SpawnedTestServer wss_server_expired_; |
358 | 471 |
359 private: | 472 private: |
360 typedef net::SpawnedTestServer::SSLOptions SSLOptions; | 473 typedef net::SpawnedTestServer::SSLOptions SSLOptions; |
| 474 CertificateReporting::MockReporter* reporter_; |
361 | 475 |
362 DISALLOW_COPY_AND_ASSIGN(SSLUITest); | 476 DISALLOW_COPY_AND_ASSIGN(SSLUITest); |
363 }; | 477 }; |
364 | 478 |
365 class SSLUITestBlock : public SSLUITest { | 479 class SSLUITestBlock : public SSLUITest { |
366 public: | 480 public: |
367 SSLUITestBlock() : SSLUITest() {} | 481 SSLUITestBlock() : SSLUITest() {} |
368 | 482 |
369 // Browser will neither run nor display insecure content. | 483 // Browser will neither run nor display insecure content. |
370 void SetUpCommandLine(base::CommandLine* command_line) override { | 484 void SetUpCommandLine(base::CommandLine* command_line) override { |
(...skipping 14 matching lines...) Expand all Loading... |
385 class SSLUITestIgnoreLocalhostCertErrors : public SSLUITest { | 499 class SSLUITestIgnoreLocalhostCertErrors : public SSLUITest { |
386 public: | 500 public: |
387 SSLUITestIgnoreLocalhostCertErrors() : SSLUITest() {} | 501 SSLUITestIgnoreLocalhostCertErrors() : SSLUITest() {} |
388 | 502 |
389 void SetUpCommandLine(base::CommandLine* command_line) override { | 503 void SetUpCommandLine(base::CommandLine* command_line) override { |
390 // Browser will ignore certificate errors on localhost. | 504 // Browser will ignore certificate errors on localhost. |
391 command_line->AppendSwitch(switches::kAllowInsecureLocalhost); | 505 command_line->AppendSwitch(switches::kAllowInsecureLocalhost); |
392 } | 506 } |
393 }; | 507 }; |
394 | 508 |
| 509 class SSLUITestWithExtendedReporting : public SSLUITest { |
| 510 public: |
| 511 SSLUITestWithExtendedReporting() : SSLUITest() {} |
| 512 |
| 513 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 514 // Enable a checkbox on SSL interstitials that allows users to opt |
| 515 // in to reporting invalid certificate chains. |
| 516 command_line->AppendSwitch(switches::kEnableInvalidCertCollection); |
| 517 } |
| 518 }; |
| 519 |
395 // Visits a regular page over http. | 520 // Visits a regular page over http. |
396 IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTP) { | 521 IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTP) { |
397 ASSERT_TRUE(test_server()->Start()); | 522 ASSERT_TRUE(test_server()->Start()); |
398 | 523 |
399 ui_test_utils::NavigateToURL(browser(), | 524 ui_test_utils::NavigateToURL(browser(), |
400 test_server()->GetURL("files/ssl/google.html")); | 525 test_server()->GetURL("files/ssl/google.html")); |
401 | 526 |
402 CheckUnauthenticatedState( | 527 CheckUnauthenticatedState( |
403 browser()->tab_strip_model()->GetActiveWebContents(), AuthState::NONE); | 528 browser()->tab_strip_model()->GetActiveWebContents(), AuthState::NONE); |
404 } | 529 } |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 &replacement_path)); | 1107 &replacement_path)); |
983 | 1108 |
984 // Load a page that displays insecure content. | 1109 // Load a page that displays insecure content. |
985 ui_test_utils::NavigateToURL(browser(), | 1110 ui_test_utils::NavigateToURL(browser(), |
986 https_server_.GetURL(replacement_path)); | 1111 https_server_.GetURL(replacement_path)); |
987 | 1112 |
988 CheckAuthenticatedState(browser()->tab_strip_model()->GetActiveWebContents(), | 1113 CheckAuthenticatedState(browser()->tab_strip_model()->GetActiveWebContents(), |
989 AuthState::DISPLAYED_INSECURE_CONTENT); | 1114 AuthState::DISPLAYED_INSECURE_CONTENT); |
990 } | 1115 } |
991 | 1116 |
| 1117 // Test that when the checkbox is checked and the user proceeds through |
| 1118 // the interstitial, the FraudulentCertificateReporter sees a request to |
| 1119 // send a report. |
| 1120 IN_PROC_BROWSER_TEST_F(SSLUITestWithExtendedReporting, |
| 1121 TestBrokenHTTPSProceedWithReporting) { |
| 1122 TestBrokenHTTPSReporting(CertificateReporting::EXTENDED_REPORTING_OPT_IN, |
| 1123 CertificateReporting::SSL_INTERSTITIAL_PROCEED, |
| 1124 CertificateReporting::CERT_REPORT_EXPECTED, |
| 1125 browser()); |
| 1126 } |
| 1127 |
| 1128 // Test that when the checkbox is checked and the user goes back (does |
| 1129 // not proceed through the interstitial), the |
| 1130 // FraudulentCertificateReporter sees a request to send a report. |
| 1131 IN_PROC_BROWSER_TEST_F(SSLUITestWithExtendedReporting, |
| 1132 TestBrokenHTTPSGoBackWithReporting) { |
| 1133 TestBrokenHTTPSReporting( |
| 1134 CertificateReporting::EXTENDED_REPORTING_OPT_IN, |
| 1135 CertificateReporting::SSL_INTERSTITIAL_DO_NOT_PROCEED, |
| 1136 CertificateReporting::CERT_REPORT_EXPECTED, browser()); |
| 1137 } |
| 1138 |
| 1139 // Test that when the checkbox is not checked and the user proceeds |
| 1140 // through the interstitial, the FraudulentCertificateReporter does not |
| 1141 // see a request to send a report. |
| 1142 IN_PROC_BROWSER_TEST_F(SSLUITestWithExtendedReporting, |
| 1143 TestBrokenHTTPSProceedWithNoReporting) { |
| 1144 TestBrokenHTTPSReporting( |
| 1145 CertificateReporting::EXTENDED_REPORTING_DO_NOT_OPT_IN, |
| 1146 CertificateReporting::SSL_INTERSTITIAL_PROCEED, |
| 1147 CertificateReporting::CERT_REPORT_NOT_EXPECTED, browser()); |
| 1148 } |
| 1149 |
| 1150 // Test that when the checkbox is not checked and the user does not proceed |
| 1151 // through the interstitial, the FraudulentCertificateReporter does not |
| 1152 // see a request to send a report. |
| 1153 IN_PROC_BROWSER_TEST_F(SSLUITestWithExtendedReporting, |
| 1154 TestBrokenHTTPSGoBackWithNoReporting) { |
| 1155 TestBrokenHTTPSReporting( |
| 1156 CertificateReporting::EXTENDED_REPORTING_DO_NOT_OPT_IN, |
| 1157 CertificateReporting::SSL_INTERSTITIAL_DO_NOT_PROCEED, |
| 1158 CertificateReporting::CERT_REPORT_NOT_EXPECTED, browser()); |
| 1159 } |
| 1160 |
| 1161 // Test that when the command-line switch for reporting invalid cert |
| 1162 // chains is not enabled, reports don't get sent, even if the opt-in |
| 1163 // preference is set. (i.e. if a user enables invalid cert collection in |
| 1164 // chrome://flags, checks the box on an interstitial, and then disables |
| 1165 // the flag in chrome://flags, reports shouldn't be sent on the next |
| 1166 // interstitial). |
| 1167 IN_PROC_BROWSER_TEST_F(SSLUITest, TestBrokenHTTPSNoReportingWithoutSwitch) { |
| 1168 TestBrokenHTTPSReporting(CertificateReporting::EXTENDED_REPORTING_OPT_IN, |
| 1169 CertificateReporting::SSL_INTERSTITIAL_PROCEED, |
| 1170 CertificateReporting::CERT_REPORT_NOT_EXPECTED, |
| 1171 browser()); |
| 1172 } |
| 1173 |
| 1174 // Test that reports don't get sent in incognito mode even if the opt-in |
| 1175 // preference is set and the command-line switch is enabled. |
| 1176 IN_PROC_BROWSER_TEST_F(SSLUITestWithExtendedReporting, |
| 1177 TestBrokenHTTPSNoReportingInIncognito) { |
| 1178 TestBrokenHTTPSReporting(CertificateReporting::EXTENDED_REPORTING_OPT_IN, |
| 1179 CertificateReporting::SSL_INTERSTITIAL_PROCEED, |
| 1180 CertificateReporting::CERT_REPORT_NOT_EXPECTED, |
| 1181 CreateIncognitoBrowser()); |
| 1182 } |
| 1183 |
992 // Visits a page that runs insecure content and tries to suppress the insecure | 1184 // Visits a page that runs insecure content and tries to suppress the insecure |
993 // content warnings by randomizing location.hash. | 1185 // content warnings by randomizing location.hash. |
994 // Based on http://crbug.com/8706 | 1186 // Based on http://crbug.com/8706 |
995 IN_PROC_BROWSER_TEST_F(SSLUITest, | 1187 IN_PROC_BROWSER_TEST_F(SSLUITest, |
996 TestRunsInsecuredContentRandomizeHash) { | 1188 TestRunsInsecuredContentRandomizeHash) { |
997 ASSERT_TRUE(test_server()->Start()); | 1189 ASSERT_TRUE(test_server()->Start()); |
998 ASSERT_TRUE(https_server_.Start()); | 1190 ASSERT_TRUE(https_server_.Start()); |
999 | 1191 |
1000 ui_test_utils::NavigateToURL(browser(), https_server_.GetURL( | 1192 ui_test_utils::NavigateToURL(browser(), https_server_.GetURL( |
1001 "files/ssl/page_runs_insecure_content.html")); | 1193 "files/ssl/page_runs_insecure_content.html")); |
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1932 | 2124 |
1933 // Visit a page over https that contains a frame with a redirect. | 2125 // Visit a page over https that contains a frame with a redirect. |
1934 | 2126 |
1935 // XMLHttpRequest insecure content in synchronous mode. | 2127 // XMLHttpRequest insecure content in synchronous mode. |
1936 | 2128 |
1937 // XMLHttpRequest insecure content in asynchronous mode. | 2129 // XMLHttpRequest insecure content in asynchronous mode. |
1938 | 2130 |
1939 // XMLHttpRequest over bad ssl in synchronous mode. | 2131 // XMLHttpRequest over bad ssl in synchronous mode. |
1940 | 2132 |
1941 // XMLHttpRequest over OK ssl in synchronous mode. | 2133 // XMLHttpRequest over OK ssl in synchronous mode. |
OLD | NEW |