Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: chrome/browser/ssl/ssl_browser_tests.cc

Issue 2603433002: Move SecurityInterstitialPage into component (Closed)
Patch Set: nit, refind comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <utility> 5 #include <utility>
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 3648 matching lines...) Expand 10 before | Expand all | Expand 10 after
3659 SSLErrorHandler::FromWebContents(contents); 3659 SSLErrorHandler::FromWebContents(contents);
3660 // Make sure that the |SSLErrorHandler| is deleted. 3660 // Make sure that the |SSLErrorHandler| is deleted.
3661 EXPECT_FALSE(ssl_error_handler); 3661 EXPECT_FALSE(ssl_error_handler);
3662 EXPECT_FALSE(contents->ShowingInterstitialPage()); 3662 EXPECT_FALSE(contents->ShowingInterstitialPage());
3663 EXPECT_FALSE(contents->IsLoading()); 3663 EXPECT_FALSE(contents->IsLoading());
3664 } 3664 }
3665 3665
3666 class SSLBlockingPageIDNTest : public SecurityInterstitialIDNTest { 3666 class SSLBlockingPageIDNTest : public SecurityInterstitialIDNTest {
3667 protected: 3667 protected:
3668 // SecurityInterstitialIDNTest implementation 3668 // SecurityInterstitialIDNTest implementation
3669 SecurityInterstitialPage* CreateInterstitial( 3669 security_interstitials::SecurityInterstitialPage* CreateInterstitial(
3670 content::WebContents* contents, 3670 content::WebContents* contents,
3671 const GURL& request_url) const override { 3671 const GURL& request_url) const override {
3672 net::SSLInfo ssl_info; 3672 net::SSLInfo ssl_info;
3673 ssl_info.cert = 3673 ssl_info.cert =
3674 net::ImportCertFromFile(net::GetTestCertsDirectory(), "ok_cert.pem"); 3674 net::ImportCertFromFile(net::GetTestCertsDirectory(), "ok_cert.pem");
3675 return SSLBlockingPage::Create( 3675 return SSLBlockingPage::Create(
3676 contents, net::ERR_CERT_CONTAINS_ERRORS, ssl_info, request_url, 0, 3676 contents, net::ERR_CERT_CONTAINS_ERRORS, ssl_info, request_url, 0,
3677 base::Time::NowFromSystemTime(), nullptr, 3677 base::Time::NowFromSystemTime(), nullptr,
3678 base::Callback<void(content::CertificateRequestResultType)>()); 3678 base::Callback<void(content::CertificateRequestResultType)>());
3679 } 3679 }
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
3877 3877
3878 // Visit a page over https that contains a frame with a redirect. 3878 // Visit a page over https that contains a frame with a redirect.
3879 3879
3880 // XMLHttpRequest insecure content in synchronous mode. 3880 // XMLHttpRequest insecure content in synchronous mode.
3881 3881
3882 // XMLHttpRequest insecure content in asynchronous mode. 3882 // XMLHttpRequest insecure content in asynchronous mode.
3883 3883
3884 // XMLHttpRequest over bad ssl in synchronous mode. 3884 // XMLHttpRequest over bad ssl in synchronous mode.
3885 3885
3886 // XMLHttpRequest over OK ssl in synchronous mode. 3886 // XMLHttpRequest over OK ssl in synchronous mode.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698