OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "ios/web/net/crw_cert_verification_controller.h" | 5 #import "ios/web/net/crw_cert_verification_controller.h" |
6 | 6 |
7 #include "base/mac/bind_objc_block.h" | 7 #import "base/mac/bind_objc_block.h" |
8 #include "base/mac/scoped_nsobject.h" | 8 #import "base/mac/scoped_nsobject.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/test/ios/wait_util.h" | 10 #import "base/test/ios/wait_util.h" |
11 #include "ios/web/public/test/web_test.h" | 11 #include "ios/web/public/test/web_test.h" |
12 #include "ios/web/public/web_thread.h" | 12 #include "ios/web/public/web_thread.h" |
13 #import "ios/web/web_state/wk_web_view_security_util.h" | 13 #import "ios/web/web_state/wk_web_view_security_util.h" |
14 #include "net/cert/x509_certificate.h" | 14 #include "net/cert/x509_certificate.h" |
15 #include "net/test/cert_test_util.h" | 15 #include "net/test/cert_test_util.h" |
16 #include "net/test/test_data_directory.h" | 16 #include "net/test/test_data_directory.h" |
17 | 17 |
18 namespace web { | 18 namespace web { |
19 | 19 |
20 namespace { | 20 namespace { |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 SecurityStyle style = SECURITY_STYLE_UNKNOWN; | 186 SecurityStyle style = SECURITY_STYLE_UNKNOWN; |
187 net::CertStatus status = net::CERT_STATUS_ALL_ERRORS; | 187 net::CertStatus status = net::CERT_STATUS_ALL_ERRORS; |
188 | 188 |
189 QueryStatus(invalid_trust_, kHostName, &style, &status); | 189 QueryStatus(invalid_trust_, kHostName, &style, &status); |
190 EXPECT_EQ(SECURITY_STYLE_AUTHENTICATION_BROKEN, style); | 190 EXPECT_EQ(SECURITY_STYLE_AUTHENTICATION_BROKEN, style); |
191 EXPECT_TRUE(net::CERT_STATUS_AUTHORITY_INVALID & status); | 191 EXPECT_TRUE(net::CERT_STATUS_AUTHORITY_INVALID & status); |
192 EXPECT_TRUE(net::CERT_STATUS_COMMON_NAME_INVALID & status); | 192 EXPECT_TRUE(net::CERT_STATUS_COMMON_NAME_INVALID & status); |
193 } | 193 } |
194 | 194 |
195 } // namespace web | 195 } // namespace web |
OLD | NEW |