| 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+private_constructors.h" | 9 #import "ios/web/navigation/crw_session_controller+private_constructors.h" |
| 10 #import "ios/web/navigation/crw_session_controller.h" | 10 #import "ios/web/navigation/crw_session_controller.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 trust_ = CreateServerTrustFromChain(chain, kHostName); | 95 trust_ = CreateServerTrustFromChain(chain, kHostName); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void TearDown() override { | 98 void TearDown() override { |
| 99 EXPECT_OCMOCK_VERIFY(delegate_); | 99 EXPECT_OCMOCK_VERIFY(delegate_); |
| 100 web::WebTest::TearDown(); | 100 web::WebTest::TearDown(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 // Returns autoreleased session controller with a single committed entry. | 103 // Returns autoreleased session controller with a single committed entry. |
| 104 CRWSessionController* SessionControllerWithEntry(std::string item_url_spec) { | 104 CRWSessionController* SessionControllerWithEntry(std::string item_url_spec) { |
| 105 ScopedVector<web::NavigationItem> nav_items; | 105 std::vector<std::unique_ptr<web::NavigationItem>> nav_items; |
| 106 base::scoped_nsobject<CRWSessionController> session_controller( | 106 base::scoped_nsobject<CRWSessionController> session_controller( |
| 107 [[CRWSessionController alloc] | 107 [[CRWSessionController alloc] |
| 108 initWithNavigationItems:std::move(nav_items) | 108 initWithNavigationItems:std::move(nav_items) |
| 109 currentIndex:0 | 109 currentIndex:0 |
| 110 browserState:GetBrowserState()]); | 110 browserState:GetBrowserState()]); |
| 111 [session_controller addPendingEntry:GURL(item_url_spec) | 111 [session_controller addPendingEntry:GURL(item_url_spec) |
| 112 referrer:Referrer() | 112 referrer:Referrer() |
| 113 transition:ui::PAGE_TRANSITION_LINK | 113 transition:ui::PAGE_TRANSITION_LINK |
| 114 rendererInitiated:NO]; | 114 rendererInitiated:NO]; |
| 115 [session_controller commitPendingEntry]; | 115 [session_controller commitPendingEntry]; |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 [data_source_ | 356 [data_source_ |
| 357 finishVerificationWithCertStatus:0 | 357 finishVerificationWithCertStatus:0 |
| 358 securityStyle:web::SECURITY_STYLE_AUTHENTICATED]; | 358 securityStyle:web::SECURITY_STYLE_AUTHENTICATED]; |
| 359 | 359 |
| 360 // Make sure that security style and content status did change. | 360 // Make sure that security style and content status did change. |
| 361 EXPECT_EQ(web::SECURITY_STYLE_UNKNOWN, item->GetSSL().security_style); | 361 EXPECT_EQ(web::SECURITY_STYLE_UNKNOWN, item->GetSSL().security_style); |
| 362 EXPECT_EQ(web::SSLStatus::NORMAL_CONTENT, item->GetSSL().content_status); | 362 EXPECT_EQ(web::SSLStatus::NORMAL_CONTENT, item->GetSSL().content_status); |
| 363 } | 363 } |
| 364 | 364 |
| 365 } // namespace web | 365 } // namespace web |
| OLD | NEW |