| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #import "ios/web/net/crw_ssl_status_updater.h" | 5 #import "ios/web/net/crw_ssl_status_updater.h" |
| 6 | 6 |
| 7 #include "base/mac/scoped_block.h" | 7 #include "base/mac/scoped_block.h" |
| 8 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
| 9 #import "ios/web/navigation/crw_session_controller.h" | 9 #import "ios/web/navigation/crw_session_controller.h" |
| 10 #import "ios/web/navigation/crw_session_controller+private_constructors.h" | 10 #import "ios/web/navigation/crw_session_controller+private_constructors.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 referrer:Referrer() | 114 referrer:Referrer() |
| 115 transition:ui::PAGE_TRANSITION_LINK | 115 transition:ui::PAGE_TRANSITION_LINK |
| 116 rendererInitiated:NO]; | 116 rendererInitiated:NO]; |
| 117 [session_controller commitPendingEntry]; | 117 [session_controller commitPendingEntry]; |
| 118 | 118 |
| 119 return session_controller.autorelease(); | 119 return session_controller.autorelease(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 base::scoped_nsobject<CRWSSLStatusUpdaterTestDataSource> data_source_; | 122 base::scoped_nsobject<CRWSSLStatusUpdaterTestDataSource> data_source_; |
| 123 base::scoped_nsprotocol<id> delegate_; | 123 base::scoped_nsprotocol<id> delegate_; |
| 124 scoped_ptr<web::NavigationManagerImpl> nav_manager_; | 124 std::unique_ptr<web::NavigationManagerImpl> nav_manager_; |
| 125 base::scoped_nsobject<CRWSSLStatusUpdater> ssl_status_updater_; | 125 base::scoped_nsobject<CRWSSLStatusUpdater> ssl_status_updater_; |
| 126 base::scoped_nsobject<NSArray> cert_chain_; | 126 base::scoped_nsobject<NSArray> cert_chain_; |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 // Tests that CRWSSLStatusUpdater init returns non nil object. | 129 // Tests that CRWSSLStatusUpdater init returns non nil object. |
| 130 TEST_F(CRWSSLStatusUpdaterTest, Initialization) { | 130 TEST_F(CRWSSLStatusUpdaterTest, Initialization) { |
| 131 EXPECT_TRUE(ssl_status_updater_); | 131 EXPECT_TRUE(ssl_status_updater_); |
| 132 } | 132 } |
| 133 | 133 |
| 134 // Tests updating http navigation item. | 134 // Tests updating http navigation item. |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 [data_source_ | 330 [data_source_ |
| 331 finishVerificationWithCertStatus:0 | 331 finishVerificationWithCertStatus:0 |
| 332 securityStyle:web::SECURITY_STYLE_AUTHENTICATED]; | 332 securityStyle:web::SECURITY_STYLE_AUTHENTICATED]; |
| 333 | 333 |
| 334 // Make sure that security style and content status did change. | 334 // Make sure that security style and content status did change. |
| 335 EXPECT_EQ(web::SECURITY_STYLE_UNAUTHENTICATED, item->GetSSL().security_style); | 335 EXPECT_EQ(web::SECURITY_STYLE_UNAUTHENTICATED, item->GetSSL().security_style); |
| 336 EXPECT_EQ(web::SSLStatus::NORMAL_CONTENT, item->GetSSL().content_status); | 336 EXPECT_EQ(web::SSLStatus::NORMAL_CONTENT, item->GetSSL().content_status); |
| 337 } | 337 } |
| 338 | 338 |
| 339 } // namespace web | 339 } // namespace web |
| OLD | NEW |