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

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

Issue 1360993002: Moved NavigationManagerImpl serialization out of CRWSessionController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compilation fix after rebase Created 3 years, 10 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
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Test fixture to test CRWSSLStatusUpdater class. 73 // Test fixture to test CRWSSLStatusUpdater class.
74 class CRWSSLStatusUpdaterTest : public web::WebTest { 74 class CRWSSLStatusUpdaterTest : public web::WebTest {
75 protected: 75 protected:
76 void SetUp() override { 76 void SetUp() override {
77 web::WebTest::SetUp(); 77 web::WebTest::SetUp();
78 78
79 data_source_.reset([[CRWSSLStatusUpdaterTestDataSource alloc] init]); 79 data_source_.reset([[CRWSSLStatusUpdaterTestDataSource alloc] init]);
80 delegate_.reset([[OCMockObject 80 delegate_.reset([[OCMockObject
81 mockForProtocol:@protocol(CRWSSLStatusUpdaterDelegate)] retain]); 81 mockForProtocol:@protocol(CRWSSLStatusUpdaterDelegate)] retain]);
82 82
83 nav_manager_.reset(new NavigationManagerImpl(nullptr, GetBrowserState())); 83 nav_manager_.reset(new NavigationManagerImpl());
84 nav_manager_->SetBrowserState(GetBrowserState());
84 85
85 ssl_status_updater_.reset([[CRWSSLStatusUpdater alloc] 86 ssl_status_updater_.reset([[CRWSSLStatusUpdater alloc]
86 initWithDataSource:data_source_ 87 initWithDataSource:data_source_
87 navigationManager:nav_manager_.get()]); 88 navigationManager:nav_manager_.get()]);
88 [ssl_status_updater_ setDelegate:delegate_]; 89 [ssl_status_updater_ setDelegate:delegate_];
89 90
90 // Create test cert chain. 91 // Create test cert chain.
91 scoped_refptr<net::X509Certificate> cert = 92 scoped_refptr<net::X509Certificate> cert =
92 net::ImportCertFromFile(net::GetTestCertsDirectory(), kCertFileName); 93 net::ImportCertFromFile(net::GetTestCertsDirectory(), kCertFileName);
93 ASSERT_TRUE(cert); 94 ASSERT_TRUE(cert);
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 [data_source_ 357 [data_source_
357 finishVerificationWithCertStatus:0 358 finishVerificationWithCertStatus:0
358 securityStyle:web::SECURITY_STYLE_AUTHENTICATED]; 359 securityStyle:web::SECURITY_STYLE_AUTHENTICATED];
359 360
360 // Make sure that security style and content status did change. 361 // Make sure that security style and content status did change.
361 EXPECT_EQ(web::SECURITY_STYLE_UNKNOWN, item->GetSSL().security_style); 362 EXPECT_EQ(web::SECURITY_STYLE_UNKNOWN, item->GetSSL().security_style);
362 EXPECT_EQ(web::SSLStatus::NORMAL_CONTENT, item->GetSSL().content_status); 363 EXPECT_EQ(web::SSLStatus::NORMAL_CONTENT, item->GetSSL().content_status);
363 } 364 }
364 365
365 } // namespace web 366 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/navigation/navigation_manager_storage_builder.mm ('k') | ios/web/public/crw_navigation_manager_storage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698