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

Side by Side Diff: ios/web/net/crw_ssl_status_updater_unittest.mm

Issue 2600583002: Remove ScopedVector from components/sessions. (Closed)
Patch Set: include Created 3 years, 11 months 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
« no previous file with comments | « ios/web/navigation/navigation_manager_impl.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ios/web/navigation/navigation_manager_impl.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698