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.h" | 10 #import "ios/web/navigation/crw_session_controller.h" |
10 #import "ios/web/navigation/crw_session_controller+private_constructors.h" | |
11 #import "ios/web/navigation/navigation_manager_impl.h" | 11 #import "ios/web/navigation/navigation_manager_impl.h" |
12 #include "ios/web/public/cert_store.h" | 12 #include "ios/web/public/cert_store.h" |
13 #include "ios/web/public/navigation_item.h" | 13 #include "ios/web/public/navigation_item.h" |
14 #include "ios/web/public/ssl_status.h" | 14 #include "ios/web/public/ssl_status.h" |
15 #include "ios/web/public/test/web_test.h" | 15 #include "ios/web/public/test/web_test.h" |
16 #import "ios/web/web_state/wk_web_view_security_util.h" | 16 #import "ios/web/web_state/wk_web_view_security_util.h" |
17 #include "net/base/test_data_directory.h" | |
18 #include "net/test/cert_test_util.h" | 17 #include "net/test/cert_test_util.h" |
| 18 #include "net/test/test_data_directory.h" |
19 #include "third_party/ocmock/OCMock/OCMock.h" | 19 #include "third_party/ocmock/OCMock/OCMock.h" |
20 #include "third_party/ocmock/gtest_support.h" | 20 #include "third_party/ocmock/gtest_support.h" |
21 | 21 |
22 // Mocks CRWSSLStatusUpdaterTestDataSource. | 22 // Mocks CRWSSLStatusUpdaterTestDataSource. |
23 @interface CRWSSLStatusUpdaterTestDataSource | 23 @interface CRWSSLStatusUpdaterTestDataSource |
24 : NSObject<CRWSSLStatusUpdaterDataSource> { | 24 : NSObject<CRWSSLStatusUpdaterDataSource> { |
25 base::mac::ScopedBlock<StatusQueryHandler> _verificationCompletionHandler; | 25 base::mac::ScopedBlock<StatusQueryHandler> _verificationCompletionHandler; |
26 } | 26 } |
27 | 27 |
28 // Yes if |SSLStatusUpdater:querySSLStatusForTrust:host:completionHandler| was | 28 // Yes if |SSLStatusUpdater:querySSLStatusForTrust:host:completionHandler| was |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 [data_source_ | 359 [data_source_ |
360 finishVerificationWithCertStatus:0 | 360 finishVerificationWithCertStatus:0 |
361 securityStyle:web::SECURITY_STYLE_AUTHENTICATED]; | 361 securityStyle:web::SECURITY_STYLE_AUTHENTICATED]; |
362 | 362 |
363 // Make sure that security style and content status did change. | 363 // Make sure that security style and content status did change. |
364 EXPECT_EQ(web::SECURITY_STYLE_UNKNOWN, item->GetSSL().security_style); | 364 EXPECT_EQ(web::SECURITY_STYLE_UNKNOWN, item->GetSSL().security_style); |
365 EXPECT_EQ(web::SSLStatus::NORMAL_CONTENT, item->GetSSL().content_status); | 365 EXPECT_EQ(web::SSLStatus::NORMAL_CONTENT, item->GetSSL().content_status); |
366 } | 366 } |
367 | 367 |
368 } // namespace web | 368 } // namespace web |
OLD | NEW |