Chromium Code Reviews| 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/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 2336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2347 | 2347 |
| 2348 ProceedThroughInterstitial(tab); | 2348 ProceedThroughInterstitial(tab); |
| 2349 EXPECT_TRUE(state->HasAllowException(https_server_host)); | 2349 EXPECT_TRUE(state->HasAllowException(https_server_host)); |
| 2350 | 2350 |
| 2351 ui_test_utils::NavigateToURL(browser(), | 2351 ui_test_utils::NavigateToURL(browser(), |
| 2352 https_server_.GetURL("files/ssl/google.html")); | 2352 https_server_.GetURL("files/ssl/google.html")); |
| 2353 ASSERT_FALSE(tab->GetInterstitialPage()); | 2353 ASSERT_FALSE(tab->GetInterstitialPage()); |
| 2354 EXPECT_FALSE(state->HasAllowException(https_server_host)); | 2354 EXPECT_FALSE(state->HasAllowException(https_server_host)); |
| 2355 } | 2355 } |
| 2356 | 2356 |
| 2357 // Tests that the SSLStatus of a navigation entry for an interstitial | |
| 2358 // matches the navigation entry once the interstitial is clicked | |
| 2359 // through. https://crbug.com/529456 | |
| 2360 IN_PROC_BROWSER_TEST_F(SSLUITest, | |
| 2361 SSLStatusMatchesOnInterstitialAndAfterProceed) { | |
| 2362 ASSERT_TRUE(https_server_expired_.Start()); | |
| 2363 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); | |
| 2364 ui_test_utils::NavigateToURL( | |
| 2365 browser(), https_server_expired_.GetURL("files/ssl/google.html")); | |
| 2366 | |
|
meacer
2015/09/08 22:19:39
I think you should do a WaitForInterstitialAttach
estark
2015/09/08 22:53:59
Done.
| |
| 2367 ASSERT_TRUE(tab); | |
| 2368 EXPECT_TRUE(tab->ShowingInterstitialPage()); | |
| 2369 content::NavigationEntry* entry = tab->GetController().GetActiveEntry(); | |
| 2370 ASSERT_TRUE(entry); | |
| 2371 content::SSLStatus interstitial_ssl_status = entry->GetSSL(); | |
| 2372 | |
| 2373 ProceedThroughInterstitial(tab); | |
| 2374 EXPECT_FALSE(tab->ShowingInterstitialPage()); | |
| 2375 entry = tab->GetController().GetActiveEntry(); | |
| 2376 ASSERT_TRUE(entry); | |
| 2377 content::SSLStatus after_interstitial_ssl_status = entry->GetSSL(); | |
| 2378 | |
|
meacer
2015/09/08 22:19:39
nit: Remove blank line, or move it above the previ
estark
2015/09/08 22:53:59
Done.
| |
| 2379 EXPECT_TRUE(interstitial_ssl_status.Equals(after_interstitial_ssl_status)); | |
| 2380 } | |
| 2381 | |
| 2357 class CommonNameMismatchBrowserTest : public CertVerifierBrowserTest { | 2382 class CommonNameMismatchBrowserTest : public CertVerifierBrowserTest { |
| 2358 public: | 2383 public: |
| 2359 CommonNameMismatchBrowserTest() : CertVerifierBrowserTest() {} | 2384 CommonNameMismatchBrowserTest() : CertVerifierBrowserTest() {} |
| 2360 ~CommonNameMismatchBrowserTest() override {} | 2385 ~CommonNameMismatchBrowserTest() override {} |
| 2361 | 2386 |
| 2362 void SetUpCommandLine(base::CommandLine* command_line) override { | 2387 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 2363 // Enable finch experiment for SSL common name mismatch handling. | 2388 // Enable finch experiment for SSL common name mismatch handling. |
| 2364 command_line->AppendSwitchASCII(switches::kForceFieldTrials, | 2389 command_line->AppendSwitchASCII(switches::kForceFieldTrials, |
| 2365 "SSLCommonNameMismatchHandling/Enabled/"); | 2390 "SSLCommonNameMismatchHandling/Enabled/"); |
| 2366 } | 2391 } |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2734 | 2759 |
| 2735 // Visit a page over https that contains a frame with a redirect. | 2760 // Visit a page over https that contains a frame with a redirect. |
| 2736 | 2761 |
| 2737 // XMLHttpRequest insecure content in synchronous mode. | 2762 // XMLHttpRequest insecure content in synchronous mode. |
| 2738 | 2763 |
| 2739 // XMLHttpRequest insecure content in asynchronous mode. | 2764 // XMLHttpRequest insecure content in asynchronous mode. |
| 2740 | 2765 |
| 2741 // XMLHttpRequest over bad ssl in synchronous mode. | 2766 // XMLHttpRequest over bad ssl in synchronous mode. |
| 2742 | 2767 |
| 2743 // XMLHttpRequest over OK ssl in synchronous mode. | 2768 // XMLHttpRequest over OK ssl in synchronous mode. |
| OLD | NEW |