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

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

Issue 2712743008: Remove -insertTabWithWebState:atIndex: from TabModel. (Closed)
Patch Set: Rebase. Created 3 years, 9 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 trust_ = CreateServerTrustFromChain(chain, kHostName); 96 trust_ = CreateServerTrustFromChain(chain, kHostName);
97 } 97 }
98 98
99 void TearDown() override { 99 void TearDown() override {
100 EXPECT_OCMOCK_VERIFY(delegate_); 100 EXPECT_OCMOCK_VERIFY(delegate_);
101 web::WebTest::TearDown(); 101 web::WebTest::TearDown();
102 } 102 }
103 103
104 // Returns autoreleased session controller with a single committed entry. 104 // Returns autoreleased session controller with a single committed entry.
105 CRWSessionController* SessionControllerWithEntry(std::string item_url_spec) { 105 CRWSessionController* SessionControllerWithEntry(std::string item_url_spec) {
106 std::vector<std::unique_ptr<web::NavigationItem>> nav_items; 106 web::ScopedNavigationItemList nav_items;
107 base::scoped_nsobject<CRWSessionController> session_controller( 107 base::scoped_nsobject<CRWSessionController> session_controller(
108 [[CRWSessionController alloc] initWithBrowserState:GetBrowserState() 108 [[CRWSessionController alloc] initWithBrowserState:GetBrowserState()
109 navigationItems:std::move(nav_items) 109 navigationItems:std::move(nav_items)
110 currentIndex:0]); 110 currentIndex:0]);
111 [session_controller 111 [session_controller
112 addPendingItem:GURL(item_url_spec) 112 addPendingItem:GURL(item_url_spec)
113 referrer:Referrer() 113 referrer:Referrer()
114 transition:ui::PAGE_TRANSITION_LINK 114 transition:ui::PAGE_TRANSITION_LINK
115 initiationType:web::NavigationInitiationType::USER_INITIATED]; 115 initiationType:web::NavigationInitiationType::USER_INITIATED];
116 [session_controller commitPendingItem]; 116 [session_controller commitPendingItem];
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 [data_source_ 357 [data_source_
358 finishVerificationWithCertStatus:0 358 finishVerificationWithCertStatus:0
359 securityStyle:web::SECURITY_STYLE_AUTHENTICATED]; 359 securityStyle:web::SECURITY_STYLE_AUTHENTICATED];
360 360
361 // Make sure that security style and content status did change. 361 // Make sure that security style and content status did change.
362 EXPECT_EQ(web::SECURITY_STYLE_UNKNOWN, item->GetSSL().security_style); 362 EXPECT_EQ(web::SECURITY_STYLE_UNKNOWN, item->GetSSL().security_style);
363 EXPECT_EQ(web::SSLStatus::NORMAL_CONTENT, item->GetSSL().content_status); 363 EXPECT_EQ(web::SSLStatus::NORMAL_CONTENT, item->GetSSL().content_status);
364 } 364 }
365 365
366 } // namespace web 366 } // 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